Add Active Active L3 GW scenario test cases
Depends-On: I34e2453ab206c13c3ca40c4181970c320bdd8e67
Change-Id: Idba4e48c22f8668ed2565e0c97e53a438b6746e7
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py
index 7f056d1..7af3711 100644
--- a/neutron_tempest_plugin/api/base.py
+++ b/neutron_tempest_plugin/api/base.py
@@ -875,9 +875,10 @@
association['fixed_port_id'])
@classmethod
- def create_router_interface(cls, router_id, subnet_id):
+ def create_router_interface(cls, router_id, subnet_id, client=None):
"""Wrapper utility that returns a router interface."""
- interface = cls.client.add_router_interface_with_subnet_id(
+ client = client or cls.client
+ interface = client.add_router_interface_with_subnet_id(
router_id, subnet_id)
return interface
@@ -1350,13 +1351,14 @@
@classmethod
def create_provider_network(cls, physnet_name, start_segmentation_id,
- max_attempts=30):
+ max_attempts=30, external=False):
segmentation_id = start_segmentation_id
for attempts in range(max_attempts):
try:
return cls.create_network(
name=data_utils.rand_name('test_net'),
- shared=True,
+ shared=not external,
+ external=external,
provider_network_type='vlan',
provider_physical_network=physnet_name,
provider_segmentation_id=segmentation_id)
diff --git a/neutron_tempest_plugin/api/test_routers.py b/neutron_tempest_plugin/api/test_routers.py
index 66cea78..7758b1a 100644
--- a/neutron_tempest_plugin/api/test_routers.py
+++ b/neutron_tempest_plugin/api/test_routers.py
@@ -329,13 +329,10 @@
class ExternalGWMultihomingRoutersTest(base_routers.BaseRouterTest):
@classmethod
+ @tutils.requires_ext(extension="external-gateway-multihoming",
+ service="network")
def setUpClass(cls):
super().setUpClass()
- ext_alias = 'external-gateway-multihoming'
- try:
- cls.client.get_extension(ext_alias)
- except lib_exc.NotFound:
- raise cls.skipException(f'{ext_alias} extension not available.')
@decorators.idempotent_id('33e9a156-a83f-435f-90ee-1a49dc9c350d')
def test_create_router_enable_default_route_ecmp(self):