diff options
| author | Nachi Ueno <nati.ueno@gmail.com> | 2011-01-12 18:46:01 +0900 |
|---|---|---|
| committer | Nachi Ueno <nati.ueno@gmail.com> | 2011-01-12 18:46:01 +0900 |
| commit | 0a33f1ed87ffb2ad3ff6c41848e2bb254a62e3da (patch) | |
| tree | bd42398ad08cecdcf72c54c7982d57a8867f6402 /nova/api | |
| parent | 04cd3241f442f1c6a9fd030ab47b4d15e79ec032 (diff) | |
| parent | 76fdd667f2efe7e2dc710fe0254437d176efb45c (diff) | |
| download | nova-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.py | 5 | ||||
| -rw-r--r-- | nova/api/openstack/servers.py | 9 |
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"] |
