Fix bug clean_openstack if there are no networks.
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 17 Dec 2015 12:54:34 +0000 (13:54 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 17 Dec 2015 12:54:34 +0000 (13:54 +0100)
Change-Id: I0acbfb68142f138d1f866bf40d708bf762de2e1b
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
testcases/VIM/OpenStack/CI/libraries/clean_openstack.py

index 45617c5..ffc7082 100644 (file)
@@ -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']