summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-02-15 13:33:52 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-15 13:33:52 +0000
commitb7a8df9145600fbd12658ac829c813bd20455b95 (patch)
tree64a86e5cd8a3a6c9ce11b3122e48a7b7dbfc2d8f
parentcf8727bcaa2b82c5f1d370bb41f62cd7ed8df571 (diff)
parentf60e2e0a2a7a37cd2b80918d6201e6dff7d8056a (diff)
Merge "fix for sdnvpn CI test failure"
-rw-r--r--sdnvpn/lib/config.py4
-rw-r--r--sdnvpn/lib/utils.py7
-rw-r--r--sdnvpn/test/functest/run_sdnvpn_tests.py1
3 files changed, 11 insertions, 1 deletions
diff --git a/sdnvpn/lib/config.py b/sdnvpn/lib/config.py
index 8d87f33..f512a7d 100644
--- a/sdnvpn/lib/config.py
+++ b/sdnvpn/lib/config.py
@@ -31,13 +31,15 @@ class CommonConfig(object):
'sdnvpn', 'test/functest/config.yaml')
self.keyfile_path = pkg_resources.resource_filename(
'sdnvpn', 'artifacts/id_rsa')
- self.test_db = CONST.results_test_db_url
self.quagga_setup_script_path = pkg_resources.resource_filename(
'sdnvpn', 'artifacts/quagga_setup.sh')
self.line_length = 90 # length for the summary table
self.vm_boot_timeout = 180
self.default_flavor = ft_utils.get_parameter_from_yaml(
"defaults.flavor", self.config_file)
+ self.default_flavor_ram = 512
+ self.default_flavor_disk = 1
+ self.default_flavor_vcpus = 1
self.image_filename = CONST.openstack_image_file_name
self.image_format = CONST.openstack_image_disk_format
self.image_path = '{0}/{1}'.format(CONST.dir_functest_images,
diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py
index 44641ee..47a0b9e 100644
--- a/sdnvpn/lib/utils.py
+++ b/sdnvpn/lib/utils.py
@@ -49,6 +49,13 @@ class AllowedAddressPair(object):
self.macaddress = macaddress
+def create_default_flavor():
+ return os_utils.get_or_create_flavor(common_config.default_flavor,
+ common_config.default_flavor_ram,
+ common_config.default_flavor_disk,
+ common_config.default_flavor_vcpus)
+
+
def create_custom_flavor():
return os_utils.get_or_create_flavor(common_config.custom_flavor_name,
common_config.custom_flavor_ram,
diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py
index 7e39e22..1ddc4c6 100644
--- a/sdnvpn/test/functest/run_sdnvpn_tests.py
+++ b/sdnvpn/test/functest/run_sdnvpn_tests.py
@@ -52,6 +52,7 @@ class SdnvpnFunctest(base.Feature):
COMMON_CONFIG.neutron_subnet_quota,
COMMON_CONFIG.neutron_port_quota,
COMMON_CONFIG.neutron_router_quota)
+ test_utils.create_default_flavor()
# Workaround for
# https://jira.opnfv.org/projects/SDNVPN/issues/SDNVPN-115