def gen_floating_ip_pool(vnet):
    """ Returns a configured vnc_api.gen.resource_client.FloatingIpPool """
    pool = FloatingIpPool(
        name='default',
        parent_obj=vnet,
    )
    return pool
Esempio n. 2
0
    def _create_fip_pool_and_public_network(self):
        net_uuid = self._create_virtual_network(network='public')
        net_obj = self._vnc_lib.virtual_network_read(id=net_uuid)
        fip_pool_obj = FloatingIpPool('public_fip_pool', parent_obj=net_obj)
        fip_pool_uuid = self._vnc_lib.floating_ip_pool_create(fip_pool_obj)

        kube_config.VncKubernetesConfig.args().public_fip_pool = str({
            'project': 'default',
            'domain': 'default-domain',
            'network': 'public',
            'name': 'public_fip_pool'
        })
        return net_uuid, fip_pool_uuid