diff options
| author | Soren Hansen <soren.hansen@rackspace.com> | 2010-10-11 15:48:22 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-10-11 15:48:22 +0000 |
| commit | c9c04b565b3268c29bf0ce602dd08cd5b57a0884 (patch) | |
| tree | 42bddadf73b7c9475cbf3e96c2ed50f84ccda70c /nova/api | |
| parent | 05e129b0d3e019efb5490266e05b9e157e0a50de (diff) | |
| parent | f447e1a3a2234e0ab3a5e281442659626f8d99bd (diff) | |
Fix EC2 GetConsoleOutput method and add unit tests for it.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 6 | ||||
| -rw-r--r-- | nova/api/ec2/images.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 175bb493c..11e54d2b5 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -258,9 +258,9 @@ class CloudController(object): def delete_security_group(self, context, group_name, **kwargs): return True - def get_console_output(self, context, ec2_id_list, **kwargs): - # ec2_id_list is passed in as a list of instances - ec2_id = ec2_id_list[0] + def get_console_output(self, context, instance_id, **kwargs): + # instance_id is passed in as a list of instances + ec2_id = instance_id[0] internal_id = ec2_id_to_internal_id(ec2_id) instance_ref = db.instance_get_by_internal_id(context, internal_id) return rpc.call('%s.%s' % (FLAGS.compute_topic, diff --git a/nova/api/ec2/images.py b/nova/api/ec2/images.py index cb54cdda2..f0a43dad6 100644 --- a/nova/api/ec2/images.py +++ b/nova/api/ec2/images.py @@ -69,6 +69,9 @@ def list(context, filter_list=[]): optionally filtered by a list of image_id """ + if FLAGS.connection_type == 'fake': + return [{ 'imageId' : 'bar'}] + # FIXME: send along the list of only_images to check for response = conn(context).make_request( method='GET', |
