Merge lp:~soren/nova/lp681600 into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Vish Ishaya
Approved revision: 427
Merged at revision: 427
Proposed branch: lp:~soren/nova/lp681600
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 17 lines (+5/-2)
1 file modified
nova/api/ec2/cloud.py (+5/-2)
To merge this branch: bzr merge lp:~soren/nova/lp681600
Reviewer Review Type Date Requested Status
Vish Ishaya (community) Approve
Jay Pipes (community) Approve
Review via email: mp+42186@code.launchpad.net

Commit message

Fix DescribeImages EC2 API call.

Reluctantly not including unit tests. I've filed bug #682888 about it. I think this is important enough to get fixed that we can defer the tests for a few days.

Description of the change

Fix DescribeImages EC2 API call.

Reluctantly not including unit tests. I've filed bug #682888 about it. I think this is important enough to get fixed that we can defer the tests for a few days.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

would be good to rename imageSet to images (for pylint naming). But other than that, looks good to me. :)

review: Approve
Revision history for this message
Soren Hansen (soren) wrote :

2010/11/30 Jay Pipes <email address hidden>:
> would be good to rename imageSet to images (for pylint naming).  But other than that, looks good to me. :)

Your wish is my command.

--
Soren Hansen
Ubuntu Developer    http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

lp:~soren/nova/lp681600 updated
427. By Soren Hansen

Rename imageSet variable to images.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/ec2/cloud.py'
2--- nova/api/ec2/cloud.py 2010-11-18 21:27:52 +0000
3+++ nova/api/ec2/cloud.py 2010-11-30 08:22:28 +0000
4@@ -994,8 +994,11 @@
5 return True
6
7 def describe_images(self, context, image_id=None, **kwargs):
8- imageSet = self.image_service.index(context, image_id)
9- return {'imagesSet': imageSet}
10+ # Note: image_id is a list!
11+ images = self.image_service.index(context)
12+ if image_id:
13+ images = filter(lambda x: x['imageId'] in image_id, images)
14+ return {'imagesSet': images}
15
16 def deregister_image(self, context, image_id, **kwargs):
17 self.image_service.deregister(context, image_id)