diff --git a/cinder/wsgi/wsgi.py b/cinder/wsgi/wsgi.py index d51bec40df9..966993d9c53 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 887f0296e8e..9ef5d3fb30c 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