Use atomic actions in cinder contexts
Change-Id: I5e5402df7dab13315b39b6be866f921b0ba56ff1
This commit is contained in:
parent
c35a59558c
commit
f907db26a3
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user