summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-06-28 13:17:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-28 13:17:00 +0000
commit85fc78459cb3e3df72a6cb5c793d19ae41ddd7dd (patch)
tree46ad35179f1078e606c201a0cecae1c6c07fa253
parentb5e7619baeecec2494994caba86df275fa197c99 (diff)
parent71737f23f718791a554edf374ee0c28bb77c9773 (diff)
Merge "Clean up stale routers and gateway routers."
-rw-r--r--sdnvpn/test/functest/run_sdnvpn_tests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py
index 23a62e6..c05876d 100644
--- a/sdnvpn/test/functest/run_sdnvpn_tests.py
+++ b/sdnvpn/test/functest/run_sdnvpn_tests.py
@@ -71,6 +71,24 @@ class SdnvpnFunctest(feature.Feature):
os_utils.delete_floating_ip(
neutron_client, floating_ip['id'])
+ # Workaround for
+ # https://jira.opnfv.org/browse/SNAPS-318
+ # Clean up the stale routers
+ logger.info("Cleaning up the stale routers")
+ ports = os_utils.get_port_list(neutron_client)
+ if ports is not None:
+ for port in ports:
+ if port['device_owner'] == 'network:router_interface':
+ os_utils.delete_neutron_port(
+ neutron_client, port['id'])
+ routers = os_utils.get_router_list(neutron_client)
+ if routers is not None:
+ for router in routers:
+ os_utils.remove_gateway_router(
+ neutron_client, router['id'])
+ os_utils.delete_neutron_router(
+ neutron_client, router['id'])
+
with open(COMMON_CONFIG.config_file) as f:
config_yaml = yaml.safe_load(f)