Moved FLAGS.paste_config to its re-usable location

This commit is contained in:
Justin Santa Barbara
2011-03-07 15:36:04 -08:00
parent 316d940da1
commit 3abb117e6f

View File

@@ -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.wait()
service = service.serve_wsgi(service.ApiService)
service.wait()