From f465e978aa8d2558cb3be4d91e6a2e18f0094148 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Mon, 28 Sep 2015 15:35:58 +0300 Subject: [PATCH] Use pbr wsgi_scripts to install Cinder WSGI entry point 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 | 5 +---- setup.cfg | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cinder/wsgi/wsgi.py b/cinder/wsgi/wsgi.py index d51bec40d..966993d9c 100644 --- a/cinder/wsgi/wsgi.py +++ b/cinder/wsgi/wsgi.py @@ -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() diff --git a/setup.cfg b/setup.cfg index 887f0296e..9ef5d3fb3 100644 --- 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 -- 2.45.2