Allow kwargs in create_server_snapshot

As a part of the scenario/manager.py stabilization tracked by
the below BP the patch adds kwargs argument for create_server_snapshot
method so that the consumers are able to pass additional
parameters if needed.

Implements: blueprint tempest-scenario-manager-stable

Change-Id: I0ae3f86c546be6b3f5b1d427568cfdf2d26e37e0
This commit is contained in:
Lukas Piwowarski 2020-10-29 15:36:30 +00:00
parent b439c974fa
commit 9ad9ca2771
1 changed files with 2 additions and 2 deletions

View File

@ -649,7 +649,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
if not isinstance(exc, lib_exc.SSHTimeout):
LOG.debug('Network information on a devstack host')
def create_server_snapshot(self, server, name=None):
def create_server_snapshot(self, server, name=None, **kwargs):
"""Creates server snapshot"""
# Glance client
_image_client = self.image_client
@ -658,7 +658,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
if name is None:
name = data_utils.rand_name(self.__class__.__name__ + 'snapshot')
LOG.debug("Creating a snapshot image for server: %s", server['name'])
image = _images_client.create_image(server['id'], name=name)
image = _images_client.create_image(server['id'], name=name, **kwargs)
image_id = image.response['location'].split('images/')[1]
waiters.wait_for_image_status(_image_client, image_id, 'active')