From 6a9072400a0bc86b6b34584150bd0858b6834ac8 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Thu, 17 Dec 2015 13:54:34 +0100 Subject: Fix bug clean_openstack if there are no networks. Change-Id: I0acbfb68142f138d1f866bf40d708bf762de2e1b Signed-off-by: jose.lausuch --- testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index 45617c5ba..ffc7082ad 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -149,6 +149,10 @@ def remove_networks(neutron_client): logger.info("Removing Neutron objects") network_ids = [] networks = functest_utils.get_network_list(neutron_client) + if networks == None: + logger.debug("There are no networks in the deployment. ") + return + logger.debug("Existing networks:") for network in networks: net_id = network['id'] -- cgit 1.2.3-korg