]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use pbr wsgi_scripts to install Cinder WSGI entry point
authorIvan Kolodyazhny <e0ne@e0ne.info>
Mon, 28 Sep 2015 12:35:58 +0000 (15:35 +0300)
committerIvan Kolodyazhny <e0ne@e0ne.info>
Mon, 28 Sep 2015 14:05:45 +0000 (17:05 +0300)
pbr 1.4.0 added support for wsgi_scripts that creates scripts for wsgi
servers on install.

Change-Id: Ifbab059001d1567b1f7b394c0411a9ca4629f846
Closes-Bug: #1500367

cinder/wsgi/wsgi.py
setup.cfg

index d51bec40df962b636bebf205b530b1ce6366d614..966993d9c5358271a36a00621515f84d16e71360 100644 (file)
@@ -35,7 +35,7 @@ from cinder.wsgi import common as wsgi_common
 CONF = cfg.CONF
 
 
-def _application():
+def initialize_application():
     objects.register_all()
     CONF(sys.argv[1:], project='cinder',
          version=version.version_string())
@@ -43,6 +43,3 @@ def _application():
 
     rpc.init(CONF)
     return wsgi_common.Loader().load_app(name='osapi_volume')
-
-
-application = _application()
index 887f0296e8eb15bb6062a59d147640005b27e73d..9ef5d3fb30c06748cbadd0d80e22ff5242e59e78 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -58,6 +58,8 @@ console_scripts =
     cinder-scheduler = cinder.cmd.scheduler:main
     cinder-volume = cinder.cmd.volume:main
     cinder-volume-usage-audit = cinder.cmd.volume_usage_audit:main
+wsgi_scripts =
+    cinder-wsgi = cinder.wsgi.wsgi:initialize_application
 # These are for backwards compat with Havana notification_driver configuration values
 oslo_messaging.notify.drivers =
     cinder.openstack.common.notifier.log_notifier = oslo_messaging.notify._impl_log:LogDriver