diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-12-07 07:29:07 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-12-11 09:14:04 +0000 |
commit | 5b735d134a68d9fe2d9ed1d4482686cef9d38873 (patch) | |
tree | 4648e5ae2663d3a7e20349f55bdab2bee42a87ff /functest/opnfv_tests/openstack/rally/rally.py | |
parent | 5f5833f4308322892893fb07aa1898bc1406a32d (diff) |
Set the ram of flavor 1024
The setting of hw:mem_page_size=large indicates larger page sizes
for guest RAM, eg., either 2MB or 1GB on x86.
When tested on compass, 1GB is required.
Change-Id: Iefd2e8ff30e0a496157e0bd118e63ab3c402abab
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/rally/rally.py')
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index a808d036..c16e6d13 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -60,8 +60,12 @@ class RallyBase(testcase.TestCase): FLAVOR_NAME = CONST.__getattribute__('rally_flavor_name') FLAVOR_ALT_NAME = CONST.__getattribute__('rally_flavor_alt_name') FLAVOR_EXTRA_SPECS = None + FLAVOR_RAM = 512 + FLAVOR_RAM_ALT = 1024 if hasattr(CONST, 'flavor_extra_specs'): FLAVOR_EXTRA_SPECS = CONST.__getattribute__('flavor_extra_specs') + FLAVOR_RAM = 1024 + FLAVOR_RAM_ALT = 2048 RALLY_DIR = pkg_resources.resource_filename( 'functest', 'opnfv_tests/openstack/rally') @@ -514,7 +518,7 @@ class RallyBase(testcase.TestCase): LOGGER.debug("Creating flavor '%s'...", self.flavor_name) flavor_creator = OpenStackFlavor( self.os_creds, FlavorConfig( - name=self.flavor_name, ram=512, disk=1, vcpus=1, + name=self.flavor_name, ram=self.FLAVOR_RAM, disk=1, vcpus=1, metadata=self.FLAVOR_EXTRA_SPECS)) if flavor_creator is None or flavor_creator.create() is None: raise Exception("Failed to create flavor") @@ -523,8 +527,8 @@ class RallyBase(testcase.TestCase): LOGGER.debug("Creating flavor '%s'...", self.flavor_alt_name) flavor_alt_creator = OpenStackFlavor( self.os_creds, FlavorConfig( - name=self.flavor_alt_name, ram=1024, disk=1, vcpus=1, - metadata=self.FLAVOR_EXTRA_SPECS)) + name=self.flavor_alt_name, ram=self.FLAVOR_RAM_ALT, disk=1, + vcpus=1, metadata=self.FLAVOR_EXTRA_SPECS)) if flavor_alt_creator is None or flavor_alt_creator.create() is None: raise Exception("Failed to create flavor") self.creators.append(flavor_alt_creator) |