Retry on case of sqlite3.InterfaceError on FT
Following the steps done in [1] additional retries have added after decompose in a soft refactor main methods that call to Neutron. To clarify the refactor, the following changes have been made in FT base methods: - The method _create_subnet_from_net was previously responsible for creating subnet, ports, and attaching to the router. Now, these three actions are individual methods. - FT calls to base methods are sorted in the following sequence: - Create net - Create subnet - Create port - Create router - Attach router to subnet - Retry mechanisms have been added to all methods that make calls to the L3_plugin for creation of resources. As this way every small method can be cover by retry in case Neutron reports a exception. NOTE: due to a cross depedency with fix done in [2], some tests have been skipped, but it will be restored in [2]. [1] https://review.opendev.org/c/openstack/ovn-octavia-provider/+/883662 [2] https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701 Related-Bug: #2020195 Change-Id: I98aad143556ff0ec7ecb365de99fd58a6dcb734e
This commit is contained in:
parent
40ac510729
commit
1e45693bca
@ -280,21 +280,28 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
router = self.l3_plugin.create_router(self.context, router)
|
||||
return router['id']
|
||||
|
||||
@tenacity.retry(
|
||||
retry=tenacity.retry_if_exception_type(odb_exc.DBError),
|
||||
wait=tenacity.wait_exponential(),
|
||||
stop=tenacity.stop_after_attempt(3),
|
||||
reraise=True)
|
||||
def _create_net(self, name):
|
||||
n1 = self._make_network(self.fmt, name, True)
|
||||
return n1
|
||||
|
||||
def _create_subnet_from_net(self, net, cidr, router_id=None,
|
||||
@tenacity.retry(
|
||||
retry=tenacity.retry_if_exception_type(odb_exc.DBError),
|
||||
wait=tenacity.wait_exponential(),
|
||||
stop=tenacity.stop_after_attempt(3),
|
||||
reraise=True)
|
||||
def _create_subnet_from_net(self, net, cidr,
|
||||
ip_version=n_const.IP_VERSION_4):
|
||||
res = self._create_subnet(self.fmt, net['network']['id'],
|
||||
cidr, ip_version=ip_version)
|
||||
subnet = self.deserialize(self.fmt, res)['subnet']
|
||||
self._local_net_cache[subnet['id']] = net['network']['id']
|
||||
self._local_cidr_cache[subnet['id']] = subnet['cidr']
|
||||
if router_id:
|
||||
self._attach_router_to_subnet(subnet['id'], router_id)
|
||||
port_address, port_id = self._create_port_on_network(net)
|
||||
return (net['network']['id'], subnet['id'], port_address, port_id)
|
||||
return net['network']['id'], subnet['id']
|
||||
|
||||
@tenacity.retry(
|
||||
retry=tenacity.retry_if_exception_type(odb_exc.DBError),
|
||||
@ -302,9 +309,8 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
stop=tenacity.stop_after_attempt(3),
|
||||
reraise=True)
|
||||
def _attach_router_to_subnet(self, subnet_id, router_id):
|
||||
if router_id:
|
||||
self.l3_plugin.add_router_interface(
|
||||
self.context, router_id, {'subnet_id': subnet_id})
|
||||
self.l3_plugin.add_router_interface(
|
||||
self.context, router_id, {'subnet_id': subnet_id})
|
||||
|
||||
@tenacity.retry(
|
||||
retry=tenacity.retry_if_exception_type(odb_exc.DBError),
|
||||
@ -325,6 +331,8 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
if add_ref:
|
||||
if net_id not in lb_data[ovn_const.LB_EXT_IDS_LS_REFS_KEY]:
|
||||
lb_data[ovn_const.LB_EXT_IDS_LS_REFS_KEY][net_id] = 1
|
||||
else:
|
||||
lb_data[ovn_const.LB_EXT_IDS_LS_REFS_KEY][net_id] += 1
|
||||
else:
|
||||
ref_ct = lb_data[ovn_const.LB_EXT_IDS_LS_REFS_KEY][net_id]
|
||||
if ref_ct <= 0:
|
||||
@ -385,22 +393,29 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
force_retry_ls_to_lr_assoc=True):
|
||||
|
||||
self._o_driver_lib.update_loadbalancer_status.reset_mock()
|
||||
r_id = self._create_router(
|
||||
'r' + uuidutils.generate_uuid()[:4]) if create_router else None
|
||||
|
||||
net_info = []
|
||||
net = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
subnet_info = self._create_subnet_from_net(
|
||||
net, '10.0.1.0/24', router_id=r_id)
|
||||
net_info.append(subnet_info)
|
||||
net = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
subnet_info = self._create_subnet_from_net(
|
||||
net, '10.0.2.0/24', router_id=r_id)
|
||||
net_info.append(subnet_info)
|
||||
net = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
subnet_info = self._create_subnet_from_net(
|
||||
net, '10.0.3.0/24', router_id=r_id)
|
||||
net_info.append(subnet_info)
|
||||
net1 = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
network_id1, subnet_id1 = self._create_subnet_from_net(
|
||||
net1, '10.0.1.0/24')
|
||||
port_address1, port_id1 = self._create_port_on_network(net1)
|
||||
net_info.append((network_id1, subnet_id1, port_address1, port_id1))
|
||||
net2 = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
network_id2, subnet_id2 = self._create_subnet_from_net(
|
||||
net2, '10.0.2.0/24')
|
||||
port_address2, port_id2 = self._create_port_on_network(net2)
|
||||
net_info.append((network_id2, subnet_id2, port_address2, port_id2))
|
||||
net3 = self._create_net('n' + uuidutils.generate_uuid()[:4])
|
||||
network_id3, subnet_id3 = self._create_subnet_from_net(
|
||||
net3, '10.0.3.0/24')
|
||||
port_address3, port_id3 = self._create_port_on_network(net3)
|
||||
net_info.append((network_id3, subnet_id3, port_address3, port_id3))
|
||||
|
||||
r_id = self._create_router(
|
||||
'r' + uuidutils.generate_uuid()[:4]) if create_router else None
|
||||
self._attach_router_to_subnet(subnet_id1, r_id)
|
||||
self._attach_router_to_subnet(subnet_id2, r_id)
|
||||
self._attach_router_to_subnet(subnet_id3, r_id)
|
||||
|
||||
lb_data = {}
|
||||
lb_data['model'] = self._create_lb_model(
|
||||
@ -461,7 +476,8 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
|
||||
return lb_data
|
||||
|
||||
def _create_load_balancer_and_validate(self, subnet_info,
|
||||
def _create_load_balancer_and_validate(self, network_id, subnet_id,
|
||||
port_address, port_id,
|
||||
admin_state_up=True,
|
||||
only_model=False,
|
||||
router_id=None,
|
||||
@ -472,15 +488,16 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
if router_id:
|
||||
lb_data[ovn_const.LB_EXT_IDS_LR_REF_KEY] = (
|
||||
ovn_const.LR_REF_KEY_HEADER + router_id)
|
||||
lb_data['vip_net_info'] = subnet_info
|
||||
lb_data['vip_net_info'] = (
|
||||
network_id, subnet_id, port_address, port_id)
|
||||
lb_data['model'] = self._create_lb_model(
|
||||
vip=subnet_info[2], vip_network_id=subnet_info[0],
|
||||
vip_subnet_id=subnet_info[1], vip_port_id=subnet_info[3],
|
||||
vip=port_address, vip_network_id=network_id,
|
||||
vip_subnet_id=subnet_id, vip_port_id=port_id,
|
||||
admin_state_up=admin_state_up, additional_vips=additional_vips)
|
||||
lb_data[ovn_const.LB_EXT_IDS_LS_REFS_KEY] = {}
|
||||
lb_data['listeners'] = []
|
||||
lb_data['pools'] = []
|
||||
self._update_ls_refs(lb_data, subnet_info[0])
|
||||
self._update_ls_refs(lb_data, network_id)
|
||||
if only_model:
|
||||
return lb_data
|
||||
|
||||
@ -489,7 +506,7 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
name = '%s%s' % (ovn_const.LB_VIP_PORT_PREFIX,
|
||||
lb_data['model'].loadbalancer_id)
|
||||
self.driver.update_port(
|
||||
self.context, subnet_info[3], {'port': {'name': name}})
|
||||
self.context, port_id, {'port': {'name': name}})
|
||||
|
||||
if additional_vips:
|
||||
for index, add_vip in enumerate(additional_vips, start=1):
|
||||
@ -522,7 +539,7 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
self.assertTrue(
|
||||
self._is_lb_associated_to_ls(
|
||||
lb_data['model'].loadbalancer_id,
|
||||
ovn_const.LR_REF_KEY_HEADER + subnet_info[0]))
|
||||
ovn_const.LR_REF_KEY_HEADER + network_id))
|
||||
return lb_data
|
||||
|
||||
def _update_load_balancer_and_validate(self, lb_data,
|
||||
@ -667,7 +684,6 @@ class TestOvnOctaviaBase(base.TestOVNFunctionalBase,
|
||||
lb.get('external_ids')[
|
||||
ovn_const.LB_EXT_IDS_LR_REF_KEY] = lb_data[
|
||||
ovn_const.LB_EXT_IDS_LR_REF_KEY]
|
||||
|
||||
pool_info = {}
|
||||
for p in lb_data.get('pools', []):
|
||||
member_status = {}
|
||||
|
@ -18,6 +18,7 @@ import multiprocessing as mp
|
||||
|
||||
from neutron.common import utils as n_utils
|
||||
from oslo_utils import uuidutils
|
||||
import testtools
|
||||
|
||||
from ovn_octavia_provider import agent as ovn_agent
|
||||
from ovn_octavia_provider.common import config as ovn_config
|
||||
@ -51,29 +52,39 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
|
||||
def _test_lrp_event_handler(self, cascade=False):
|
||||
# Create Network N1 on router R1 and LBA on N1
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
lba_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
|
||||
# Create Network N2, connect it to R1
|
||||
network_N2 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info2 = self._create_subnet_from_net(
|
||||
network_N2, "10.0.1.0/24", router_id=r1_id)
|
||||
network_id2, subnet2_id = self._create_subnet_from_net(
|
||||
network_N2, '10.0.1.0/24')
|
||||
port_address2, port_id2 = self._create_port_on_network(network_N2)
|
||||
|
||||
# Create Network N3
|
||||
network_N3 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
network_id3, subnet3_id = self._create_subnet_from_net(
|
||||
network_N3, '10.0.2.0/24')
|
||||
port_address3, port_id3 = self._create_port_on_network(network_N3)
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet2_id, r1_id)
|
||||
|
||||
lba_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
# Check if LBA exists in N2 LS
|
||||
n_utils.wait_until_true(
|
||||
lambda: self._is_lb_associated_to_ls(
|
||||
lba_data['model'].loadbalancer_id,
|
||||
ovn_const.LR_REF_KEY_HEADER + sbnet_info2[0]),
|
||||
ovn_const.LR_REF_KEY_HEADER + network_id2),
|
||||
timeout=10)
|
||||
|
||||
network_N3 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info3 = self._create_subnet_from_net(
|
||||
network_N3, '10.0.2.0/24')
|
||||
# Create Network N3
|
||||
lbb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info3, multiple_lb=True)
|
||||
network_id3, subnet3_id, port_address3, port_id3, multiple_lb=True)
|
||||
# Add N3 to R1
|
||||
self.l3_plugin.add_router_interface(
|
||||
self.context, lba_data[
|
||||
@ -103,7 +114,7 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
n_utils.wait_until_true(
|
||||
lambda: self._is_lb_associated_to_ls(
|
||||
lbb_data['model'].loadbalancer_id,
|
||||
ovn_const.LR_REF_KEY_HEADER + sbnet_info2[0]),
|
||||
ovn_const.LR_REF_KEY_HEADER + network_id2),
|
||||
timeout=10)
|
||||
|
||||
lbb_id = lbb_data['model'].loadbalancer_id
|
||||
@ -133,7 +144,7 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
# Check LBB not connected to N2
|
||||
n_utils.wait_until_true(
|
||||
lambda: not self._is_lb_associated_to_ls(
|
||||
lbb_id, ovn_const.LR_REF_KEY_HEADER + sbnet_info2[0]),
|
||||
lbb_id, ovn_const.LR_REF_KEY_HEADER + network_id2),
|
||||
timeout=10)
|
||||
|
||||
def test_lrp_event_handler_with_interface_delete(self):
|
||||
@ -142,14 +153,22 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
def test_lrp_event_handler_with_loadbalancer_cascade_delete(self):
|
||||
self._test_lrp_event_handler(cascade=True)
|
||||
|
||||
# NOTE(froyo): Test skipped by cross depedency among this patch with this
|
||||
# https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701.
|
||||
# The mentioned one will enable again this test.
|
||||
@testtools.skip(
|
||||
'https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701')
|
||||
def test_lrp_event_handler_lrp_with_external_gateway(self):
|
||||
# Create Network N1 on router R1 and LBA on N1
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
lba_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
lba_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
# Create provider network N2, connect it to R1
|
||||
provider_net, provider_subnet = self._create_provider_network()
|
||||
@ -172,6 +191,11 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
ovn_const.LR_REF_KEY_HEADER + provider_net['network']['id']),
|
||||
timeout=10)
|
||||
|
||||
# NOTE(froyo): Test skipped by cross depedency among this patch with this
|
||||
# https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701.
|
||||
# The mentioned one will enable again this test.
|
||||
@testtools.skip(
|
||||
'https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701')
|
||||
def test_fip_on_lb_vip(self):
|
||||
"""This test checks if FIP on LB VIP is configured.
|
||||
|
||||
@ -179,13 +203,16 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
consist Floating IP address that is configured
|
||||
on LB VIP port.
|
||||
"""
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
# Create a pool
|
||||
self._create_pool_and_validate(lb_data, "p1")
|
||||
pool_id = lb_data['pools'][0].pool_id
|
||||
@ -245,6 +272,11 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
# Make sure that LB1 is not added to provider net - e1 LS
|
||||
self.assertListEqual([], ls.load_balancer)
|
||||
|
||||
# NOTE(froyo): Test skipped by cross depedency among this patch with this
|
||||
# https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701.
|
||||
# The mentioned one will enable again this test.
|
||||
@testtools.skip(
|
||||
'https://review.opendev.org/c/openstack/ovn-octavia-provider/+/911701')
|
||||
def test_fip_on_lb_additional_vip(self):
|
||||
"""This test checks if FIP on LB additional VIP is configured.
|
||||
|
||||
@ -252,21 +284,29 @@ class TestOvnOctaviaProviderAgent(ovn_base.TestOvnOctaviaBase):
|
||||
consist Floating IP address that is configured
|
||||
on LB additional VIP port.
|
||||
"""
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
sbnet_additional_info = self._create_subnet_from_net(
|
||||
network_N1, '10.0.1.0/24', router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
|
||||
network_ida, subnet_ida = self._create_subnet_from_net(
|
||||
network_N1, '10.0.1.0/24')
|
||||
port_addressa, port_ida = self._create_port_on_network(network_N1)
|
||||
additional_vips_list = [{
|
||||
'ip_address': sbnet_additional_info[2],
|
||||
'port_id': sbnet_additional_info[3],
|
||||
'network_id': sbnet_additional_info[0],
|
||||
'subnet_id': sbnet_additional_info[1]
|
||||
'ip_address': port_addressa,
|
||||
'port_id': port_ida,
|
||||
'network_id': network_ida,
|
||||
'subnet_id': subnet_ida
|
||||
}]
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet_ida, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id, additional_vips=additional_vips_list)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id,
|
||||
additional_vips=additional_vips_list)
|
||||
# Create a pool
|
||||
self._create_pool_and_validate(lb_data, "p1")
|
||||
pool_id = lb_data['pools'][0].pool_id
|
||||
|
@ -24,29 +24,35 @@ from ovn_octavia_provider.tests.functional import base as ovn_base
|
||||
class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
|
||||
def test_loadbalancer(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
sbnet_additional_info = self._create_subnet_from_net(
|
||||
network_N1, '2001:db8:0:1::/64', router_id=r1_id,
|
||||
ip_version=n_const.IP_VERSION_6)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
|
||||
network_ida, subnet_ida = self._create_subnet_from_net(
|
||||
network_N1, '2001:db8:0:1::/64', ip_version=n_const.IP_VERSION_6)
|
||||
port_addressa, port_ida = self._create_port_on_network(network_N1)
|
||||
additional_vips_list = [{
|
||||
'ip_address': sbnet_additional_info[2],
|
||||
'port_id': sbnet_additional_info[3],
|
||||
'network_id': sbnet_additional_info[0],
|
||||
'subnet_id': sbnet_additional_info[1]
|
||||
'ip_address': port_addressa,
|
||||
'port_id': port_ida,
|
||||
'network_id': network_ida,
|
||||
'subnet_id': subnet_ida
|
||||
}]
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet_ida, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id, additional_vips=additional_vips_list)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id,
|
||||
additional_vips=additional_vips_list)
|
||||
self._update_load_balancer_and_validate(lb_data, admin_state_up=False)
|
||||
self._update_load_balancer_and_validate(lb_data, admin_state_up=True)
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
# create load balance with admin state down
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id, admin_state_up=False)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id,
|
||||
admin_state_up=False)
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def test_create_lb_custom_network(self):
|
||||
@ -61,14 +67,17 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
|
||||
def test_delete_lb_on_nonexisting_lb(self):
|
||||
# LoadBalancer doesnt exist anymore, so just create a model and delete
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '19.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '19.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id,
|
||||
only_model=True)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id,
|
||||
only_model=True)
|
||||
self.ovn_driver.loadbalancer_delete(lb_data['model'])
|
||||
expected_status = {
|
||||
'loadbalancers': [{"id": lb_data['model'].loadbalancer_id,
|
||||
@ -82,13 +91,15 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._wait_for_status_and_validate(lb_data, [expected_status])
|
||||
|
||||
def test_pool(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
self._create_pool_and_validate(lb_data, "p_TCP_1", protocol='TCP')
|
||||
self._update_pool_and_validate(lb_data, "p_TCP_1")
|
||||
self._create_pool_and_validate(lb_data, "p_UDP_1", protocol='UDP')
|
||||
@ -108,13 +119,28 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def test_member(self):
|
||||
net1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
net1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(net1)
|
||||
net2 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
network_id2, subnet_id2 = self._create_subnet_from_net(
|
||||
net2, '20.0.0.0/24')
|
||||
self._create_port_on_network(net2)
|
||||
|
||||
net3 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
network_id3, subnet_id3 = self._create_subnet_from_net(
|
||||
net3, '30.0.0.0/24')
|
||||
self._create_port_on_network(net3)
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet_id2, r1_id)
|
||||
self._attach_router_to_subnet(subnet_id3, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
# TCP Pool
|
||||
self._create_pool_and_validate(lb_data, "p_TCP", protocol='TCP')
|
||||
@ -181,24 +207,14 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
lb_data, pool_TCP_id, lb_data['vip_net_info'][1],
|
||||
lb_data['vip_net_info'][0], '10.0.0.10')
|
||||
|
||||
# Create new networks and add member to TCP pool from it.
|
||||
net2 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
subnet20_info = self._create_subnet_from_net(
|
||||
net2, '20.0.0.0/24', router_id=r1_id)
|
||||
net20 = subnet20_info[0]
|
||||
subnet20 = subnet20_info[1]
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet20, net20,
|
||||
'20.0.0.4')
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet20, net20,
|
||||
'20.0.0.6')
|
||||
net3 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
subnet30_info = self._create_subnet_from_net(
|
||||
net3, '30.0.0.0/24', router_id=r1_id)
|
||||
net30 = subnet30_info[0]
|
||||
subnet30 = subnet30_info[1]
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet30, net30,
|
||||
'30.0.0.6')
|
||||
self._delete_member_and_validate(lb_data, pool_TCP_id, net20,
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet_id2,
|
||||
network_id2, '20.0.0.4')
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet_id2,
|
||||
network_id2, '20.0.0.6')
|
||||
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id, subnet_id3,
|
||||
network_id3, '30.0.0.6')
|
||||
self._delete_member_and_validate(lb_data, pool_TCP_id, network_id2,
|
||||
'20.0.0.6')
|
||||
|
||||
# Deleting the pool should also delete the members.
|
||||
@ -217,13 +233,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self.assertRaises(o_exceptions.UnsupportedOptionError,
|
||||
self.ovn_driver.member_create, m_member)
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
# TCP Pool
|
||||
self._create_pool_and_validate(lb_data, "p_TCP", protocol='TCP')
|
||||
@ -262,22 +281,29 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def test_hm(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
sbnet_additional_info = self._create_subnet_from_net(
|
||||
network_N1, '2001:db8:0:1::/64', router_id=r1_id,
|
||||
ip_version=n_const.IP_VERSION_6)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
|
||||
network_ida, subnet_ida = self._create_subnet_from_net(
|
||||
network_N1, '2001:db8:0:1::/64', ip_version=n_const.IP_VERSION_6)
|
||||
port_addressa, port_ida = self._create_port_on_network(network_N1)
|
||||
additional_vips_list = [{
|
||||
'ip_address': sbnet_additional_info[2],
|
||||
'port_id': sbnet_additional_info[3],
|
||||
'network_id': sbnet_additional_info[0],
|
||||
'subnet_id': sbnet_additional_info[1]
|
||||
'ip_address': port_addressa,
|
||||
'port_id': port_ida,
|
||||
'network_id': network_ida,
|
||||
'subnet_id': subnet_ida
|
||||
}]
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet_ida, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id, additional_vips=additional_vips_list)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id,
|
||||
additional_vips=additional_vips_list)
|
||||
|
||||
# TCP Pool
|
||||
self._create_pool_and_validate(lb_data, "p_TCP",
|
||||
@ -308,46 +334,51 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_pool_and_validate(lb_data, "p_TCP")
|
||||
|
||||
def test_listener(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.1.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.1.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
network_N2 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
network_id2, subnet_id2 = self._create_subnet_from_net(
|
||||
network_N2, '20.1.0.0/24')
|
||||
self._create_port_on_network(network_N2)
|
||||
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
self._attach_router_to_subnet(subnet_id2, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
self._create_pool_and_validate(lb_data, "p_TCP", protocol='TCP')
|
||||
self._create_pool_and_validate(lb_data, "p_UDP", protocol='UDP')
|
||||
self._create_pool_and_validate(lb_data, "p_SCTP", protocol='SCTP')
|
||||
pool_TCP_id = lb_data['pools'][0].pool_id
|
||||
pool_UDP_id = lb_data['pools'][1].pool_id
|
||||
pool_SCTP_id = lb_data['pools'][2].pool_id
|
||||
network_N2 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
subnet_info = self._create_subnet_from_net(
|
||||
network_N2, '20.1.0.0/24', router_id=r1_id)
|
||||
|
||||
# Create member in TCP pool
|
||||
self._create_member_and_validate(
|
||||
lb_data, pool_TCP_id, lb_data['vip_net_info'][1],
|
||||
lb_data['vip_net_info'][0], '10.1.0.4')
|
||||
self._create_member_and_validate(lb_data, pool_TCP_id,
|
||||
subnet_info[1], subnet_info[0],
|
||||
'20.1.0.4')
|
||||
self._create_member_and_validate(
|
||||
lb_data, pool_TCP_id, subnet_id2, network_id2, '20.1.0.4',)
|
||||
|
||||
# Create member in UDP pool
|
||||
self._create_member_and_validate(
|
||||
lb_data, pool_UDP_id, lb_data['vip_net_info'][1],
|
||||
lb_data['vip_net_info'][0], '10.1.0.4')
|
||||
lb_data['vip_net_info'][0], '10.1.0.5')
|
||||
self._create_member_and_validate(lb_data, pool_UDP_id,
|
||||
subnet_info[1], subnet_info[0],
|
||||
'20.1.0.4')
|
||||
subnet_id2, network_id2,
|
||||
'20.1.0.5')
|
||||
|
||||
# Create member in SCTP pool
|
||||
self._create_member_and_validate(
|
||||
lb_data, pool_SCTP_id, lb_data['vip_net_info'][1],
|
||||
lb_data['vip_net_info'][0], '10.1.0.4')
|
||||
lb_data['vip_net_info'][0], '10.1.0.6')
|
||||
self._create_member_and_validate(lb_data, pool_SCTP_id,
|
||||
subnet_info[1], subnet_info[0],
|
||||
'20.1.0.4')
|
||||
subnet_id2, network_id2,
|
||||
'20.1.0.6')
|
||||
|
||||
# Play around first listener linked to TCP pool
|
||||
self._create_listener_and_validate(
|
||||
@ -395,7 +426,7 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
lb_data, protocol_port=80, protocol='TCP')
|
||||
# Delete TCP pool members
|
||||
self._delete_member_and_validate(lb_data, pool_TCP_id,
|
||||
subnet_info[0], '20.1.0.4')
|
||||
network_id2, '20.1.0.4')
|
||||
self._delete_member_and_validate(lb_data, pool_TCP_id,
|
||||
lb_data['vip_net_info'][0],
|
||||
'10.1.0.4')
|
||||
@ -405,13 +436,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def _test_cascade_delete(self, pool=True, listener=True, member=True):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
if pool:
|
||||
self._create_pool_and_validate(lb_data, "p_TCP", protocol='TCP')
|
||||
@ -450,13 +484,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._test_cascade_delete()
|
||||
|
||||
def test_hm_unsupported_protocol(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
self._create_pool_and_validate(lb_data, "p_SCTP",
|
||||
protocol=o_constants.PROTOCOL_SCTP)
|
||||
@ -471,13 +508,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def test_for_unsupported_options(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
|
||||
m_pool = self._create_pool_model(lb_data['model'].loadbalancer_id,
|
||||
'lb1')
|
||||
@ -498,13 +538,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
self._delete_load_balancer_and_validate(lb_data)
|
||||
|
||||
def test_lb_listener_pool_workflow(self):
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
self._create_listener_and_validate(lb_data)
|
||||
self._create_pool_and_validate(
|
||||
lb_data, "p1", listener_id=lb_data['listeners'][0].listener_id)
|
||||
@ -515,13 +558,16 @@ class TestOvnOctaviaProviderDriver(ovn_base.TestOvnOctaviaBase):
|
||||
|
||||
def test_lb_member_batch_update(self):
|
||||
# Create a LoadBalancer
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(network_N1, '10.0.0.0/24',
|
||||
router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
# Create LB
|
||||
lb_data = self._create_load_balancer_and_validate(sbnet_info,
|
||||
router_id=r1_id)
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
# Create a pool
|
||||
self._create_pool_and_validate(lb_data, "p1")
|
||||
pool_id = lb_data['pools'][0].pool_id
|
||||
|
@ -71,12 +71,15 @@ class TestOvnOctaviaProviderIntegration(ovn_base.TestOvnOctaviaBase):
|
||||
def _loadbalancer_operation(self, lb_data=None, update=False,
|
||||
delete=False):
|
||||
if not lb_data:
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
sbnet_info = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24', router_id=r1_id)
|
||||
network_id, subnet_id = self._create_subnet_from_net(
|
||||
network_N1, '10.0.0.0/24')
|
||||
port_address, port_id = self._create_port_on_network(network_N1)
|
||||
r1_id = self._create_router('r' + uuidutils.generate_uuid()[:4])
|
||||
self._attach_router_to_subnet(subnet_id, r1_id)
|
||||
|
||||
lb_data = self._create_load_balancer_and_validate(
|
||||
sbnet_info, router_id=r1_id)
|
||||
network_id, subnet_id, port_address, port_id, router_id=r1_id)
|
||||
if update:
|
||||
self._update_load_balancer_and_validate(lb_data,
|
||||
admin_state_up=False)
|
||||
@ -110,13 +113,14 @@ class TestOvnOctaviaProviderIntegration(ovn_base.TestOvnOctaviaBase):
|
||||
'network_id': ext_net['id'],
|
||||
'external_fixed_ips': [
|
||||
{'ip_address': '100.0.0.2', 'subnet_id': ext_subnet['id']}]}
|
||||
router_id = self._create_router('routertest', gw_info=gw_info)
|
||||
|
||||
# Create Network N2, connect it to router
|
||||
network_N1 = self._create_net('N' + uuidutils.generate_uuid()[:4])
|
||||
n2_id, sub2_id, p1_ip, p1_id = self._create_subnet_from_net(
|
||||
network_N1, "10.0.1.0/24", router_id)
|
||||
|
||||
n2_id, sub2_id = self._create_subnet_from_net(
|
||||
network_N1, "10.0.1.0/24")
|
||||
router_id = self._create_router('routertest', gw_info=gw_info)
|
||||
self._attach_router_to_subnet(sub2_id, router_id)
|
||||
p1_ip, p1_id = self._create_port_on_network(network_N1)
|
||||
fip_info = {'floatingip': {
|
||||
'tenant_id': self._tenant_id,
|
||||
'floating_network_id': ext_net['id'],
|
||||
|
Loading…
Reference in New Issue
Block a user