summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-07-24 15:34:44 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-07-24 15:34:44 -0600
commit98e6113ce22c22808da9c68c8d3fdc3bc9a7c374 (patch)
treef843803b06cb8b849d640762a1490bdecaa33baf
parentfeae63d11f8295a0d9327496f42949ad5b67fca4 (diff)
Added validation router is attached to the external network.
Verifying that the external network's ID is the same as the 'network_id' value in router.external_gateway_info. JIRA: SNAPS-145 Change-Id: I60795c69679f6e439e6e102115e228a65572db52 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/openstack/utils/tests/neutron_utils_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/snaps/openstack/utils/tests/neutron_utils_tests.py b/snaps/openstack/utils/tests/neutron_utils_tests.py
index e0e68f6..82bb42e 100644
--- a/snaps/openstack/utils/tests/neutron_utils_tests.py
+++ b/snaps/openstack/utils/tests/neutron_utils_tests.py
@@ -318,7 +318,10 @@ class NeutronUtilsRouterTests(OSComponentTestCase):
self.neutron, self.os_creds, self.net_config.router_settings)
validate_router(self.neutron, self.net_config.router_settings.name,
True)
- # TODO - Add validation that the router gatway has been set
+
+ ext_net = neutron_utils.get_network(self.neutron, self.ext_net_name)
+ self.assertEqual(
+ self.router.external_gateway_info['network_id'], ext_net.id)
def test_create_router_empty_name(self):
"""