Refactor network retrieval API calls. 47/38647/2
authorspisarski <s.pisarski@cablelabs.com>
Wed, 2 Aug 2017 19:19:58 +0000 (13:19 -0600)
committerspisarski <s.pisarski@cablelabs.com>
Wed, 2 Aug 2017 20:19:04 +0000 (14:19 -0600)
commit652da5487159d5ee94fe2f8e62c34fdb0d26f4e5
tree2391e24e8bab3c92711fa96f6401b6e1b8c731ef
parent84d902632f1dd77f891c49cfb1d58af5ae051d1a
Refactor network retrieval API calls.

Refactored neutron_utils#get_network() to also accept a
NetworkSettings object for more robust queries in addition to
the old network_name parameter. Also refactored neutron_utils#
get_network_by_id to add in the ID to list_networks((**{'id': id)
and returning the first item contains the expected ID value.

JIRA: SNAPS-161

Change-Id: Ie670a442dd70633bbef7a1233e630672ebac6b0c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
snaps/openstack/create_network.py
snaps/openstack/create_router.py
snaps/openstack/tests/create_network_tests.py
snaps/openstack/utils/neutron_utils.py
snaps/openstack/utils/tests/neutron_utils_tests.py