summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2014-09-05 20:39:40 -0400
committerMatthew Treinish <mtreinish@kortar.org>2014-09-05 20:41:47 -0400
commit0cd54fba00abbba6d1bfe76522529a52dad8c9d5 (patch)
tree7164b6154fa16d456c442eaa03f424e7e7db4b7f
parentbd74e7b704d5a279ea914300f053e0c789b5aa5d (diff)
downloadtempest-lib-0cd54fba00abbba6d1bfe76522529a52dad8c9d5.tar.gz
Add merge_stderr option to all client methods
This commit makes the client methods behave more uniformly. Before there only certain methods had a kwarg for merge_stderr, which could lead to unexpected behavior depending on the clients being used. By adding the option everywhere there shouldn't be an unexpected behavior around merge_stderr. Change-Id: I227d5e684c94da29a47eb9876a9ed40cdbea084c
-rw-r--r--tempest_lib/cli/base.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/tempest_lib/cli/base.py b/tempest_lib/cli/base.py
index 88522a5..8d775f3 100644
--- a/tempest_lib/cli/base.py
+++ b/tempest_lib/cli/base.py
@@ -58,11 +58,11 @@ class CLIClientBase(object):
self.uri = uri
def nova(self, action, flags='', params='', fail_ok=False,
- endpoint_type='publicURL'):
+ endpoint_type='publicURL', merge_stderr=False):
"""Executes nova command for the given action."""
flags += ' --endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'nova', action, flags, params, fail_ok)
+ 'nova', action, flags, params, fail_ok, merge_stderr)
def nova_manage(self, action, flags='', params='', fail_ok=False,
merge_stderr=False):
@@ -71,55 +71,57 @@ class CLIClientBase(object):
'nova-manage', action, flags, params, fail_ok, merge_stderr,
self.cli_dir)
- def keystone(self, action, flags='', params='', fail_ok=False):
+ def keystone(self, action, flags='', params='', fail_ok=False,
+ merge_stderr=False):
"""Executes keystone command for the given action."""
return self.cmd_with_auth(
- 'keystone', action, flags, params, fail_ok)
+ 'keystone', action, flags, params, fail_ok, merge_stderr)
def glance(self, action, flags='', params='', fail_ok=False,
- endpoint_type='publicURL'):
+ endpoint_type='publicURL', merge_stderr=False):
"""Executes glance command for the given action."""
flags += ' --os-endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'glance', action, flags, params, fail_ok)
+ 'glance', action, flags, params, fail_ok, merge_stderr)
def ceilometer(self, action, flags='', params='',
- fail_ok=False, endpoint_type='publicURL'):
+ fail_ok=False, endpoint_type='publicURL',
+ merge_stderr=False):
"""Executes ceilometer command for the given action."""
flags += ' --os-endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'ceilometer', action, flags, params, fail_ok)
+ 'ceilometer', action, flags, params, fail_ok, merge_stderr)
def heat(self, action, flags='', params='',
- fail_ok=False, endpoint_type='publicURL'):
+ fail_ok=False, endpoint_type='publicURL', merge_stderr=False):
"""Executes heat command for the given action."""
flags += ' --os-endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'heat', action, flags, params, fail_ok)
+ 'heat', action, flags, params, fail_ok, merge_stderr)
def cinder(self, action, flags='', params='', fail_ok=False,
- endpoint_type='publicURL'):
+ endpoint_type='publicURL', merge_stderr=False):
"""Executes cinder command for the given action."""
flags += ' --endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'cinder', action, flags, params, fail_ok)
+ 'cinder', action, flags, params, fail_ok, merge_stderr)
def swift(self, action, flags='', params='', fail_ok=False,
- endpoint_type='publicURL'):
+ endpoint_type='publicURL', merge_stderr=False):
"""Executes swift command for the given action."""
flags += ' --os-endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'swift', action, flags, params, fail_ok)
+ 'swift', action, flags, params, fail_ok, merge_stderr)
def neutron(self, action, flags='', params='', fail_ok=False,
- endpoint_type='publicURL'):
+ endpoint_type='publicURL', merge_stderr=False):
"""Executes neutron command for the given action."""
flags += ' --endpoint-type %s' % endpoint_type
return self.cmd_with_auth(
- 'neutron', action, flags, params, fail_ok)
+ 'neutron', action, flags, params, fail_ok, merge_stderr)
def sahara(self, action, flags='', params='',
- fail_ok=False, merge_stderr=True, endpoint_type='publicURL'):
+ fail_ok=False, endpoint_type='publicURL', merge_stderr=True):
"""Executes sahara command for the given action."""
flags += ' --endpoint-type %s' % endpoint_type
return self.cmd_with_auth(