diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-07-13 09:02:40 -0600 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-07-13 09:02:40 -0600 |
commit | 7f989290a14c836b4982e1548d24c9c09f9a0068 (patch) | |
tree | 838f47b7af5137f5b0dd1b841a70642d7169e783 /snaps/openstack/utils/tests/neutron_utils_tests.py | |
parent | e6326cd5e826d19e4dd2b096c17aff35da1757b3 (diff) |
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 <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/utils/tests/neutron_utils_tests.py')
-rw-r--r-- | snaps/openstack/utils/tests/neutron_utils_tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |