diff options
author | Shobhi Jain <shobhi.jain@intel.com> | 2018-04-06 11:41:54 +0100 |
---|---|---|
committer | Shobhi Jain <shobhi.jain@intel.com> | 2018-05-08 08:21:01 +0000 |
commit | be197a6197e803b6334f2ccf72f561245ef7aac7 (patch) | |
tree | 1c270f9a8e3f00c270ed643c64b4e4d7ae08aa4a /yardstick/common/openstack_utils.py | |
parent | 5c57c5a51f9a492cdb05207ba37a765b425db40f (diff) |
Replace cinder get_volume_id with shade client.
Function get_volume_id now uses shade client.
JIRA: YARDSTICK-891
Change-Id: I45ae40982a64f677dbbdeb6c9510a0ec9ac973f1
Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
Diffstat (limited to 'yardstick/common/openstack_utils.py')
-rw-r--r-- | yardstick/common/openstack_utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py index 53f0ccc34..5a83ddb24 100644 --- a/yardstick/common/openstack_utils.py +++ b/yardstick/common/openstack_utils.py @@ -784,9 +784,8 @@ def list_images(shade_client=None): # ********************************************* # CINDER # ********************************************* -def get_volume_id(volume_name): # pragma: no cover - volumes = get_cinder_client().volumes.list() - return next((v.id for v in volumes if v.name == volume_name), None) +def get_volume_id(shade_client, volume_name): + return shade_client.get_volume_id(volume_name) def create_volume(cinder_client, volume_name, volume_size, |