From ebf6885a907379083b360ae729f69151c1dd8115 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Thu, 6 Sep 2018 14:44:48 +0300 Subject: Replace neutron client calls with openstack sdk JIRA: SDNVPN-220 This patch replaces almost all calls of neutron client with openstack sdk. The calls regarding bgpvpn are not replaced due to lack of support from openstack sdk at the moment. Change-Id: Idf52b8c57b895f87ba6320e350bf170faa24d0a7 Signed-off-by: Stamatis Katsaounis --- sdnvpn/test/functest/testcase_1.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sdnvpn/test/functest/testcase_1.py') diff --git a/sdnvpn/test/functest/testcase_1.py b/sdnvpn/test/functest/testcase_1.py index 1ba90af..b524abf 100644 --- a/sdnvpn/test/functest/testcase_1.py +++ b/sdnvpn/test/functest/testcase_1.py @@ -33,7 +33,6 @@ def main(): results.add_to_summary(0, "=") neutron_client = os_utils.get_neutron_client() - conn = os_utils.get_os_connection() (floatingip_ids, instance_ids, router_ids, network_ids, image_ids, subnet_ids, interfaces, bgpvpn_ids) = ([] for i in range(8)) @@ -45,17 +44,17 @@ def main(): container="bare", public='public') image_ids.append(image_id) - network_1_id = test_utils.create_net(neutron_client, + network_1_id = test_utils.create_net(conn, TESTCASE_CONFIG.net_1_name) - subnet_1_id = test_utils.create_subnet(neutron_client, + subnet_1_id = test_utils.create_subnet(conn, TESTCASE_CONFIG.subnet_1_name, TESTCASE_CONFIG.subnet_1_cidr, network_1_id) - network_2_id = test_utils.create_net(neutron_client, + network_2_id = test_utils.create_net(conn, TESTCASE_CONFIG.net_2_name) - subnet_2_id = test_utils.create_subnet(neutron_client, + subnet_2_id = test_utils.create_subnet(conn, TESTCASE_CONFIG.subnet_2_name, TESTCASE_CONFIG.subnet_2_cidr, network_2_id) @@ -63,7 +62,7 @@ def main(): subnet_ids.extend([subnet_1_id, subnet_2_id]) sg_id = os_utils.create_security_group_full( - neutron_client, TESTCASE_CONFIG.secgroup_name, + conn, TESTCASE_CONFIG.secgroup_name, TESTCASE_CONFIG.secgroup_descr) compute_nodes = test_utils.assert_and_get_compute_nodes(conn) @@ -246,7 +245,7 @@ def main(): finally: test_utils.cleanup_nova(conn, instance_ids) test_utils.cleanup_glance(conn, image_ids) - test_utils.cleanup_neutron(neutron_client, floatingip_ids, + test_utils.cleanup_neutron(conn, neutron_client, floatingip_ids, bgpvpn_ids, interfaces, subnet_ids, router_ids, network_ids) -- cgit 1.2.3-korg