summaryrefslogtreecommitdiffstats
path: root/tests/functest
diff options
context:
space:
mode:
authorVijayendra Radhakrishna <vradhakrishna@mvista.com>2016-12-13 12:18:18 +0530
committerVijayendra Radhakrishna <vradhakrishna@mvista.com>2016-12-13 18:09:13 +0530
commit824e0073bd59b9cd81b23ac1ae7b4afaf5b9e5e3 (patch)
tree68a14b435a6f5f8ad44fae40583cd2e7902e60a1 /tests/functest
parent8b09f0ad06e5ae941fc497754cc5778fae9018de (diff)
Move flavor creations params to config file
- Moving flavor creation params from hard coding to config file Change-Id: Ia3dac28a9a26518edde17dc2ee5495c1ab1de00b Signed-off-by: Vijayendra Radhakrishna <vradhakrishna@mvista.com>
Diffstat (limited to 'tests/functest')
-rw-r--r--tests/functest/odl-sfc/config.py6
-rw-r--r--tests/functest/odl-sfc/config.yaml6
-rwxr-xr-xtests/functest/odl-sfc/sfc.py5
3 files changed, 15 insertions, 2 deletions
diff --git a/tests/functest/odl-sfc/config.py b/tests/functest/odl-sfc/config.py
index d7498327..3b76e3bc 100644
--- a/tests/functest/odl-sfc/config.py
+++ b/tests/functest/odl-sfc/config.py
@@ -36,6 +36,12 @@ class CommonConfig(object):
}
self.flavor = ft_utils.get_parameter_from_yaml(
"defaults.flavor", self.config_file)
+ self.ram_size_in_mb = ft_utils.get_parameter_from_yaml(
+ "defaults.ram_size_in_mb", self.config_file)
+ self.disk_size_in_gb = ft_utils.get_parameter_from_yaml(
+ "defaults.disk_size_in_gb", self.config_file)
+ self.vcpu_count = ft_utils.get_parameter_from_yaml(
+ "defaults.vcpu_count", self.config_file)
self.image_name = ft_utils.get_parameter_from_yaml(
"defaults.image_name", self.config_file)
self.image_file_name = ft_utils.get_parameter_from_yaml(
diff --git a/tests/functest/odl-sfc/config.yaml b/tests/functest/odl-sfc/config.yaml
index 7861d771..78cf42fb 100644
--- a/tests/functest/odl-sfc/config.yaml
+++ b/tests/functest/odl-sfc/config.yaml
@@ -1,5 +1,9 @@
defaults:
- flavor: custom #odl-sfc uses custom flavor
+ #odl-sfc uses custom flavors as per below params
+ flavor: custom
+ ram_size_in_mb: 1500
+ disk_size_in_gb: 10
+ vcpu_count: 1
image_name: sf_nsh_colorado
image_file_name: sf_nsh_colorado.qcow2
fuel_master_ip: 10.20.0.2
diff --git a/tests/functest/odl-sfc/sfc.py b/tests/functest/odl-sfc/sfc.py
index 22301a28..8bd48d2a 100755
--- a/tests/functest/odl-sfc/sfc.py
+++ b/tests/functest/odl-sfc/sfc.py
@@ -55,7 +55,10 @@ def main():
test_utils.download_image(COMMON_CONFIG.url,
COMMON_CONFIG.image_path)
_, custom_flv_id = os_utils.get_or_create_flavor(
- COMMON_CONFIG.flavor, 1500, 10, 1, public=True)
+ COMMON_CONFIG.flavor,
+ COMMON_CONFIG.ram_size_in_mb,
+ COMMON_CONFIG.disk_size_in_gb,
+ COMMON_CONFIG.vcpu_count, public=True)
if not custom_flv_id:
logger.error("Failed to create custom flavor")
sys.exit(1)