Add nova config option to service_available group
This commit adds a new config option, nova, to the service_available
config group. This option is used to specify whether nova is running
or not. It also add a skip to base compute api test class.
Change-Id: I658f70f259734e366cecce1c8e0409255351af87
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 32fe484..3579026 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -356,3 +356,5 @@
glance = True
# Whether or not swift is expected to be available
swift = True
+# Whether or not nova is expected to be available
+nova = True
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index abc5899..095be7c 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -36,6 +36,9 @@
@classmethod
def setUpClass(cls):
+ if not cls.config.service_available.nova:
+ skip_msg = ("%s skipped as nova is not available" % cls.__name__)
+ raise cls.skipException(skip_msg)
cls.isolated_creds = []
if cls.config.compute.allow_tenant_isolation:
diff --git a/tempest/config.py b/tempest/config.py
index 83ea25c..5eb52dc 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -551,6 +551,9 @@
cfg.BoolOpt('swift',
default=True,
help="Whether or not swift is expected to be available"),
+ cfg.BoolOpt('nova',
+ default=True,
+ help="Whether or not nova is expected to be available"),
]