From 8a6c7a2be06f25f9c8c18a80b1b54c3b3be8b62a Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 2 Mar 2017 12:01:34 -0700 Subject: Added the ability to give the tests the ability to add in flavor metadata. NFVI's configured for OVS/DPDK and fd.io scenarios required special metadata for flavors in order for VM instances to be activated. This patch allows for setting a value to be applied to all tests. With this change, the default value is being removed that only partially addressed this issue. JIRA: SNAPS-38 Change-Id: Ic42944a849f710f631fe7ac6fbefb720a73f0b77 Signed-off-by: spisarski --- snaps/openstack/create_flavor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'snaps/openstack/create_flavor.py') diff --git a/snaps/openstack/create_flavor.py b/snaps/openstack/create_flavor.py index 68a7080..30271c1 100644 --- a/snaps/openstack/create_flavor.py +++ b/snaps/openstack/create_flavor.py @@ -22,7 +22,8 @@ __author__ = 'spisarski' logger = logging.getLogger('create_image') -DEFAULT_METADATA = {'hw:mem_page_size': 'any'} +MEM_PAGE_SIZE_ANY = {'hw:mem_page_size': 'any'} +MEM_PAGE_SIZE_LARGE = {'hw:mem_page_size': 'large'} class OpenStackFlavor: @@ -88,7 +89,7 @@ class FlavorSettings: """ def __init__(self, config=None, name=None, flavor_id='auto', ram=None, disk=None, vcpus=None, ephemeral=0, swap=0, - rxtx_factor=1.0, is_public=True, metadata=DEFAULT_METADATA): + rxtx_factor=1.0, is_public=True, metadata=None): """ Constructor :param config: dict() object containing the configuration settings using the attribute names below as each -- cgit 1.2.3-korg