summaryrefslogtreecommitdiffstats
path: root/sdnvpn/lib/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'sdnvpn/lib/config.py')
-rw-r--r--sdnvpn/lib/config.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/sdnvpn/lib/config.py b/sdnvpn/lib/config.py
index 9659fc3..847b41c 100644
--- a/sdnvpn/lib/config.py
+++ b/sdnvpn/lib/config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# Copyright (c) 2017 All rights reserved
# This program and the accompanying materials
@@ -7,11 +7,11 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
-import yaml
import logging
+import yaml
import pkg_resources
-from functest.utils.constants import CONST
+from functest.utils import config
import functest.utils.functest_utils as ft_utils
logger = logging.getLogger('sdnvpn_test_config')
@@ -31,24 +31,29 @@ 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.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,
- self.image_filename)
+ self.default_flavor_ram = 512
+ self.default_flavor_disk = 1
+ self.default_flavor_vcpus = 1
+ self.image_filename = getattr(
+ config.CONF, 'openstack_image_file_name')
+ self.image_format = getattr(
+ config.CONF, 'openstack_image_disk_format')
+ self.image_path = '{0}/{1}'.format(
+ getattr(config.CONF, 'dir_functest_images'),
+ self.image_filename)
# This is the ubuntu image used by sfc
# Basically vanilla ubuntu + some scripts in there
# We can use it to setup a quagga instance
# TODO does functest have an ubuntu image somewhere?
self.ubuntu_image_name = "sdnvpn-ubuntu"
self.ubuntu_image_path = '{0}/{1}'.format(
- CONST.dir_functest_images,
+ getattr(config.CONF, 'dir_functest_data'),
"ubuntu-16.04-server-cloudimg-amd64-disk1.img")
self.custom_flavor_name = 'm1.custom'
self.custom_flavor_ram = 1024
@@ -57,6 +62,7 @@ class CommonConfig(object):
self.neutron_nw_quota = -1
self.neutron_subnet_quota = -1
self.neutron_port_quota = -1
+ self.neutron_router_quota = -1
self.nova_instances_quota_class = -1
commonCfgInstance = None