Allow kwargs in image_create
As a part of the scenario/manager.py stabilization tracked by
the below BP the patch adds kwargs argument for image_create
method so that the consumers are able to pass additional
parameters if needed.
Change-Id: I484b3e93c25da297703835d146f91f5bcb50626f
Implements: blueprint tempest-scenario-manager-stable
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index ff860d5..fdb718d 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -573,7 +573,7 @@
linux_client.validate_authentication()
return linux_client
- def image_create(self, name='scenario-img'):
+ def image_create(self, name='scenario-img', **kwargs):
img_path = CONF.scenario.img_file
if not os.path.exists(img_path):
# TODO(kopecmartin): replace LOG.warning for rasing
@@ -613,6 +613,7 @@
# Additional properties are flattened out in the v2 API.
if img_properties:
params.update(img_properties)
+ params.update(kwargs)
body = self.image_client.create_image(**params)
image = body['image'] if 'image' in body else body
self.addCleanup(self.image_client.delete_image, image['id'])