Update config generator from OSLO

Cinders sample config is out of date with recent
updates needed for keystone, however we had an
old version of the oslo generator so there was
no way to pick these changes up locally by running
the generate tool.

This pulls the latest generator.py from oslo, and
we run the update script to get us back in sync.

Current head of oslo:
  commit 2eab986ef3c43f8d1e25065e3cbc1307860c25c7
  Merge: 2b08343 0dbcae1
  Author: Jenkins <jenkins@review.openstack.org>
  Date:   Wed Mar 26 14:47:07 2014 +0000

      Merge "Adds test condition in test_periodic"

Change-Id: Id43becfaa39d04153167e592a1233a5aef6016c9
This commit is contained in:
john-griffith 2014-03-26 16:47:21 -06:00
parent 532e99589b
commit 1e6560ac69
2 changed files with 19 additions and 16 deletions

View File

@ -64,6 +64,10 @@ BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),
WORDWRAP_WIDTH = 60
def raise_extension_exception(extmanager, ep, err):
raise
def generate(argv):
parser = argparse.ArgumentParser(
description='generate sample configuration file',
@ -107,6 +111,7 @@ def generate(argv):
'oslo.config.opts',
names=list(set(parsed_args.libraries)),
invoke_on_load=False,
on_load_failure_callback=raise_extension_exception
)
for ext in loader:
for group, opts in ext.plugin():
@ -229,7 +234,7 @@ def _sanitize_default(name, value):
return value.replace(BASEDIR, '')
elif value == _get_my_ip():
return '10.0.0.1'
elif value == socket.gethostname() and 'host' in name:
elif value in (socket.gethostname(), socket.getfqdn()) and 'host' in name:
return 'cinder'
elif value.strip() != value:
return '"%s"' % value

View File

@ -2031,12 +2031,6 @@
# with Identity API Server. (integer value)
#http_request_max_retries=3
# Allows to pass in the name of a fake http_handler callback
# function used instead of httplib.HTTPConnection or
# httplib.HTTPSConnection. Useful for unit testing where
# network is not available. (string value)
#http_handler=<None>
# Single shared secret with the Keystone configuration used
# for bootstrapping a Keystone installation, or otherwise
# bypassing the normal authentication process. (string value)
@ -2074,20 +2068,24 @@
# value)
#signing_dir=<None>
# If defined, the memcache server(s) to use for caching (list
# value)
# Optionally specify a list of memcached server(s) to use for
# caching. If left undefined, tokens will instead be cached
# in-process. (list value)
# Deprecated group/name - [DEFAULT]/memcache_servers
#memcached_servers=<None>
# In order to prevent excessive requests and validations, the
# middleware uses an in-memory cache for the tokens the
# Keystone API returns. This is only valid if memcache_servers
# is defined. Set to -1 to disable caching completely.
# (integer value)
# In order to prevent excessive effort spent validating
# tokens, the middleware caches previously-seen tokens for a
# configurable duration (in seconds). Set to -1 to disable
# caching completely. (integer value)
#token_cache_time=300
# Value only used for unit testing (integer value)
#revocation_cache_time=1
# Determines the frequency at which the list of revoked tokens
# is retrieved from the Identity service (in seconds). A high
# number of revocation events combined with a low cache
# duration may significantly reduce performance. (integer
# value)
#revocation_cache_time=300
# (optional) if defined, indicate whether token data should be
# authenticated or authenticated and encrypted. Acceptable