add cli.has_manage option
this indicates if tempest is being run in an environment where the
*-manage commands could be run. This will not be all environments,
but if you happen to be running tempest on your management node
it is nice to be able to test these things.
Change-Id: I5fcabc19afc90950ee214343789dcfc13fc370a1
Closes-Bug: #1282178
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index f7f74b8..b45b591 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -165,6 +165,11 @@
# value)
#cli_dir=/usr/local/bin
+# Whether the tempest run location has access to the *-manage
+# commands. In a pure blackbox environment it will not.
+# (boolean value)
+#has_manage=true
+
# Number of seconds to wait on a CLI timeout (integer value)
#timeout=15
diff --git a/tempest/cli/simple_read_only/test_nova_manage.py b/tempest/cli/simple_read_only/test_nova_manage.py
index 13a1589..f1fee2e 100644
--- a/tempest/cli/simple_read_only/test_nova_manage.py
+++ b/tempest/cli/simple_read_only/test_nova_manage.py
@@ -41,6 +41,10 @@
if not CONF.service_available.nova:
msg = ("%s skipped as Nova is not available" % cls.__name__)
raise cls.skipException(msg)
+ if not CONF.cli.has_manage:
+ msg = ("%s skipped as *-manage commands not available"
+ % cls.__name__)
+ raise cls.skipException(msg)
super(SimpleReadOnlyNovaManageTest, cls).setUpClass()
def test_admin_fake_action(self):
diff --git a/tempest/config.py b/tempest/config.py
index 704556f..1f1c321 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -698,6 +698,11 @@
cfg.StrOpt('cli_dir',
default='/usr/local/bin',
help="directory where python client binaries are located"),
+ cfg.BoolOpt('has_manage',
+ default=True,
+ help=("Whether the tempest run location has access to the "
+ "*-manage commands. In a pure blackbox environment "
+ "it will not.")),
cfg.IntOpt('timeout',
default=15,
help="Number of seconds to wait on a CLI timeout"),