Add logging and use smallest image to create a vm

Change-Id: I4a950e3192e855d08ec5f42b90288405bf526c84
This commit is contained in:
Eyal 2020-01-08 16:25:16 +02:00
parent e2f585b04a
commit d1b2092c8f
2 changed files with 2 additions and 1 deletions

View File

@ -15,4 +15,4 @@ from vitrage_tempest_plugin.tests.common.tempest_clients import TempestClients
def get_first_image():
return TempestClients.glance().images.list().next()
return next(TempestClients.glance().images.list(sort='size:asc'))

View File

@ -48,6 +48,7 @@ def create_instances(num_instances=1, set_public_network=True, name='vm'):
def _create_instances(flavor, image, name, nics, num_instances):
LOG.info("create instance with flavor=%s image=%s" % (flavor, image))
resources = [TempestClients.nova().servers.create(
name='%s-%s' % (name, index),
flavor=flavor,