summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py1
-rw-r--r--nova/api/openstack/servers.py10
2 files changed, 11 insertions, 0 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index eb0428c2c..fa4624ff1 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -537,6 +537,7 @@ class CloudController(object):
instance_id=instance_id)
def get_vnc_console(self, context, instance_id, **kwargs):
+ """Returns vnc browser url to the dashboard."""
ec2_id = instance_id
instance_id = ec2utils.ec2_id_to_id(ec2_id)
return self.compute_api.get_vnc_console(context,
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 0dad46268..88cc790c1 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -482,6 +482,16 @@ class Controller(wsgi.Controller):
return exc.HTTPAccepted()
@scheduler_api.redirect_handler
+ def get_vnc_console(self, req, id):
+ """ Returns a url to an instance's ajaxterm console. """
+ try:
+ self.compute_api.get_vnc_console(req.environ['nova.context'],
+ int(id))
+ except exception.NotFound:
+ return faults.Fault(exc.HTTPNotFound())
+ return exc.HTTPAccepted()
+
+ @scheduler_api.redirect_handler
def diagnostics(self, req, id):
"""Permit Admins to retrieve server diagnostics."""
ctxt = req.environ["nova.context"]