incorporate feedback from termie
This commit is contained in:
@@ -71,8 +71,6 @@ if __name__ == "__main__":
|
||||
LOG.audit(_("Starting nova-vnc-proxy node (version %s)"),
|
||||
version.version_string_with_vcs())
|
||||
|
||||
service.serve()
|
||||
|
||||
if not (os.path.exists(FLAGS.vncproxy_wwwroot) and
|
||||
os.path.exists(FLAGS.vncproxy_wwwroot + '/vnc_auto.html')):
|
||||
LOG.info(_("Missing vncproxy_wwwroot (version %s)"),
|
||||
@@ -96,6 +94,8 @@ if __name__ == "__main__":
|
||||
else:
|
||||
with_auth = auth.VNCNovaAuthMiddleware(with_logging)
|
||||
|
||||
service.serve()
|
||||
|
||||
server = wsgi.Server()
|
||||
server.start(with_auth, FLAGS.vncproxy_port, host=FLAGS.vncproxy_host)
|
||||
server.wait()
|
||||
|
@@ -36,7 +36,7 @@ Configuring the VNC Proxy
|
||||
-------------------------
|
||||
nova-vnc-proxy requires a websocket enabled html client to work properly. At
|
||||
this time, the only tested client is a slightly modified fork of noVNC, which
|
||||
you can at find git://github.com/sleepsonthefloor/noVNC.git.
|
||||
you can at find http://github.com/openstack/noVNC.git
|
||||
|
||||
.. todo:: add instruction for installing from package
|
||||
|
||||
|
@@ -486,7 +486,7 @@ class Controller(wsgi.Controller):
|
||||
"""Returns a url to an instance's ajaxterm console."""
|
||||
try:
|
||||
self.compute_api.get_vnc_console(req.environ['nova.context'],
|
||||
int(id))
|
||||
int(id))
|
||||
except exception.NotFound:
|
||||
return faults.Fault(exc.HTTPNotFound())
|
||||
return exc.HTTPAccepted()
|
||||
|
@@ -627,8 +627,6 @@ class LibvirtConnection(driver.ComputeDriver):
|
||||
|
||||
return {'token': token, 'host': host, 'port': port}
|
||||
|
||||
_image_sems = {} # FIXME: why is this here? (anthony)
|
||||
|
||||
@staticmethod
|
||||
def _cache_image(fn, target, fname, cow=False, *args, **kwargs):
|
||||
"""Wrapper for a method that creates an image that caches the image.
|
||||
|
@@ -20,9 +20,7 @@
|
||||
|
||||
from nova import flags
|
||||
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
flags.DEFINE_string('vncproxy_topic', 'vncproxy',
|
||||
'the topic vnc proxy nodes listen on')
|
||||
flags.DEFINE_string('vncproxy_url',
|
||||
|
@@ -44,7 +44,7 @@ class VNCNovaAuthMiddleware(object):
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
self.token_cache = {}
|
||||
utils.LoopingCall(self.delete_expired_tokens).start(1)
|
||||
utils.LoopingCall(self.delete_expired_cache_items).start(1)
|
||||
|
||||
@webob.dec.wsgify
|
||||
def __call__(self, req):
|
||||
@@ -78,7 +78,7 @@ class VNCNovaAuthMiddleware(object):
|
||||
self.token_cache[token] = rval
|
||||
return rval
|
||||
|
||||
def delete_expired_tokens(self):
|
||||
def delete_expired_cache_items(self):
|
||||
now = time.time()
|
||||
to_delete = []
|
||||
for k, v in self.token_cache.items():
|
||||
|
@@ -25,9 +25,9 @@ import eventlet
|
||||
from eventlet import wsgi
|
||||
from eventlet import websocket
|
||||
|
||||
from webob import Request
|
||||
import webob
|
||||
|
||||
|
||||
WS_ENDPOINT = '/data'
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class WebsocketVNCProxy(object):
|
||||
_handle(environ, start_response)
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
req = Request(environ)
|
||||
req = webob.Request(environ)
|
||||
if req.path == WS_ENDPOINT:
|
||||
return self.proxy_connection(environ, start_response)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user