Merge "Don't list deprecated opts in sample config"

This commit is contained in:
Jenkins 2015-12-16 07:28:13 +00:00 committed by Gerrit Code Review
commit 4c5c26d366
2 changed files with 7 additions and 13 deletions

View File

@ -369,7 +369,7 @@ _OPTS = [
' only while migrating from a less secure algorithm to a more' ' only while migrating from a less secure algorithm to a more'
' secure one. Once all the old tokens are expired this option' ' secure one. Once all the old tokens are expired this option'
' should be set to a single value for better performance.'), ' should be set to a single value for better performance.'),
] + _auth.OPTS ]
CONF = cfg.CONF CONF = cfg.CONF
CONF.register_opts(_OPTS, group=_base.AUTHTOKEN_GROUP) CONF.register_opts(_OPTS, group=_base.AUTHTOKEN_GROUP)
@ -399,7 +399,7 @@ def _conf_values_type_convert(conf):
return {} return {}
opt_types = {} opt_types = {}
for o in _OPTS: for o in _OPTS + _auth.OPTS:
type_dest = (getattr(o, 'type', str), o.dest) type_dest = (getattr(o, 'type', str), o.dest)
opt_types[o.dest] = type_dest opt_types[o.dest] = type_dest
# Also add the deprecated name with the same type and dest. # Also add the deprecated name with the same type and dest.
@ -647,8 +647,11 @@ class AuthProtocol(_BaseAuthProtocol):
default_config_files=default_config_files, default_config_files=default_config_files,
validate_default_values=True) validate_default_values=True)
self._local_oslo_config.register_opts( self._local_oslo_config.register_opts(_OPTS,
_OPTS, group=_base.AUTHTOKEN_GROUP) group=_base.AUTHTOKEN_GROUP)
self._local_oslo_config.register_opts(_auth.OPTS,
group=_base.AUTHTOKEN_GROUP)
loading.register_auth_conf_options(self._local_oslo_config, loading.register_auth_conf_options(self._local_oslo_config,
group=_base.AUTHTOKEN_GROUP) group=_base.AUTHTOKEN_GROUP)

View File

@ -28,20 +28,11 @@ class OptsTestCase(utils.TestCase):
self.assertEqual('keystone_authtoken', group) self.assertEqual('keystone_authtoken', group)
expected_opt_names = [ expected_opt_names = [
'auth_admin_prefix',
'auth_host',
'auth_port',
'auth_protocol',
'auth_uri', 'auth_uri',
'identity_uri',
'auth_version', 'auth_version',
'delay_auth_decision', 'delay_auth_decision',
'http_connect_timeout', 'http_connect_timeout',
'http_request_max_retries', 'http_request_max_retries',
'admin_token',
'admin_user',
'admin_password',
'admin_tenant_name',
'cache', 'cache',
'certfile', 'certfile',
'keyfile', 'keyfile',