From c25140b27229ce85ecbcabfe5af84622b36f0209 Mon Sep 17 00:00:00 2001 From: Catalina Focsa Date: Mon, 28 Aug 2017 14:31:12 +0200 Subject: Add UEFI support in functest Add extra properties to the cirros image for ARM architecture. In the glanceclient repository, the create method expects **kwargs as parameters, thus an extra_properties variable containing a dictionary of property-value pairs can be added (if given) to the image to be created. If the properties do not appear, the call should not affect the image properties because the dictionary is initialized as empty. Change-Id: I690da90e6c6f250bd0a3d99cce39aa250e19b9c2 Signed-off-by: Catalina Focsa --- functest/opnfv_tests/openstack/rally/rally.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'functest/opnfv_tests/openstack/rally/rally.py') diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index fdef8bed..2042b2d1 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -42,6 +42,10 @@ class RallyBase(testcase.OSGCTestCase): CONST.__getattribute__('dir_functest_images'), GLANCE_IMAGE_FILENAME) GLANCE_IMAGE_FORMAT = CONST.__getattribute__('openstack_image_disk_format') + GLANCE_IMAGE_EXTRA_PROPERTIES = {} + if hasattr(CONST, 'openstack_extra_properties'): + GLANCE_IMAGE_EXTRA_PROPERTIES = CONST.__getattribute__( + 'openstack_extra_properties') FLAVOR_NAME = "m1.tiny" RALLY_DIR = pkg_resources.resource_filename( @@ -462,7 +466,8 @@ class RallyBase(testcase.OSGCTestCase): self.image_exists, self.image_id = os_utils.get_or_create_image( self.GLANCE_IMAGE_NAME, self.GLANCE_IMAGE_PATH, - self.GLANCE_IMAGE_FORMAT) + self.GLANCE_IMAGE_FORMAT, + self.GLANCE_IMAGE_EXTRA_PROPERTIES) if self.image_id is None: raise Exception("Failed to get or create image '%s'" % self.GLANCE_IMAGE_NAME) -- cgit 1.2.3-korg