aboutsummaryrefslogtreecommitdiffstats
path: root/utils/openstack_utils.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-07-20 13:37:41 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-07-20 13:58:18 +0200
commit4cd8b20676cf12bbbf6ab281700220fd61174e7a (patch)
tree6f64f7d72e5eecfc1daa8581c379db275ad8eca6 /utils/openstack_utils.py
parent76a691ab6bba6bf0eca9e04ebb5632647ccf8ba6 (diff)
Remove logger as input parameter of functions in openstack_utils
JIRA: FUNCTEST-376 Also some fixes to get rid of flake8 violations in onos-sfc Change-Id: I52c2fd30a6b81af20ea779db2d73b9386524f7ce Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils/openstack_utils.py')
-rw-r--r--utils/openstack_utils.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py
index a0de8731..d14828db 100644
--- a/utils/openstack_utils.py
+++ b/utils/openstack_utils.py
@@ -146,9 +146,8 @@ def get_instance_status(nova_client, instance):
try:
instance = nova_client.servers.get(instance.id)
return instance.status
- except:
- # logger.error("Error [get_instance_status(nova_client, '%s')]:" %
- # str(instance)), e
+ except Exception, e:
+ logger.error("Error [get_instance_status(nova_client)]: %s" % e)
return None
@@ -588,8 +587,7 @@ def remove_gateway_router(neutron_client, router_id):
return False
-def create_network_full(logger,
- neutron_client,
+def create_network_full(neutron_client,
net_name,
subnet_name,
router_name,
@@ -736,7 +734,7 @@ def create_secgroup_rule(neutron_client, sg_id, direction, protocol,
return False
-def create_security_group_full(logger, neutron_client,
+def create_security_group_full(neutron_client,
sg_name, sg_description):
sg_id = get_security_group_id(neutron_client, sg_name)
if sg_id != '':
@@ -835,7 +833,7 @@ def get_image_id(glance_client, image_name):
def create_glance_image(glance_client, image_name, file_path, disk="qcow2",
- container="bare", public=True, logger=None):
+ container="bare", public=True):
if not os.path.isfile(file_path):
logger.error("Error: file %s does not exist." % file_path)
return False