]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
register the config generator default hook with the right name
authorDoug Hellmann <doug@doughellmann.com>
Fri, 11 Mar 2016 21:06:11 +0000 (16:06 -0500)
committerDoug Hellmann <doug@doughellmann.com>
Fri, 11 Mar 2016 21:06:17 +0000 (16:06 -0500)
No config generator hooks should ever be registered with a name that
belongs to another project. In this case, using oslo.middleware.cors
means that *every other project* that loads the middleware gets this
application's defaults when the generator is run on a system with
everything installed (such as a dev box with devstack). Use the name
of the app instead, to ensure that the defaults are only set when this
app's sample config and documentation are being generated.

Change-Id: I6a8c7d44b9db9325003ff2fdb667b0ced7739e96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
setup.cfg

index 19e340f5ff6c2d01c9b5907826c2acb2bb693323..535239d1ffe4c2ad8be9440960ea240f12fa4780 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -48,7 +48,7 @@ oslo.config.opts =
     oslo.messaging = oslo_messaging.opts:list_opts
     oslo.db.concurrency = oslo.db.concurrency:list_opts
 oslo.config.opts.defaults =
-    oslo.middleware = cinder.common.config:set_middleware_defaults
+    cinder = cinder.common.config:set_middleware_defaults
 console_scripts =
     cinder-all = cinder.cmd.all:main
     cinder-api = cinder.cmd.api:main