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: Ia9b469024395327ec0ee082ddaea3234fc3ca5a6
This commit is contained in:
parent
2d5e3a7aaf
commit
3e235b2b51
@ -289,6 +289,7 @@ You'll find complete documentation on the shell by running
|
|||||||
match the one configured on the cinder api server.
|
match the one configured on the cinder api server.
|
||||||
Without key the profiling will not be triggered even
|
Without key the profiling will not be triggered even
|
||||||
if osprofiler is enabled on server side.
|
if osprofiler is enabled on server side.
|
||||||
|
Defaults to env[OS_PROFILE].
|
||||||
--os-auth-strategy <auth-strategy>
|
--os-auth-strategy <auth-strategy>
|
||||||
Authentication strategy (Env: OS_AUTH_STRATEGY,
|
Authentication strategy (Env: OS_AUTH_STRATEGY,
|
||||||
default keystone). For now, any other value will
|
default keystone). For now, any other value will
|
||||||
|
@ -240,13 +240,15 @@ class OpenStackCinderShell(object):
|
|||||||
if osprofiler_profiler:
|
if osprofiler_profiler:
|
||||||
parser.add_argument('--profile',
|
parser.add_argument('--profile',
|
||||||
metavar='HMAC_KEY',
|
metavar='HMAC_KEY',
|
||||||
|
default=utils.env('OS_PROFILE'),
|
||||||
help=_('HMAC key to use for encrypting '
|
help=_('HMAC key to use for encrypting '
|
||||||
'context data for performance profiling '
|
'context data for performance profiling '
|
||||||
'of operation. This key needs to match the '
|
'of operation. This key needs to match the '
|
||||||
'one configured on the cinder api server. '
|
'one configured on the cinder api server. '
|
||||||
'Without key the profiling will not be '
|
'Without key the profiling will not be '
|
||||||
'triggered even if osprofiler is enabled '
|
'triggered even if osprofiler is enabled '
|
||||||
'on server side.'))
|
'on server side. Defaults to '
|
||||||
|
'env[OS_PROFILE].'))
|
||||||
|
|
||||||
self._append_global_identity_args(parser)
|
self._append_global_identity_args(parser)
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
``--profile`` argument can be loaded from ``OS_PROFILE``
|
||||||
|
environment variable to avoid repeating ``--profile``
|
||||||
|
in openstack commands.
|
Loading…
Reference in New Issue
Block a user