summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorManuel Buil <manuelbuil87@gmail.com>2016-12-13 14:55:37 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-13 14:55:37 +0000
commitb7db5146456f580e8596ef47cf7aee8e0ac18598 (patch)
treec381469f48326ce61024bc5c3ef8c58fe87f4509 /tests
parent4d3f083c051b74bd575a333a5853fdd85bbeeafe (diff)
parent824e0073bd59b9cd81b23ac1ae7b4afaf5b9e5e3 (diff)
Merge "Move flavor creations params to config file"
Diffstat (limited to 'tests')
-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 36e6fa84..5d1024db 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)