From f907db26a37d7342fedd2abb3d991f338d9f410e Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Fri, 15 Dec 2017 15:28:09 +0200 Subject: [PATCH] Use atomic actions in cinder contexts Change-Id: I5e5402df7dab13315b39b6be866f921b0ba56ff1 --- rally/plugins/openstack/context/cinder/volume_types.py | 4 +++- rally/plugins/openstack/context/cinder/volumes.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rally/plugins/openstack/context/cinder/volume_types.py b/rally/plugins/openstack/context/cinder/volume_types.py index 1bea9ff2..1f51538e 100644 --- a/rally/plugins/openstack/context/cinder/volume_types.py +++ b/rally/plugins/openstack/context/cinder/volume_types.py @@ -41,7 +41,9 @@ class VolumeTypeGenerator(context.Context): self.context.get("admin", {}).get("credential"), api_info=self.context["config"].get("api_versions")) cinder_service = block.BlockStorage( - admin_clients, name_generator=self.generate_random_name) + admin_clients, + name_generator=self.generate_random_name, + atomic_inst=self.atomic_actions()) self.context["volume_types"] = [] for vtype_name in self.config: LOG.debug("Creating Cinder volume type %s" % vtype_name) diff --git a/rally/plugins/openstack/context/cinder/volumes.py b/rally/plugins/openstack/context/cinder/volumes.py index fe076761..44295fd0 100644 --- a/rally/plugins/openstack/context/cinder/volumes.py +++ b/rally/plugins/openstack/context/cinder/volumes.py @@ -65,7 +65,9 @@ class VolumeGenerator(context.Context): user["credential"], api_info=self.context["config"].get("api_versions")) cinder_service = block.BlockStorage( - clients, name_generator=self.generate_random_name) + clients, + name_generator=self.generate_random_name, + atomic_inst=self.atomic_actions()) for i in range(volumes_per_tenant): vol = cinder_service.create_volume(size, volume_type=volume_type)