diff options
| author | jaypipes@gmail.com <> | 2010-12-17 11:10:11 -0500 |
|---|---|---|
| committer | jaypipes@gmail.com <> | 2010-12-17 11:10:11 -0500 |
| commit | afae367d63c6d38faa5d9be54725df29c2a5b903 (patch) | |
| tree | e2282e9bbc6ef6d4c5f339a4fde38127a619f354 /bin/nova-api | |
| parent | d283922defdda6ede5fa2e09656cd8d411a90096 (diff) | |
| parent | cd460a1f661eea7e050891f50a8218fdf24f2c6f (diff) | |
Merge eventlet and resolve all conflicts
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bin/nova-api b/bin/nova-api index 2ae6a099a..1c671201e 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -17,9 +17,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""" -Nova API daemon. -""" + +"""Starter script for Nova API.""" import gettext import os @@ -35,9 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): gettext.install('nova', unicode=1) +from nova import api from nova import flags from nova import utils -from nova import server +from nova import wsgi + FLAGS = flags.FLAGS flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port') @@ -46,15 +47,10 @@ 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 +if __name__ == '__main__': + utils.default_flagfile() + FLAGS(sys.argv) server = wsgi.Server() 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() - - -if __name__ == '__main__': - utils.default_flagfile() - server.serve('nova-api', main) |
