~markmc/nova/flat-dhcp-without-bridge-iface

« back to all changes in this revision

Viewing changes to bin/nova-ajax-console-proxy

  • Committer: Tarmac
  • Author(s): Vishvananda Ishaya
  • Date: 2011-08-19 00:04:02 UTC
  • mfrom: (1450.4.8 united-launch-strategy)
  • Revision ID: tarmac-20110819000402-dp9hs0eosmunud8x
Makes all of the binary services launch using the same strategy.
 * Removes helper methods from utils for loading flags and logging
 * Changes service.serve to use Launcher
 * Changes service.wait to actually wait for all the services to exit
 * Changes nova-api to explicitly load flags and logging and use service.serve
 * Fixes the annoying IOError when /etc/nova/nova.conf doesn't exist

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from eventlet.green import urllib2
25
25
 
26
26
import exceptions
27
 
import gettext
28
27
import os
29
28
import sys
30
29
import time
38
37
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
39
38
    sys.path.insert(0, possible_topdir)
40
39
 
41
 
gettext.install('nova', unicode=1)
42
40
 
43
41
from nova import flags
44
42
from nova import log as logging
45
43
from nova import rpc
 
44
from nova import service
46
45
from nova import utils
47
46
from nova import wsgi
48
47
 
141
140
    acp = AjaxConsoleProxy()
142
141
    acp.register_listeners()
143
142
    server = wsgi.Server("AJAX Console Proxy", acp, port=acp_port)
144
 
    server.start()
145
 
    server.wait()
 
143
    service.serve(server)
 
144
    service.wait()