From 6c8f65f97b81f36cd42feab81d103432b48f779c Mon Sep 17 00:00:00 2001 From: Brian Lamar Date: Sun, 19 Jun 2011 20:26:47 -0400 Subject: [PATCH] Cleanup. --- nova/service.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/nova/service.py b/nova/service.py index e27d61371..bb38cddb6 100644 --- a/nova/service.py +++ b/nova/service.py @@ -251,15 +251,31 @@ class WSGIService(object): self.server = wsgi.Server(name, self.application) def start(self): - """Start serving this API using loaded configuration.""" + """Start serving this service using loaded configuration. + + Also, retrieve updated port number in case '0' was passed in, which + indicates a random port should be used. + + :returns: None + + """ self.server.start(self.host, self.port) + self.port = self.server.port def stop(self): - """Stop serving this API.""" + """Stop serving this API. + + :returns: None + + """ self.server.stop() def wait(self): - """Wait for the service to stop serving this API.""" + """Wait for the service to stop serving this API. + + :returns: None + + """ self.server.wait()