From 7f989290a14c836b4982e1548d24c9c09f9a0068 Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 13 Jul 2017 09:02:40 -0600 Subject: Created domain class for routers. Created Router domain class so neutron_utils.py functions returning router objects will not be leaking out implementation details as each API version can change these data structures and this should all be handled by the SNAPS neutron utility. JIRA: SNAPS-115 & SNAPS-14 Change-Id: Ib6d36a735d835a6ed4ede489b14e33a261458fed Signed-off-by: spisarski --- snaps/openstack/utils/tests/neutron_utils_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'snaps/openstack/utils/tests/neutron_utils_tests.py') diff --git a/snaps/openstack/utils/tests/neutron_utils_tests.py b/snaps/openstack/utils/tests/neutron_utils_tests.py index 0080b57..f3cacd5 100644 --- a/snaps/openstack/utils/tests/neutron_utils_tests.py +++ b/snaps/openstack/utils/tests/neutron_utils_tests.py @@ -288,7 +288,7 @@ class NeutronUtilsRouterTests(OSComponentTestCase): if self.router: neutron_utils.delete_router(self.neutron, self.router) - validate_router(self.neutron, self.router.get('name'), False) + validate_router(self.neutron, self.router.name, False) if self.port: neutron_utils.delete_port(self.neutron, self.port) @@ -877,13 +877,13 @@ def validate_interface_router(interface_router, router, subnet): """ Returns true if the router ID & subnet ID have been properly included into the interface router object - :param interface_router: the object to validate + :param interface_router: the SNAPS-OO InterfaceRouter domain object :param router: to validate against the interface_router :param subnet: to validate against the interface_router :return: True if both IDs match else False """ - subnet_id = interface_router.get('subnet_id') - router_id = interface_router.get('port_id') + subnet_id = interface_router.subnet_id + router_id = interface_router.port_id return subnet.get('id') == subnet_id and router.get('id') == router_id -- cgit 1.2.3-korg