From de6536ff2ba4faa1a3d4ed27e93d692cae20e5d2 Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 13 Jul 2017 14:34:01 -0600 Subject: Created domain classes for networks and subnets. Created Network and Subnet domain classes so neutron_utils.py functions returning these types of objects will not be leaking out implementation details as each API version can change these data structures which is now being handled by the SNAPS neutron utility. JIRA: SNAPS-113 Change-Id: Id95dd0f8c2618c20a1a73a428abb95686dfa8251 Signed-off-by: spisarski --- snaps/openstack/create_router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'snaps/openstack/create_router.py') diff --git a/snaps/openstack/create_router.py b/snaps/openstack/create_router.py index 89c3431..db6ffe3 100644 --- a/snaps/openstack/create_router.py +++ b/snaps/openstack/create_router.py @@ -131,7 +131,7 @@ class OpenStackRouter: for internal_subnet in self.__internal_subnets: logger.info( 'Removing router interface from router %s and subnet %s', - self.router_settings.name, internal_subnet['subnet']['name']) + self.router_settings.name, internal_subnet.name) try: neutron_utils.remove_interface_router(self.__neutron, self.__router, @@ -248,7 +248,7 @@ class RouterSettings: ext_net = neutron_utils.get_network(neutron, self.external_gateway, project_id) if ext_net: - ext_gw['network_id'] = ext_net['network']['id'] + ext_gw['network_id'] = ext_net.id out['external_gateway_info'] = ext_gw else: raise Exception( -- cgit 1.2.3-korg