aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2018-08-09 02:59:02 +0000
committerrexlee8776 <limingjiang@huawei.com>2018-08-09 02:59:02 +0000
commitc64d9932ed2fdc4823691adf529d00390f1de53c (patch)
treec92c551c08f0fc3cfaf78f7136a1328d9d63c066
parentc4e5cb946f068c59ebf29274cdf4c9f860a0b07a (diff)
Bugfix: pylint fix for yardstick/orchestrator/heat.py (no-value-for-parameter)
Problem op_utils.get_volume_id takes 2 arguments and only pass 1. This would cause tc006 fail! volume_id = op_utils.get_volume_id(volume_name) it will cause: Running pylint... You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~0, this change only)... Using config file /home/opnfv/repos/yardstick/.pylintrc ************* Module yardstick.orchestrator.heat E:235,20: No value for argument 'volume_name' in function call (no-value-for-parameter) To Do It doesn't need to call get_volume_id here, just use heat get_resource would be enough. This fix should work with tc006 test case. JIRA: YARDSTICK-1371 Change-Id: I913ffd085f742ae4464dbcc4269719e2c50e37b5 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
-rw-r--r--yardstick/orchestrator/heat.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py
index e0c0db262..99a5760a3 100644
--- a/yardstick/orchestrator/heat.py
+++ b/yardstick/orchestrator/heat.py
@@ -227,14 +227,10 @@ name (i.e. %s).
def add_volume_attachment(self, server_name, volume_name, mountpoint=None):
"""add to the template an association of volume to instance"""
- log.debug("adding Cinder::VolumeAttachment server '%s' volume '%s' ", server_name,
- volume_name)
-
+ log.debug("adding Cinder::VolumeAttachment server '%s' volume '%s' ",
+ server_name, volume_name)
name = "%s-%s" % (server_name, volume_name)
-
- volume_id = op_utils.get_volume_id(volume_name)
- if not volume_id:
- volume_id = {'get_resource': volume_name}
+ volume_id = {'get_resource': volume_name}
self.resources[name] = {
'type': 'OS::Cinder::VolumeAttachment',
'properties': {'instance_uuid': {'get_resource': server_name},