50f67094b077a2b3aceb83975632a1246b64eb54
[functest.git] / functest / opnfv_tests / openstack / snaps / api_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 unittest
9
10 from snaps import test_suite_builder
11
12 from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \
13     SnapsTestRunner
14
15
16 class ApiCheck(SnapsTestRunner):
17     """
18     This test executes the Python Tests included with the SNAPS libraries
19     that exercise many of the OpenStack APIs within Keystone, Glance, Neutron,
20     and Nova
21     """
22     def __init__(self, **kwargs):
23         if "case_name" not in kwargs:
24             kwargs["case_name"] = "api_check"
25         super(ApiCheck, self).__init__(**kwargs)
26
27         self.suite = unittest.TestSuite()
28
29         test_suite_builder.add_openstack_api_tests(
30             suite=self.suite,
31             os_creds=self.os_creds,
32             ext_net_name=self.ext_net_name,
33             use_keystone=self.use_keystone)