DescribeImages response prevents listing images correctly for ElastixFox/tAWS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Masanori Itoh |
Bug Description
Hi,
I'm working on nova using ElasticFox (1.7 build 000116 (EC2 API 2010-06-15)
and tAWS (0.5.0), and I noticed that current DescribeImages response contains
incompatibility which prevents ElasticFox and tAWS from displaying the result correctly.
There are two issues.
Currently, _format_image called from describe_images() in nova/api/
1) Appends 'name' property to <imageId> tag for images converted by
'nova-manage image convert'. (I.e., if 'name' exists)
ElasticFox and tAWS cannot handle this additional string and fail to display image listing.
I know that it's useful showing the original names, and so I suggest appending it
to <imageLocation> tag instead of <imageId> if 'name' exists.
2) Uses <type> instead of <imageType>. This is not compliant to EC2 API spec.
The patch below fixes the above two issues, and here are results
of euca-describe-
What do you think about?
=== modified file 'nova/api/
--- nova/api/
+++ nova/api/
@@ -886,10 +886,7 @@
image_type = image['
ec2_id = self._image_
name = image.get('name')
- if name:
- i['imageId'] = "%s (%s)" % (ec2_id, name)
- else:
- i['imageId'] = ec2_id
+ i['imageId'] = ec2_id
kernel_id = image['
if kernel_id:
@@ -897,11 +894,15 @@
if ramdisk_id:
- i['imageLocation'] = image['
+ if name:
+ i['imageLocation'] = "%s (%s)" % (image[
+ get('image_
+ else:
+ i['imageLocation'] = image['
- i['displayName'] = image.get('name')
+ i['displayName'] = name
- i['type'] = image_type
+ i['imageType'] = image_type
return i
BEFORE
|root@shayol:
|IMAGE ari-26b4ed32 (ari-tty) nova/tty-ramdisk admin available public x86_64 ramdisk
|IMAGE aki-303b6dd9 (aki-tty) nova/tty-kernel admin available public x86_64 kernel
|IMAGE ami-250c5dc3 (ami-tty) demo/tty admin available public x86_64 machine aki-303b6dd9 ari-26b4ed32
AFTER
|root@shayol:
|IMAGE ari-26b4ed32 nova/tty-ramdisk (ari-tty) admin available public x86_64 ramdisk
|IMAGE aki-303b6dd9 nova/tty-kernel (aki-tty) admin available public x86_64 kernel
|IMAGE ami-250c5dc3 demo/tty (ami-tty) admin available public x86_64 machine aki-303b6dd9 ari-26b4ed32
Related branches
- Devin Carlen (community): Approve
- Rick Harris (community): Approve
- Vish Ishaya (community): Approve
-
Diff: 34 lines (+8/-7)1 file modifiednova/api/ec2/cloud.py (+8/-7)
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
Hi,
I rebased lp:~itoumsn/nova/lp750482 to trunk rev 941, and I assigned this bug to me.
If it's confirmed, I will post a merge request.
Thanks,
-Masanori