diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-03-02 12:01:34 -0700 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-03-06 09:07:48 -0700 |
commit | 8a6c7a2be06f25f9c8c18a80b1b54c3b3be8b62a (patch) | |
tree | 7c9262d61dd6f4402f6938884168d78989cdcf6f /snaps/openstack/tests/os_source_file_test.py | |
parent | badc81a7ff469e02303a729c7544216258d40239 (diff) |
Added the ability to give the tests the ability to add in flavor metadata.
NFVI's configured for OVS/DPDK and fd.io scenarios required special
metadata for flavors in order for VM instances to be activated. This
patch allows for setting a value to be applied to all tests. With
this change, the default value is being removed that only partially
addressed this issue.
JIRA: SNAPS-38
Change-Id: Ic42944a849f710f631fe7ac6fbefb720a73f0b77
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/tests/os_source_file_test.py')
-rw-r--r-- | snaps/openstack/tests/os_source_file_test.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/snaps/openstack/tests/os_source_file_test.py b/snaps/openstack/tests/os_source_file_test.py index fa8d197..20a8d80 100644 --- a/snaps/openstack/tests/os_source_file_test.py +++ b/snaps/openstack/tests/os_source_file_test.py @@ -19,15 +19,16 @@ from snaps import file_utils import openstack_tests import logging -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# To run these tests from an IDE, the CWD must be set to the python directory of this project -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! from snaps.openstack.create_project import ProjectSettings from snaps.openstack.create_user import UserSettings from snaps.openstack.utils import deploy_utils, keystone_utils dev_os_env_file = 'openstack/tests/conf/os_env.yaml' +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# To run these tests from an IDE, the CWD must be set to the snaps directory of this project +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + class OSComponentTestCase(unittest.TestCase): @@ -68,16 +69,17 @@ class OSIntegrationTestCase(OSComponentTestCase): Super for test classes requiring a connection to OpenStack """ def __init__(self, method_name='runTest', os_env_file=None, ext_net_name=None, http_proxy_str=None, - ssh_proxy_cmd=None, use_keystone=False, log_level=logging.DEBUG): + ssh_proxy_cmd=None, use_keystone=False, flavor_metadata=None, log_level=logging.DEBUG): super(OSIntegrationTestCase, self).__init__(method_name=method_name, os_env_file=os_env_file, ext_net_name=ext_net_name, http_proxy_str=http_proxy_str, ssh_proxy_cmd=ssh_proxy_cmd, log_level=log_level) self.use_keystone = use_keystone self.keystone = None + self.flavor_metadata = flavor_metadata @staticmethod def parameterize(testcase_klass, os_env_file, ext_net_name, http_proxy_str=None, ssh_proxy_cmd=None, - use_keystone=False, log_level=logging.DEBUG): + use_keystone=False, flavor_metadata=None, log_level=logging.DEBUG): """ Create a suite containing all tests taken from the given subclass, passing them the parameter 'param'. """ @@ -86,7 +88,7 @@ class OSIntegrationTestCase(OSComponentTestCase): suite = unittest.TestSuite() for name in test_names: suite.addTest(testcase_klass(name, os_env_file, ext_net_name, http_proxy_str, ssh_proxy_cmd, use_keystone, - log_level)) + flavor_metadata, log_level)) return suite """ |