More hacks to fix broken o-c-c precedence
We needed a bit more to work around os-client-config 1.18.0's broken precedence; this can't all be fixed in OSC. Change-Id: Ibe1c36e72c96eb2b3746645f7e6b433307ce8021
This commit is contained in:
parent
e0e2deaee0
commit
ea65b90d63
@ -148,6 +148,22 @@ class OSC_Config(OpenStackConfig):
|
|||||||
LOG.debug("auth_config_hook(): %s" % config)
|
LOG.debug("auth_config_hook(): %s" % config)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
# TODO(dtroyer): un-hackify all of the below when o-c-c 1.19.x is
|
||||||
|
# the minimum in global-requirements
|
||||||
|
|
||||||
|
def get_one_cloud(self, cloud=None, validate=True,
|
||||||
|
argparse=None, **kwargs):
|
||||||
|
|
||||||
|
# First, save this off for later
|
||||||
|
self._save_argparse = self._fix_args(kwargs, argparse=argparse)
|
||||||
|
|
||||||
|
return super(OSC_Config, self).get_one_cloud(
|
||||||
|
cloud=cloud,
|
||||||
|
validate=validate,
|
||||||
|
argparse=argparse,
|
||||||
|
**kwargs
|
||||||
|
)
|
||||||
|
|
||||||
def _validate_auth_ksc(self, config, cloud, fixed_argparse=None):
|
def _validate_auth_ksc(self, config, cloud, fixed_argparse=None):
|
||||||
"""Old compatibility hack for OSC, no longer needed/wanted"""
|
"""Old compatibility hack for OSC, no longer needed/wanted"""
|
||||||
return config
|
return config
|
||||||
@ -156,6 +172,10 @@ class OSC_Config(OpenStackConfig):
|
|||||||
"""Validate auth plugin arguments"""
|
"""Validate auth plugin arguments"""
|
||||||
# May throw a keystoneauth1.exceptions.NoMatchingPlugin
|
# May throw a keystoneauth1.exceptions.NoMatchingPlugin
|
||||||
|
|
||||||
|
if fixed_argparse is None:
|
||||||
|
# This is o-c-c 1.18.x or older, fix up the original options
|
||||||
|
fixed_argparse = self._fix_args(None, argparse=self._save_argparse)
|
||||||
|
|
||||||
plugin_options = loader.get_options()
|
plugin_options = loader.get_options()
|
||||||
|
|
||||||
for p_opt in plugin_options:
|
for p_opt in plugin_options:
|
||||||
|
7
releasenotes/notes/arg-precedence-1ba9fd6929650830.yaml
Normal file
7
releasenotes/notes/arg-precedence-1ba9fd6929650830.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Add additional precedence fixes to the argument precedence problems
|
||||||
|
in os-client-config 1.18.0 and earlier. This all will be removed
|
||||||
|
when os-client-config 1.19.x is the minimum allwed version in
|
||||||
|
OpenStack's global requirements.txt.
|
Loading…
Reference in New Issue
Block a user