aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-12-12 01:02:06 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-12 01:02:06 +0000
commit9f41633bed117341fe542433ea869bba14011e9f (patch)
tree65ff2c60fbc1f39e550ddb43beec022e9d09aa2b
parent00315cbac45bdffe0cfd3174a4b0871ccb610b97 (diff)
parent5b735d134a68d9fe2d9ed1d4482686cef9d38873 (diff)
Merge "Set the ram of flavor 1024"
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py10
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py1
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_base.py6
3 files changed, 12 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index a808d0360..c16e6d13a 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)
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 979e992f2..58882b990 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -438,6 +438,7 @@ class TempestResourcesManager(object):
flavor_metadata_alt = None
if 'ovs' in scenario or 'fdio' in scenario:
flavor_metadata_alt = create_flavor.MEM_PAGE_SIZE_LARGE
+ CONST.__setattr__('openstack_flavor_ram', 1024)
flavor_creator_alt = OpenStackFlavor(
self.os_creds, FlavorConfig(
name=CONST.__getattribute__(
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py
index f3d4d50f5..df9774ece 100644
--- a/functest/opnfv_tests/openstack/vping/vping_base.py
+++ b/functest/opnfv_tests/openstack/vping/vping_base.py
@@ -156,12 +156,14 @@ class VPingBase(testcase.TestCase):
"Creating flavor with name: '%s'", self.flavor_name)
scenario = CONST.__getattribute__('DEPLOY_SCENARIO')
flavor_metadata = None
+ flavor_ram = 512
if 'ovs' in scenario or 'fdio' in scenario:
flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE
+ flavor_ram = 1024
flavor_creator = OpenStackFlavor(
self.os_creds,
- FlavorConfig(name=self.flavor_name, ram=512, disk=1, vcpus=1,
- metadata=flavor_metadata))
+ FlavorConfig(name=self.flavor_name, ram=flavor_ram, disk=1,
+ vcpus=1, metadata=flavor_metadata))
flavor_creator.create()
self.creators.append(flavor_creator)