diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2015-02-11 13:09:21 -0500 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2015-02-11 13:29:57 -0500 |
commit | 7385528671ea61617d7027fc33897ea850e7364c (patch) | |
tree | e8a2058af5a501eb22699cbc64d9d979ad34a099 /os_client_config/config.py | |
parent | 56b75154fb4858fad5f1d7a910d5d7fbf785ef67 (diff) | |
download | os-client-config-7385528671ea61617d7027fc33897ea850e7364c.tar.gz |
Prefer dest value when option is depricated0.4.3
Changed logic that re-assigns depricated key names while preserving
their values, to prefer the value stored in the dest key if it
exists, instead of attempting to generate the new key name.
Change-Id: Ibe961688cdb6bd4c9b2dbd27b08c722c3c741586
Diffstat (limited to 'os_client_config/config.py')
-rw-r--r-- | os_client_config/config.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index ae19621..f8adc04 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -249,7 +249,13 @@ class OpenStackConfig(object): config['auth'].pop(opt, None) if winning_value: - config['auth'][p_opt.name.replace('-', '_')] = winning_value + # Prefer the plugin configuration dest value if the value's key + # is marked as depreciated. + if p_opt.dest is None: + config['auth'][p_opt.name.replace('-', '_')] = ( + winning_value) + else: + config['auth'][p_opt.dest] = winning_value return config |