Fix cinder volume transfer

Change-Id: I9f843f04fb7a7613cb1b274a969bb71bda8e9564
This commit is contained in:
Andrey Kurilin 2019-11-27 16:36:56 +02:00
parent 55014fc5be
commit 54fc6904ed
2 changed files with 39 additions and 4 deletions

View File

@ -353,6 +353,37 @@
users_per_tenant: 3
{% endfor %}
-
title: CinderVolumes.create_and_accept_transfer tests
workloads:
-
scenario:
CinderVolumes.create_and_accept_transfer:
size: 1
runner:
constant:
times: 2
concurrency: 2
contexts:
users:
tenants: 2
users_per_tenant: 2
-
description: "Create volume from image and accept transfer."
scenario:
CinderVolumes.create_and_accept_transfer:
size: 1
image:
name: {{image_name}}
runner:
constant:
times: 2
concurrency: 2
contexts:
users:
tenants: 2
users_per_tenant: 2
-
title: CinderVolumes.create_and_extend_volume tests
workloads:

View File

@ -475,10 +475,14 @@ class UnifiedCinderMixin(object):
@staticmethod
def _unify_transfer(transfer):
auth_key = transfer.auth_key if hasattr(transfer, "auth_key") else None
return block.VolumeTransfer(id=transfer.id, name=transfer.name,
volume_id=transfer.volume_id,
auth_key=auth_key)
return block.VolumeTransfer(
id=transfer.id,
name=transfer.name,
volume_id=transfer.volume_id,
# NOTE(andreykurilin): we need to access private field to avoid
# calling extra GET request when the object is not not fully
# loaded.
auth_key=transfer._info.get("auth_key"))
@staticmethod
def _unify_qos(qos):