Fix tempest.conf generation
[service_available] is not being generated. This patch fixes it.
Change-Id: I364621ce96a1d2f6bc49df6f2868b093f719a6f5
Closes-Bug: #1613542
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 9802934..7b09e90 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -14,6 +14,15 @@
from tempest import config # noqa
+service_available_group = cfg.OptGroup(name="service_available",
+ title="Available OpenStack Services")
+
+ServiceAvailableGroup = [
+ cfg.BoolOpt("ironic-inspector",
+ default=True,
+ help="Whether or not ironic-inspector is expected to be"
+ " available"),
+]
baremetal_introspection_group = cfg.OptGroup(
name="baremetal_introspection",
diff --git a/ironic_tempest_plugin/plugin.py b/ironic_tempest_plugin/plugin.py
new file mode 100644
index 0000000..d060165
--- /dev/null
+++ b/ironic_tempest_plugin/plugin.py
@@ -0,0 +1,43 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+
+import os
+
+from tempest import config as tempest_config
+from tempest.test_discover import plugins
+
+from ironic_inspector.test.inspector_tempest_plugin import config
+
+
+class InspectorTempestPlugin(plugins.TempestPlugin):
+ def load_tests(self):
+ base_path = os.path.split(os.path.dirname(
+ os.path.abspath(__file__)))[0]
+ test_dir = "inspector_tempest_plugin/tests"
+ full_test_dir = os.path.join(base_path, test_dir)
+ return full_test_dir, base_path
+
+ def register_opts(self, conf):
+ tempest_config.register_opt_group(
+ conf, config.service_available_group,
+ config.ServiceAvailableGroup)
+ tempest_config.register_opt_group(
+ conf, config.baremetal_introspection_group,
+ config.BaremetalIntrospectionGroup)
+
+ def get_opt_lists(self):
+ return [
+ (config.baremetal_introspection_group.name,
+ config.BaremetalIntrospectionGroup),
+ ('service_available', config.ServiceAvailableGroup)
+ ]