Make --os-profile load from environment variables

+ Make --os-profile argument can be loaded from OS_PROFILE
  environment variables to avoid repeating --os-profile
  in client commands.
+ Correct information in help of --os-profile argument

Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: Ib1bbc3627bf976cc96ac623ee37b5d848e44f34f
This commit is contained in:
Tovin Seven 2017-06-19 10:57:09 +07:00
parent 42dff83ce4
commit 1877a1e4e8
1 changed files with 5 additions and 4 deletions

View File

@ -101,12 +101,13 @@ class SenlinShell(object):
def add_profiler_args(self, parser):
if osprofiler_profiler:
parser.add_argument(
'--os-profile', metavar='HMAC_KEY',
'--os-profile',
metavar='HMAC_KEY',
default=utils.env('OS_PROFILE'),
help=_('HMAC key to use for encrypting context data for '
'performance profiling of operation. This key should '
'be the value of HMAC key configured in osprofiler '
'middleware in senlin, it is specified in the paste '
'deploy configuration (/etc/senlin/api-paste.ini). '
'be the value of HMAC key configured in '
'senlin configuration (/etc/senlin/senlin.conf). '
'Without the key, profiling will not be triggered '
'even if osprofiler is enabled on server side.'))