Moved FLAGS.paste_config to its re-usable location
This commit is contained in:
12
bin/nova-api
12
bin/nova-api
@@ -45,9 +45,6 @@ from nova import wsgi
|
|||||||
LOG = logging.getLogger('nova.api')
|
LOG = logging.getLogger('nova.api')
|
||||||
|
|
||||||
FLAGS = flags.FLAGS
|
FLAGS = flags.FLAGS
|
||||||
flags.DEFINE_string('paste_config', "api-paste.ini",
|
|
||||||
'File name for the paste.deploy config for nova-api')
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
utils.default_flagfile()
|
utils.default_flagfile()
|
||||||
@@ -59,11 +56,6 @@ if __name__ == '__main__':
|
|||||||
for flag in FLAGS:
|
for flag in FLAGS:
|
||||||
flag_get = FLAGS.get(flag, None)
|
flag_get = FLAGS.get(flag, None)
|
||||||
LOG.debug("%(flag)s : %(flag_get)s" % locals())
|
LOG.debug("%(flag)s : %(flag_get)s" % locals())
|
||||||
conf = wsgi.paste_config_file(FLAGS.paste_config)
|
|
||||||
if not conf:
|
service = service.serve_wsgi(service.ApiService)
|
||||||
LOG.error(_("No paste configuration found for: %s"),
|
|
||||||
FLAGS.paste_config)
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
service = service.serve_wsgi(service.ApiService, conf)
|
|
||||||
service.wait()
|
service.wait()
|
||||||
|
|||||||
Reference in New Issue
Block a user