diff options
| author | Zuul <zuul@review.opendev.org> | 2022-09-30 12:10:36 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2022-09-30 12:10:36 +0000 |
| commit | 5043626c8043f35f6a044f1b0845fcd45eaa8775 (patch) | |
| tree | 67deb1a3d584ab483be09831607696475e79b82b /openstackclient/common | |
| parent | 38dda16639e409654ee45b613ddd29a866781b8e (diff) | |
| parent | 62c52f5e61c009ad45fa3e8aeb049821d0b228eb (diff) | |
| download | python-openstackclient-5043626c8043f35f6a044f1b0845fcd45eaa8775.tar.gz | |
Merge "config: Also mask non-prefix config"
Diffstat (limited to 'openstackclient/common')
| -rw-r--r-- | openstackclient/common/configuration.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openstackclient/common/configuration.py b/openstackclient/common/configuration.py index 49ef0e05..cb415505 100644 --- a/openstackclient/common/configuration.py +++ b/openstackclient/common/configuration.py @@ -45,7 +45,6 @@ class ShowConfiguration(command.ShowOne): return parser def take_action(self, parsed_args): - info = self.app.client_manager.get_configuration() # Assume a default secret list in case we do not have an auth_plugin @@ -63,4 +62,9 @@ class ShowConfiguration(command.ShowOne): value = REDACTED info['auth.' + key] = value + if parsed_args.mask: + for secret_opt in secret_opts: + if secret_opt in info: + info[secret_opt] = REDACTED + return zip(*sorted(info.items())) |
