summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-05-23 12:28:50 +0200
committerPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-05-23 12:29:04 +0000
commit352c59535785950f9af57838ceaced3b040ca238 (patch)
treef16be743ba110103f2a78acfa57ad8ea18581c7b
parente617beda206166f291433f58081e48ac50e48dbb (diff)
potential fix for attaching router with external network gateway
In the CI environment, whenever testcases attaches a router with external network gateway sometimes it throws the error "No more IP addresses available on network". This could be due to stale floating ip's exist in the deployment which is cleaned up now before executing sdnvpn testsuite. JIRA: SDNVPN-212 Change-Id: I027a833f13b1bdddd83dc8c7e7f7292e20b10bb8 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> (cherry picked from commit 1bf65fd6d92cdf2c0ad694662cbc12b7764e3364)
-rw-r--r--sdnvpn/test/functest/run_sdnvpn_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py
index 211269e..8e55b2d 100644
--- a/sdnvpn/test/functest/run_sdnvpn_tests.py
+++ b/sdnvpn/test/functest/run_sdnvpn_tests.py
@@ -60,6 +60,14 @@ class SdnvpnFunctest(feature.Feature):
nova_client,
COMMON_CONFIG.nova_instances_quota_class)
+ # Clean up the stale floating ip's so that required
+ # ip addresses are available for sdnvpn testcases
+ floating_ips = os_utils.get_floating_ips(neutron_client)
+ if floating_ips is not None:
+ for floating_ip in floating_ips:
+ os_utils.delete_floating_ip(
+ neutron_client, floating_ip['id'])
+
with open(COMMON_CONFIG.config_file) as f:
config_yaml = yaml.safe_load(f)