summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorNachi Ueno <nati.ueno@gmail.com>2011-01-12 18:46:01 +0900
committerNachi Ueno <nati.ueno@gmail.com>2011-01-12 18:46:01 +0900
commit0a33f1ed87ffb2ad3ff6c41848e2bb254a62e3da (patch)
treebd42398ad08cecdcf72c54c7982d57a8867f6402 /nova/api
parent04cd3241f442f1c6a9fd030ab47b4d15e79ec032 (diff)
parent76fdd667f2efe7e2dc710fe0254437d176efb45c (diff)
downloadnova-0a33f1ed87ffb2ad3ff6c41848e2bb254a62e3da.tar.gz
nova-0a33f1ed87ffb2ad3ff6c41848e2bb254a62e3da.tar.xz
nova-0a33f1ed87ffb2ad3ff6c41848e2bb254a62e3da.zip
Merged with 549
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py5
-rw-r--r--nova/api/openstack/servers.py9
2 files changed, 14 insertions, 0 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 8e13d0284..72d7bcc95 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -504,6 +504,11 @@ class CloudController(object):
"Timestamp": now,
"output": base64.b64encode(output)}
+ def get_ajax_console(self, context, instance_id, **kwargs):
+ ec2_id = instance_id[0]
+ internal_id = ec2_id_to_id(ec2_id)
+ return self.compute_api.get_ajax_console(context, internal_id)
+
def describe_volumes(self, context, volume_id=None, **kwargs):
volumes = self.volume_api.get_all(context)
# NOTE(vish): volume_id is an optional list of volume ids to filter by.
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index c8a9947f3..29af82533 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -283,6 +283,15 @@ class Controller(wsgi.Controller):
return faults.Fault(exc.HTTPUnprocessableEntity())
return exc.HTTPAccepted()
+ def get_ajax_console(self, req, id):
+ """ Returns a url to an instance's ajaxterm console. """
+ try:
+ self.compute_api.get_ajax_console(req.environ['nova.context'],
+ int(id))
+ except exception.NotFound:
+ return faults.Fault(exc.HTTPNotFound())
+ return exc.HTTPAccepted()
+
def diagnostics(self, req, id):
"""Permit Admins to retrieve server diagnostics."""
ctxt = req.environ["nova.context"]