diff options
| author | Eric Day <eday@oddments.org> | 2010-11-22 21:06:44 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-11-22 21:06:44 +0000 |
| commit | 2b0e1f330422398e0ec9dcaf9d964d74ec6ca25d (patch) | |
| tree | 2a883d8cb588b5add61fc673aba2d971e2b5f41f | |
| parent | 7a8c91cc4b595bfee05540ef325f12c1b8516c98 (diff) | |
| parent | d65c35bcadc6cc4e4d1fc61502d43fd001ce2f0e (diff) | |
| download | nova-2b0e1f330422398e0ec9dcaf9d964d74ec6ca25d.tar.gz nova-2b0e1f330422398e0ec9dcaf9d964d74ec6ca25d.tar.xz nova-2b0e1f330422398e0ec9dcaf9d964d74ec6ca25d.zip | |
Allows user to specify hosts to listen on for nova-api and -objectstore
| -rwxr-xr-x | bin/nova-api | 6 | ||||
| -rw-r--r-- | nova/objectstore/handler.py | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bin/nova-api b/bin/nova-api index a9002ae2d..a9c53dbcd 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -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() diff --git a/nova/objectstore/handler.py b/nova/objectstore/handler.py index b26906001..c8920b00c 100644 --- a/nova/objectstore/handler.py +++ b/nova/objectstore/handler.py @@ -61,6 +61,7 @@ from nova.objectstore import image FLAGS = flags.FLAGS +flags.DEFINE_string('s3_listen_host', '', 'Host to listen on.') def render_xml(request, value): @@ -438,6 +439,7 @@ def get_application(): # Disabled because of lack of proper introspection in Twisted # or possibly different versions of twisted? # pylint: disable-msg=E1101 - objectStoreService = internet.TCPServer(FLAGS.s3_port, factory) + objectStoreService = internet.TCPServer(FLAGS.s3_port, factory, + interface=FLAGS.s3_listen_host) objectStoreService.setServiceParent(application) return application |
