Fix for bug#613264, allowing hosts to be specified for nova-api and objectstore listeners.

This commit is contained in:
Eric Day
2010-11-03 12:38:15 -07:00
parent eef4d6815f
commit a7698f931e

View File

@@ -38,15 +38,17 @@ from nova import server
FLAGS = flags.FLAGS
flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port')
flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host')
flags.DEFINE_integer('ec2api_port', 8773, 'EC2 API port')
flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host')
def main(_args):
from nova import api
from nova import wsgi
server = wsgi.Server()
server.start(api.API('os'), FLAGS.osapi_port)
server.start(api.API('ec2'), FLAGS.ec2api_port)
server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host)
server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host)
server.wait()