Merge "Switch to ODL beryllium-sr4"
[functest.git] / functest / opnfv_tests / openstack / snaps / connection_check.py
1 # Copyright (c) 2015 All rights reserved
2 # This program and the accompanying materials
3 # are made available under the terms of the Apache License, Version 2.0
4 # which accompanies this distribution, and is available at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7
8 import functest.utils.functest_utils as ft_utils
9 from functest.core.pytest_suite_runner import PyTestSuiteRunner
10 from functest.opnfv_tests.openstack.snaps import snaps_utils
11 from snaps import test_suite_builder
12 import unittest
13
14
15 class ConnectionCheck(PyTestSuiteRunner):
16     """
17     This test executes the Python Tests included with the SNAPS libraries
18     that simply obtain the different OpenStack clients and may perform
19     simple queries
20     """
21     def __init__(self):
22         super(ConnectionCheck, self).__init__()
23
24         self.suite = unittest.TestSuite()
25         self.case_name = "connection_check"
26         creds_file = ft_utils.get_functest_config('general.openstack.creds')
27         use_key = ft_utils.get_functest_config('snaps.use_keystone')
28         ext_net_name = snaps_utils.get_ext_net_name()
29
30         test_suite_builder.add_openstack_client_tests(self.suite, creds_file,
31                                                       ext_net_name,
32                                                       use_keystone=use_key)