summaryrefslogtreecommitdiffstats
path: root/nova/service.py
diff options
context:
space:
mode:
authorMike Scherbakov <mihgen@gmail.com>2011-05-26 00:51:14 +0400
committerMike Scherbakov <mihgen@gmail.com>2011-05-26 00:51:14 +0400
commitfe77c55b7643bd9bd3bd988f7f759dde8af09cae (patch)
tree6d3a18d28fe54d2d1808ca8496f0ed04b32706cb /nova/service.py
parent818c2424a0547882fe6bdfe6613ee66a248d91db (diff)
parentec0e674ce1a8539143e9b99deb8cc62b9d42d6b2 (diff)
downloadnova-fe77c55b7643bd9bd3bd988f7f759dde8af09cae.tar.gz
nova-fe77c55b7643bd9bd3bd988f7f759dde8af09cae.tar.xz
nova-fe77c55b7643bd9bd3bd988f7f759dde8af09cae.zip
Merged with trunk
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py
index 2532b9df2..ab1238c3b 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -240,6 +240,10 @@ class WsgiService(object):
def wait(self):
self.wsgi_app.wait()
+ def get_socket_info(self, api_name):
+ """Returns the (host, port) that an API was started on."""
+ return self.wsgi_app.socket_info[api_name]
+
class ApiService(WsgiService):
"""Class for our nova-api service."""
@@ -318,8 +322,10 @@ def _run_wsgi(paste_config_file, apis):
logging.debug(_('App Config: %(api)s\n%(config)r') % locals())
logging.info(_('Running %s API'), api)
app = wsgi.load_paste_app(paste_config_file, api)
- apps.append((app, getattr(FLAGS, '%s_listen_port' % api),
- getattr(FLAGS, '%s_listen' % api)))
+ apps.append((app,
+ getattr(FLAGS, '%s_listen_port' % api),
+ getattr(FLAGS, '%s_listen' % api),
+ api))
if len(apps) == 0:
logging.error(_('No known API applications configured in %s.'),
paste_config_file)