Make --profile load from environment variables

--profile argument can be loaded from OS_PROFILE environment variables
to avoid repeating --profile in client commands.

Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I67fa2538a10788ac6942995b440c22facb81fc68
This commit is contained in:
Tovin Seven 2017-06-19 10:21:11 +07:00
parent a0e89b2848
commit 7f573470b5
1 changed files with 2 additions and 0 deletions

View File

@ -307,6 +307,8 @@ class OpenStackMagnumShell(object):
if profiler:
parser.add_argument('--profile',
metavar='HMAC_KEY',
default=cliutils.env('OS_PROFILE',
default=None),
help='HMAC key to use for encrypting context '
'data for performance profiling of operation. '
'This key should be the value of the HMAC key '