summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-01-26 13:42:56 +0000
committerGerrit Code Review <review@openstack.org>2015-01-26 13:42:56 +0000
commit3efd9acb1a7f51290ba1a4d9c08ebc72c8f4f03c (patch)
tree5f987f5236dd746506305a47512f8bcd0a1550f5
parent5b807bf2c0a3e22564c78250d42887d9d4f15c65 (diff)
parentb0132891637a3a8f6b0bdf425e36551eae34ed1f (diff)
downloadtempest-lib-3efd9acb1a7f51290ba1a4d9c08ebc72c8f4f03c.tar.gz
Merge "Update base.py to include python-openstackclient."
-rw-r--r--tempest_lib/cli/base.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tempest_lib/cli/base.py b/tempest_lib/cli/base.py
index a573fc4..95eb499 100644
--- a/tempest_lib/cli/base.py
+++ b/tempest_lib/cli/base.py
@@ -307,6 +307,25 @@ class CLIClient(object):
return self.cmd_with_auth(
'sahara', action, flags, params, fail_ok, merge_stderr)
+ def openstack(self, action, flags='', params='', fail_ok=False,
+ merge_stderr=False):
+ """Executes openstack command for the given action.
+
+ :param action: the cli command to run using openstack
+ :type action: string
+ :param flags: any optional cli flags to use
+ :type flags: string
+ :param params: any optional positional args to use
+ :type params: string
+ :param fail_ok: if True an exception is not raised when the
+ cli return code is non-zero
+ :type fail_ok: boolean
+ :param merge_stderr: if True the stderr buffer is merged into stdout
+ :type merge_stderr: boolean
+ """
+ return self.cmd_with_auth(
+ 'openstack', action, flags, params, fail_ok, merge_stderr)
+
def cmd_with_auth(self, cmd, action, flags='', params='',
fail_ok=False, merge_stderr=False):
"""Executes given command with auth attributes appended.