Merge "Allow kwargs in create_server_snapshot"

This commit is contained in:
Zuul 2020-12-04 10:29:35 +00:00 committed by Gerrit Code Review
commit 400459c7d7
1 changed files with 2 additions and 2 deletions

View File

@ -655,7 +655,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
if not isinstance(exc, lib_exc.SSHTimeout): if not isinstance(exc, lib_exc.SSHTimeout):
LOG.debug('Network information on a devstack host') 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""" """Creates server snapshot"""
# Glance client # Glance client
_image_client = self.image_client _image_client = self.image_client
@ -664,7 +664,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
if name is None: if name is None:
name = data_utils.rand_name(self.__class__.__name__ + 'snapshot') name = data_utils.rand_name(self.__class__.__name__ + 'snapshot')
LOG.debug("Creating a snapshot image for server: %s", server['name']) 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] image_id = image.response['location'].split('images/')[1]
waiters.wait_for_image_status(_image_client, image_id, 'active') waiters.wait_for_image_status(_image_client, image_id, 'active')