Checking functionality of DVR
1) Check traffic pass when the SNAT port is enabled
Disable the port and check the traffic is still passing
2) Check centralized routers on DVR setup works through network
node
Update router to be distributed
Check traffic works when the SNAT port is down
3) Fix test_trunk as the function for creating router changed
Change-Id: I5022f42392c0a076aa4980082640392cad1688a0
diff --git a/neutron/tests/tempest/api/base.py b/neutron/tests/tempest/api/base.py
index 0d77064..49c48d6 100644
--- a/neutron/tests/tempest/api/base.py
+++ b/neutron/tests/tempest/api/base.py
@@ -317,15 +317,16 @@
return body['port']
@classmethod
- def create_router(cls, router_name=None, admin_state_up=False,
- external_network_id=None, enable_snat=None,
- **kwargs):
+ def _create_router_with_client(
+ cls, client, router_name=None, admin_state_up=False,
+ external_network_id=None, enable_snat=None, **kwargs
+ ):
ext_gw_info = {}
if external_network_id:
ext_gw_info['network_id'] = external_network_id
if enable_snat:
ext_gw_info['enable_snat'] = enable_snat
- body = cls.client.create_router(
+ body = client.create_router(
router_name, external_gateway_info=ext_gw_info,
admin_state_up=admin_state_up, **kwargs)
router = body['router']
@@ -333,6 +334,15 @@
return router
@classmethod
+ def create_router(cls, *args, **kwargs):
+ return cls._create_router_with_client(cls.client, *args, **kwargs)
+
+ @classmethod
+ def create_admin_router(cls, *args, **kwargs):
+ return cls._create_router_with_client(cls.admin_manager.network_client,
+ *args, **kwargs)
+
+ @classmethod
def create_floatingip(cls, external_network_id):
"""Wrapper utility that returns a test floating IP."""
body = cls.client.create_floatingip(