summaryrefslogtreecommitdiffstats
path: root/sdnvpn/test
diff options
context:
space:
mode:
authorpanageo2 <panageo@intracom-telecom.com>2017-06-28 12:34:55 +0000
committerpanageo2 <panageo@intracom-telecom.com>2017-06-28 13:05:53 +0000
commit916e904bea22193e8160894f8eea999bf965cde2 (patch)
tree496210ba7aaf5880a6a520ff55cf819f2fef4672 /sdnvpn/test
parent4a6bb979b45c3b7f00f9dcc9519f439b3d405189 (diff)
Transfer utils functions from functest
Transfer functions: - create_bgpvpn - create_network_association - create_router_association - update_bgpvpn - delete_bgpvpn - get_bgpvpn - get_bgpvpn_routers - get_bgpvpn_networks from functest/utils/openstack_utils.py to sdnvpn/lib/utils.py JIRA: SDNVPN-164 JIRA: FUNCTEST-840 Change-Id: Ic64d8ee85e74601b0fe51e1c452cf83fa6b0203b Signed-off-by: panageo2 <panageo@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/test')
-rw-r--r--sdnvpn/test/functest/testcase_1.py8
-rw-r--r--sdnvpn/test/functest/testcase_2.py8
-rw-r--r--sdnvpn/test/functest/testcase_4.py8
-rw-r--r--sdnvpn/test/functest/testcase_7.py9
-rw-r--r--sdnvpn/test/functest/testcase_8.py6
5 files changed, 20 insertions, 19 deletions
diff --git a/sdnvpn/test/functest/testcase_1.py b/sdnvpn/test/functest/testcase_1.py
index 2cd03b6..467c311 100644
--- a/sdnvpn/test/functest/testcase_1.py
+++ b/sdnvpn/test/functest/testcase_1.py
@@ -150,7 +150,7 @@ def main():
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name
}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -159,7 +159,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_1_id)
# Wait for VMs to get ips.
@@ -179,7 +179,7 @@ def main():
results.add_to_summary(0, "-")
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_net_assocs(neutron_client,
@@ -203,7 +203,7 @@ def main():
kwargs = {"import_targets": TESTCASE_CONFIG.targets1,
"export_targets": TESTCASE_CONFIG.targets1,
"name": vpn_name}
- bgpvpn = os_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
+ bgpvpn = test_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
logger.info("Waiting for the VMs to connect to each other using the"
" updated network configuration")
diff --git a/sdnvpn/test/functest/testcase_2.py b/sdnvpn/test/functest/testcase_2.py
index 61d81a3..f8d53de 100644
--- a/sdnvpn/test/functest/testcase_2.py
+++ b/sdnvpn/test/functest/testcase_2.py
@@ -181,7 +181,7 @@ def main():
"route_targets": TESTCASE_CONFIG.targets2,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers1,
"name": vpn1_name}
- bgpvpn1 = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn1 = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn1_id = bgpvpn1['bgpvpn']['id']
logger.debug("VPN1 created details: %s" % bgpvpn1)
bgpvpn_ids.append(bgpvpn1_id)
@@ -190,7 +190,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn1_id, network_1_id)
# Wait for VMs to get ips.
@@ -224,7 +224,7 @@ def main():
"route_targets": TESTCASE_CONFIG.targets1,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers2,
"name": vpn2_name}
- bgpvpn2 = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn2 = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn2_id = bgpvpn2['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn2)
bgpvpn_ids.append(bgpvpn2_id)
@@ -233,7 +233,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn2_id, network_2_id)
test_utils.wait_for_bgp_net_assoc(neutron_client, bgpvpn1_id, network_1_id)
diff --git a/sdnvpn/test/functest/testcase_4.py b/sdnvpn/test/functest/testcase_4.py
index 69c3461..871a4bb 100644
--- a/sdnvpn/test/functest/testcase_4.py
+++ b/sdnvpn/test/functest/testcase_4.py
@@ -154,7 +154,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets2,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -163,7 +163,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_router_association(
+ test_utils.create_router_association(
neutron_client, bgpvpn_id, router_1_id)
# Wait for VMs to get ips.
@@ -183,7 +183,7 @@ def main():
results.add_to_summary(0, "-")
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_router_assoc(
@@ -207,7 +207,7 @@ def main():
kwargs = {"import_targets": TESTCASE_CONFIG.targets1,
"export_targets": TESTCASE_CONFIG.targets1,
"name": vpn_name}
- bgpvpn = os_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
+ bgpvpn = test_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
logger.info("Waiting for the VMs to connect to each other using the"
" updated network configuration")
diff --git a/sdnvpn/test/functest/testcase_7.py b/sdnvpn/test/functest/testcase_7.py
index 48e26d5..07bb257 100644
--- a/sdnvpn/test/functest/testcase_7.py
+++ b/sdnvpn/test/functest/testcase_7.py
@@ -117,7 +117,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -128,9 +128,9 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_1_id)
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_net_assoc(
@@ -154,7 +154,8 @@ def main():
results.add_to_summary(0, '-')
fip = os_utils.create_floating_ip(neutron_client)
- fip_added = os_utils.add_floating_ip(nova_client, vm_2.id, fip['fip_addr'])
+ fip_added = os_utils.add_floating_ip(nova_client, vm_2.id,
+ fip['fip_addr'])
if fip_added:
results.add_success(msg)
else:
diff --git a/sdnvpn/test/functest/testcase_8.py b/sdnvpn/test/functest/testcase_8.py
index f08ead2..6961546 100644
--- a/sdnvpn/test/functest/testcase_8.py
+++ b/sdnvpn/test/functest/testcase_8.py
@@ -116,7 +116,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -127,9 +127,9 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_router_association(
+ test_utils.create_router_association(
neutron_client, bgpvpn_id, router_1_id)
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_router_assoc(