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')
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
flags.DEFINE_string('paste_config', "api-paste.ini",
|
||||
'File name for the paste.deploy config for nova-api')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
utils.default_flagfile()
|
||||
@@ -59,11 +56,6 @@ if __name__ == '__main__':
|
||||
for flag in FLAGS:
|
||||
flag_get = FLAGS.get(flag, None)
|
||||
LOG.debug("%(flag)s : %(flag_get)s" % locals())
|
||||
conf = wsgi.paste_config_file(FLAGS.paste_config)
|
||||
if not conf:
|
||||
LOG.error(_("No paste configuration found for: %s"),
|
||||
FLAGS.paste_config)
|
||||
sys.exit(1)
|
||||
else:
|
||||
service = service.serve_wsgi(service.ApiService, conf)
|
||||
|
||||
service = service.serve_wsgi(service.ApiService)
|
||||
service.wait()
|
||||
|
||||
Reference in New Issue
Block a user