Added validation router is attached to the external network. 19/38019/1
authorspisarski <s.pisarski@cablelabs.com>
Mon, 24 Jul 2017 21:34:44 +0000 (15:34 -0600)
committerspisarski <s.pisarski@cablelabs.com>
Mon, 24 Jul 2017 21:34:44 +0000 (15:34 -0600)
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>
snaps/openstack/utils/tests/neutron_utils_tests.py

index e0e68f6..82bb42e 100644 (file)
@@ -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):
         """