From c64d9932ed2fdc4823691adf529d00390f1de53c Mon Sep 17 00:00:00 2001 From: rexlee8776 Date: Thu, 9 Aug 2018 02:59:02 +0000 Subject: 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 --- yardstick/orchestrator/heat.py | 10 +++------- 1 file 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}, -- cgit 1.2.3-korg