diff --git a/rally-jobs/cinder.yaml b/rally-jobs/cinder.yaml index cdfa32a6..482dfa7c 100755 --- a/rally-jobs/cinder.yaml +++ b/rally-jobs/cinder.yaml @@ -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: diff --git a/rally_openstack/services/storage/cinder_common.py b/rally_openstack/services/storage/cinder_common.py index 9dcf2336..c2ec2d07 100755 --- a/rally_openstack/services/storage/cinder_common.py +++ b/rally_openstack/services/storage/cinder_common.py @@ -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):