[openstack-dev] [Nova] modify_image_attribute() in ec2_api is broken in Nova

Vishvananda Ishaya vishvananda at gmail.com
Wed Feb 12 18:18:03 UTC 2014


This looks like a bug to me. It would be great if you could report it on launchpad.

Vish

On Feb 11, 2014, at 7:49 PM, wu jiang <wingwj at gmail.com> wrote:

> Hi all,
> 
> I met some problems when testing an ec2_api:'modify_image_attribute()' in Nova.
> I found the params send to Nova, are not suitable to match it in AWS api.
> I logged it in launchpad: https://bugs.launchpad.net/nova/+bug/1272844
> 
> -------------
> 
> 1. Here is the definition part of modify_image_attribute(): 
> 
>     def modify_image_attribute(
>         self, context, image_id, attribute, operation_type, **kwargs)
> 
> 2. And here is the example of it in AWS api:
> 
> https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&LaunchPermission.Remove.1.UserId=111122223333
> 
> -----
> 
> 3. You can see the value isn't suitable to match the defination in Nova codes.
>     Therefore, Nova will raise the exception like this:
> 
> >TypeError: 'modify_image_attribute() takes exactly 5 non-keyword arguments (3 given)'
> 
> 4. I printed out the params send to Nova via eucaTools.
>     The results also validate the conclusions above:
> 
> > args={'launch_permission': {'add': {'1': {'group': u'all'}}}, 'image_id': u'ami-00000004'} 
> 
> --------------
> 
> So, is this api correct? Should we need to modify it according to the format of AWS api?
> 
> 
> Best Wishes,
> wingwj
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140212/8a39b7ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140212/8a39b7ec/attachment.pgp>


More information about the OpenStack-dev mailing list