summaryrefslogtreecommitdiffstats
path: root/sdnvpn/test/functest/testcase_1.py
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-09-06 14:44:48 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-09 16:40:10 +0300
commitebf6885a907379083b360ae729f69151c1dd8115 (patch)
tree715f7716028fff85e2e3e44045ad55dff916c1d8 /sdnvpn/test/functest/testcase_1.py
parentc05105a4f9f51f7bb31cad791e65d664e5a3bc4b (diff)
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 <mokats@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/test/functest/testcase_1.py')
-rw-r--r--sdnvpn/test/functest/testcase_1.py13
1 files changed, 6 insertions, 7 deletions
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)