From: Jay S. Bryant <jsbryant@us.ibm.com>
Date: Mon, 27 Apr 2015 20:28:52 +0000 (-0500)
Subject: Fix namespace issue in generate_sample.sh
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ddf3800ad8fa4a5ed2cdaae1c158b016190a502a;p=openstack-build%2Fcinder-build.git

Fix namespace issue in generate_sample.sh

We just moved to using a hybrid approach that
uses the new oslo-config-generator for pulling out
library options to create the cinder.sample.conf file.
In that patch it was expected that we should use oslo_*
for the namespace.  That, however, is not how
oslo-config-generator works.

This patch switches to using oslo.* for the namespace to get
the library options pulled in.  This also fixes the fact that
we were putting multiple '[DEFAULT]' sections into the file.

Change-Id: Ie799d4d7e6deb2c486a93c5095fc3b766679fa95
Partial-bug:  1449235
---

diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh
index 26984a8ac..b5d8ee986 100755
--- a/tools/config/generate_sample.sh
+++ b/tools/config/generate_sample.sh
@@ -137,8 +137,20 @@ for CONCAT_FILE in $CONCAT_FILES; do
     cat $CONCAT_FILE >> $OUTPUTFILE
 done
 
-# Now we need to get externals
+# NOTE(jsbryant): We collect the lib config options separately and
+# append them. The generator requires that the name of the library be used
+# as the entry point so we need to use oslo.*, not oslo_* .
 oslo-config-generator \
---namespace oslo_concurrency --namespace oslo_db \
---namespace oslo_messaging --namespace policy \
---namespace keystonemiddleware.auth_token  >> $OUTPUTFILE
+--namespace oslo.concurrency \
+--namespace oslo.config \
+--namespace oslo.context \
+--namespace oslo.log \
+--namespace oslo.serialization \
+--namespace oslo.utils \
+--namespace oslo.db \
+--namespace oslo.rootwrap \
+--namespace oslo.messaging \
+--namespace oslo.i18n \
+--namespace oslo.middleware \
+--namespace policy \
+--namespace keystonemiddleware.auth_token | grep -v '^\[DEFAULT\]'  >> $OUTPUTFILE