Make --os-profile load from environment variables

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

Change-Id: I8615a972e8a1e8a39e97c3d6e7f07add4b6ab599
This commit is contained in:
Tovin Seven 2017-06-14 15:40:45 +07:00
parent 2c9d95912e
commit db9673f16f
3 changed files with 8 additions and 1 deletions

View File

@ -283,6 +283,7 @@ class OpenStackShell(app.App):
'--os-profile',
metavar='hmac-key',
dest='profile',
default=utils.env('OS_PROFILE'),
help=_('HMAC key for encrypting profiling context data'),
)
# NOTE(dtroyer): This global option should have been named

View File

@ -112,7 +112,7 @@ global_options = {
'--os-default-domain': (DEFAULT_DOMAIN_NAME, True, True),
'--os-cacert': ('/dev/null', True, True),
'--timing': (True, True, False),
'--os-profile': ('SECRET_KEY', True, False),
'--os-profile': ('SECRET_KEY', True, True),
'--os-interface': (DEFAULT_INTERFACE, True, True)
}

View File

@ -0,0 +1,6 @@
---
features:
- |
``--os-profile`` argument can be loaded from ``OS_PROFILE``
environment variables to avoid repeating ``--os-profile``
in openstack commands.