Allow kwargs in boot_instance_from_resource
As a part of the scenario/manager.py stabilization tracked by the
below BP the patch adds kwargs argument for boot_instance_from_resource
method so that the consumers are able to pass additional parameters
if needed.
Implements: blueprint tempest-scenario-manager-stable
Change-Id: I1db7209bc9639211983b0cb39264962add6f3363
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index ff860d5..6a89e54 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -916,14 +916,14 @@
keypair=None,
security_group=None,
delete_on_termination=False,
- name=None):
+ name=None, **kwargs):
"""Boot instance from resource
This wrapper utility boots instance from resource with block device
mapping with source info passed in arguments
"""
- create_kwargs = dict()
+ create_kwargs = dict({'image_id': ''})
if keypair:
create_kwargs['key_name'] = keypair['name']
if security_group:
@@ -935,8 +935,9 @@
delete_on_termination=delete_on_termination))
if name:
create_kwargs['name'] = name
+ create_kwargs.update(kwargs)
- return self.create_server(image_id='', **create_kwargs)
+ return self.create_server(**create_kwargs)
def create_volume_from_image(self):
"""Create volume from image"""