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

wu jiang wingwj at gmail.com
Wed Feb 12 03:49:43 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140212/f112fea5/attachment.html>


More information about the OpenStack-dev mailing list