diff options
author | Cristina Pauna <cristina.pauna@enea.com> | 2017-03-02 14:53:17 +0000 |
---|---|---|
committer | Cristina Pauna <cristina.pauna@enea.com> | 2017-03-06 20:20:43 +0200 |
commit | ebf6b1653e731c757f56a26a67096fa8bed38557 (patch) | |
tree | c1b41b7a8e2dc714bb322f2742dd5339d140a659 /snaps/openstack/tests/os_source_file_test.py | |
parent | 06e3b9ca9abd8bc3d96707bbb2de0c460a196f2f (diff) |
Adapt simple health check to use 3-part image
This fix adds the possibility to pass custom imformation about the
image via image_metadata variable. In SimpleHealthcheck it checks
for this info and creates a 3-part image if the kernel_url and
ramdisk_url are set. The fix also allows the default url to be
overriden as well as passing extra-properties. All the metadata info
comes from the app.
The part in functest where the custom config is set for creating
a 3-part image is https://gerrit.opnfv.org/gerrit/#/c/29851/
JIRA: ARMBAND-222
Change-Id: I11435d8bab4cf097b4079b6984741869f83aee2b
Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
Diffstat (limited to 'snaps/openstack/tests/os_source_file_test.py')
-rw-r--r-- | snaps/openstack/tests/os_source_file_test.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/snaps/openstack/tests/os_source_file_test.py b/snaps/openstack/tests/os_source_file_test.py index 20a8d80..bd37eef 100644 --- a/snaps/openstack/tests/os_source_file_test.py +++ b/snaps/openstack/tests/os_source_file_test.py @@ -69,17 +69,19 @@ 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, flavor_metadata=None, log_level=logging.DEBUG): + ssh_proxy_cmd=None, use_keystone=False, flavor_metadata=None, image_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 + self.image_metadata = image_metadata @staticmethod def parameterize(testcase_klass, os_env_file, ext_net_name, http_proxy_str=None, ssh_proxy_cmd=None, - use_keystone=False, flavor_metadata=None, log_level=logging.DEBUG): + use_keystone=False, flavor_metadata=None, image_metadata=None, log_level=logging.DEBUG): """ Create a suite containing all tests taken from the given subclass, passing them the parameter 'param'. """ @@ -88,7 +90,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, - flavor_metadata, log_level)) + flavor_metadata, image_metadata, log_level)) return suite """ |