diff options
-rw-r--r-- | sdnvpn/lib/config.py | 4 | ||||
-rw-r--r-- | sdnvpn/lib/utils.py | 7 | ||||
-rw-r--r-- | sdnvpn/test/functest/run_sdnvpn_tests.py | 1 |
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 |