Move vping_* and cinder_test into healthcheck
[functest.git] / functest / opnfv_tests / openstack / snaps / connection_check.py
1 #!/usr/bin/env python
2
3 # Copyright (c) 2017 Cable Television Laboratories, Inc. and others.
4 #
5 # This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10
11 # pylint: disable=missing-docstring
12
13 import unittest
14
15 from functest.opnfv_tests.openstack.snaps import snaps_suite_builder
16 from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \
17     SnapsTestRunner
18
19
20 class ConnectionCheck(SnapsTestRunner):
21     """
22     This test executes the Python Tests included with the SNAPS libraries
23     that simply obtain the different OpenStack clients and may perform
24     simple queries
25     """
26     def __init__(self, **kwargs):
27         if "case_name" not in kwargs:
28             kwargs["case_name"] = "connection_check"
29         super(ConnectionCheck, self).__init__(**kwargs)
30
31         self.suite = unittest.TestSuite()
32
33     def run(self, **kwargs):
34         """
35         Builds the test suite then calls super.run()
36         :param kwargs: the arguments to pass on
37         :return:
38         """
39         snaps_suite_builder.add_openstack_client_tests(
40             suite=self.suite,
41             os_creds=self.os_creds,
42             ext_net_name=self.ext_net_name,
43             use_keystone=self.use_keystone)
44         return super(ConnectionCheck, self).run()