From 7f573470b50479e21c6d43bfc9ced75be83b4d7f Mon Sep 17 00:00:00 2001 From: Tovin Seven Date: Mon, 19 Jun 2017 10:21:11 +0700 Subject: [PATCH] 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 Change-Id: I67fa2538a10788ac6942995b440c22facb81fc68 --- magnumclient/shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/magnumclient/shell.py b/magnumclient/shell.py index ad2c4166..259f1ad0 100644 --- a/magnumclient/shell.py +++ b/magnumclient/shell.py @@ -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 '