blob: 0428c7d256a3e93917f0df3a4b676b6b4e77cdfc [file] [log] [blame]
AvnishPal8a7942e2016-08-23 16:11:44 +05301# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13
14import os
15
AvnishPal8a7942e2016-08-23 16:11:44 +053016from tempest.test_discover import plugins
17
18from ironic_inspector.test.inspector_tempest_plugin import config
19
20
21class InspectorTempestPlugin(plugins.TempestPlugin):
22 def load_tests(self):
23 base_path = os.path.split(os.path.dirname(
24 os.path.abspath(__file__)))[0]
25 test_dir = "inspector_tempest_plugin/tests"
26 full_test_dir = os.path.join(base_path, test_dir)
27 return full_test_dir, base_path
28
29 def register_opts(self, conf):
Nishant Kumar6fcbdd72016-10-10 13:27:10 +053030 conf.register_opt(config.service_option,
31 group='service_available')
32 conf.register_group(config.baremetal_introspection_group)
33 conf.register_opts(config.BaremetalIntrospectionGroup,
34 group="baremetal_introspection")
AvnishPal8a7942e2016-08-23 16:11:44 +053035
36 def get_opt_lists(self):
37 return [
38 (config.baremetal_introspection_group.name,
39 config.BaremetalIntrospectionGroup),
Nishant Kumar6fcbdd72016-10-10 13:27:10 +053040 ('service_available', [config.service_option])
AvnishPal8a7942e2016-08-23 16:11:44 +053041 ]