summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-03-31 14:53:37 +0000
committerGerrit Code Review <review@openstack.org>2018-03-31 14:53:37 +0000
commit2e691c9aab4df596365fa15af7f5ba109e010a7a (patch)
treeb2002f0d5cb6c53eca1ec6f445f21a8995642cf3
parentb64d45d79ee67f9ee513387151eddbfef21b0257 (diff)
parentca52061c40e3147fd2b55072789b4b08aa3eb1f1 (diff)
downloados-client-config-2e691c9aab4df596365fa15af7f5ba109e010a7a.tar.gz
Merge "Use 'none' auth plugin"
-rw-r--r--os_client_config/config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index ce4f045..f80e158 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -872,17 +872,16 @@ class OpenStackConfig(object):
return config
def _get_auth_loader(self, config):
- # Re-use the admin_token plugin for the "None" plugin
+ # Use the 'none' plugin for variants of None specified,
# since it does not look up endpoints or tokens but rather
# does a passthrough. This is useful for things like Ironic
# that have a keystoneless operational mode, but means we're
# still dealing with a keystoneauth Session object, so all the
# _other_ things (SSL arg handling, timeout) all work consistently
if config['auth_type'] in (None, "None", ''):
- config['auth_type'] = 'admin_token'
- # Set to notused rather than None because validate_auth will
- # strip the value if it's actually python None
- config['auth']['token'] = 'notused'
+ # 'none' auth_plugin has token as 'notused' so validate_auth will
+ # not strip the value (which it does for actual python None)
+ config['auth_type'] = 'none'
elif config['auth_type'] == 'token_endpoint':
# Humans have been trained to use a thing called token_endpoint
# That it does not exist in keystoneauth is irrelvant- it not
@@ -1238,6 +1237,7 @@ class OpenStackConfig(object):
with open(config_file, 'w') as fh:
yaml.safe_dump(cur_config, fh, default_flow_style=False)
+
if __name__ == '__main__':
config = OpenStackConfig().get_all_clouds()
for cloud in config: