diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2013-12-18 15:22:03 +0800 |
---|---|---|
committer | Lianhao Lu <lianhao.lu@intel.com> | 2014-01-06 09:36:32 +0800 |
commit | 2b265a707f8978609ef085dc1294610da9419d5f (patch) | |
tree | 007314d8da20af68a98e5f8cffebaabe433d6866 /tools | |
parent | 04bd3200b1ff251d60a76ed6b4132079da214c75 (diff) | |
download | nova-2b265a707f8978609ef085dc1294610da9419d5f.tar.gz |
Sync config generator from oslo-incubator
Sync from oslo-incubator with the following patches about the config
generator:
7c18261 Temporary workaround for config generator
4b3e32b Sort the output of config/generator.py by group name
806272e Improve error reporting on import failures
6cd1c33 Clean up extra modules code
3d077a3 Print the deprecated group/name for each option
aec6d94 config.generator: allow extra modules importing
ddc4f0d Fix error when no custom config file matches *.conf.sample
d4bf84d Allow generate_sample MODULEPATH to be set in env
UpgradeImpact
DocImpact, the default values in keystone_authtoken config group are
changed.
Change-Id: If7181e14db2e43e42255bb6221d0543c13c4e5a6
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/config/generate_sample.sh | 15 | ||||
-rw-r--r-- | tools/config/keystone_authtoken.conf.sample | 33 | ||||
-rw-r--r-- | tools/config/oslo.config.generator.rc | 1 |
3 files changed, 12 insertions, 37 deletions
diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh index 5787bc9d4f..828fbfc7a0 100755 --- a/tools/config/generate_sample.sh +++ b/tools/config/generate_sample.sh @@ -77,16 +77,23 @@ find $TARGETDIR -type f -name "*.pyc" -delete FILES=$(find $TARGETDIR -type f -name "*.py" ! -path "*/tests/*" \ -exec grep -l "Opt(" {} + | sed -e "s/^$BASEDIRESC\///g" | sort -u) +EXTRA_MODULES_FILE="`dirname $0`/oslo.config.generator.rc" +if test -r "$EXTRA_MODULES_FILE" +then + source "$EXTRA_MODULES_FILE" +fi + export EVENTLET_NO_GREENDNS=yes OS_VARS=$(set | sed -n '/^OS_/s/=[^=]*$//gp' | xargs) [ "$OS_VARS" ] && eval "unset \$OS_VARS" - -MODULEPATH=nova.openstack.common.config.generator +DEFAULT_MODULEPATH=nova.openstack.common.config.generator +MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH} OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample python -m $MODULEPATH $FILES > $OUTPUTFILE -# Hook to allow projects to specify custom config file snippets -for CONCAT_FILE in $BASEDIR/tools/config/*.conf.sample; do +# Hook to allow projects to append custom config file snippets +CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null) +for CONCAT_FILE in $CONCAT_FILES; do cat $CONCAT_FILE >> $OUTPUTFILE done diff --git a/tools/config/keystone_authtoken.conf.sample b/tools/config/keystone_authtoken.conf.sample deleted file mode 100644 index b8388647d5..0000000000 --- a/tools/config/keystone_authtoken.conf.sample +++ /dev/null @@ -1,33 +0,0 @@ -[keystone_authtoken] - -# -# Options defined in keystoneclient's authtoken middleware -# - -# Host providing the admin Identity API endpoint -auth_host = 127.0.0.1 - -# Port of the admin Identity API endpoint -auth_port = 35357 - -# Protocol of the admin Identity API endpoint -auth_protocol = http - -# Keystone service account tenant name to validate user tokens -admin_tenant_name = %SERVICE_TENANT_NAME% - -# Keystone account username -admin_user = %SERVICE_USER% - -# Keystone account password -admin_password = %SERVICE_PASSWORD% - -# Directory used to cache files related to PKI tokens -# signing_dir is configurable, but the default behavior of the authtoken -# middleware should be sufficient. It will create a temporary directory -# in the home directory for the user the nova process is running as. -#signing_dir = /var/lib/nova/keystone-signing - -# API version of the admin Identity API endpoint -# Workaround for https://bugs.launchpad.net/nova/+bug/1154809 -auth_version = v2.0 diff --git a/tools/config/oslo.config.generator.rc b/tools/config/oslo.config.generator.rc new file mode 100644 index 0000000000..3b5c2fd491 --- /dev/null +++ b/tools/config/oslo.config.generator.rc @@ -0,0 +1 @@ +export NOVA_CONFIG_GENERATOR_EXTRA_MODULES=keystoneclient.middleware.auth_token |