summaryrefslogtreecommitdiff
path: root/openstackclient/tests/test_shell.py
diff options
context:
space:
mode:
authorDina Belova <dbelova@mirantis.com>2015-12-10 15:48:52 +0300
committerDina Belova <dbelova@mirantis.com>2016-02-25 20:13:27 +0000
commit16f00833a70893979ccdf7ffb7f6e1e7653cdc24 (patch)
treee04c9943ba4c4760cf98df92b09d6067f6bd672e /openstackclient/tests/test_shell.py
parent624c39ab1bb060e35253b78c842d41ebc1807ae5 (diff)
downloadpython-openstackclient-16f00833a70893979ccdf7ffb7f6e1e7653cdc24.tar.gz
Add shell --profile option to trigger osprofiler from CLI
This will allow to trigger profiling of various services that allow it currently and which APIs support is added to openstackclient. Cinder and Glance have osprofiler support already, Nova and Keystone are in progress. To use this functionality osprofiler (and its storage backend) needs to be installed in the environment. If so, you will be able to trigger profiling via the following command, for example: $ openstack --profile SECRET_KEY user list At the end of output there will be message with <trace_id>, and to plot nice HTML graphs the following command should be used: $ osprofiler trace show <trace_id> --html --out result.html Related Keystone change: https://review.openstack.org/#/c/103368/ Related Nova change: https://review.openstack.org/#/c/254703/ The similar change to the keystoneclient (https://review.openstack.org/#/c/255308/) was abandoned as new CLI extenstions are not more accepted to python-keystoneclient. Change-Id: I3d6ac613e5da70619d0a4781e5d066fde073b407
Diffstat (limited to 'openstackclient/tests/test_shell.py')
-rw-r--r--openstackclient/tests/test_shell.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/openstackclient/tests/test_shell.py b/openstackclient/tests/test_shell.py
index c4546d89..101aadd1 100644
--- a/openstackclient/tests/test_shell.py
+++ b/openstackclient/tests/test_shell.py
@@ -109,6 +109,7 @@ global_options = {
'--os-default-domain': (DEFAULT_DOMAIN_NAME, True, True),
'--os-cacert': ('/dev/null', True, True),
'--timing': (True, True, False),
+ '--profile': ('SECRET_KEY', True, False),
'--os-interface': (DEFAULT_INTERFACE, True, True)
}