sync oslo code

synchronise up to Change-Id: I0d945784cbe24e34c8ef19d3d3c9c0f012cfe176

Change-Id: I1e28a60c8def0e3f4ba0c61985cfa0b9312ea5bd
This commit is contained in:
Gordon Chung
2014-06-16 11:43:54 -04:00
parent a6020be379
commit 36638dde9d
28 changed files with 388 additions and 196 deletions

View File

@@ -16,6 +16,10 @@ TEMPDIR=`mktemp -d /tmp/${PROJECT_NAME}.XXXXXX`
trap "rm -rf $TEMPDIR" EXIT
tools/config/generate_sample.sh -b ./ -p ${PROJECT_NAME} -o ${TEMPDIR}
if [ $? != 0 ]
then
exit 1
fi
if ! diff -u ${TEMPDIR}/${CFGFILE_NAME} ${CFGFILE}
then

View File

@@ -1,5 +1,15 @@
#!/usr/bin/env bash
# Generate sample configuration for your project.
#
# Aside from the command line flags, it also respects a config file which
# should be named oslo.config.generator.rc and be placed in the same directory.
#
# You can then export the following variables:
# CEILOMETER_CONFIG_GENERATOR_EXTRA_MODULES: list of modules to interrogate for options.
# CEILOMETER_CONFIG_GENERATOR_EXTRA_LIBRARIES: list of libraries to discover.
# CEILOMETER_CONFIG_GENERATOR_EXCLUDED_FILES: list of files to remove from automatic listing.
print_hint() {
echo "Try \`${0##*/} --help' for more information." >&2
}
@@ -95,6 +105,10 @@ then
source "$RC_FILE"
fi
for filename in ${CEILOMETER_CONFIG_GENERATOR_EXCLUDED_FILES}; do
FILES="${FILES[@]/$filename/}"
done
for mod in ${CEILOMETER_CONFIG_GENERATOR_EXTRA_MODULES}; do
MODULES="$MODULES -m $mod"
done
@@ -111,6 +125,11 @@ DEFAULT_MODULEPATH=ceilometer.openstack.common.config.generator
MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH}
OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample
python -m $MODULEPATH $MODULES $LIBRARIES $FILES > $OUTPUTFILE
if [ $? != 0 ]
then
echo "Can not generate $OUTPUTFILE"
exit 1
fi
# Hook to allow projects to append custom config file snippets
CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null)