Merge "Use atomic actions in cinder contexts"

This commit is contained in:
Zuul 2017-12-19 03:21:08 +00:00 committed by Gerrit Code Review
commit 81168c1901
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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)