<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This looks like a bug to me. It would be great if you could report it on launchpad.<div><br></div><div>Vish</div><div><br><div><div>On Feb 11, 2014, at 7:49 PM, wu jiang <<a href="mailto:wingwj@gmail.com">wingwj@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><span style="font-family:verdana,sans-serif;font-size:x-small">Hi all,</span></div><div style="font-family:verdana,sans-serif;font-size:x-small"><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><font face="verdana, sans-serif" size="1">I met some problems when testing an ec2_api:'modify_image_attribute()'</font><span style="font-family:verdana,sans-serif;font-size:x-small"> in Nova.</span><div>
<span style="font-family:verdana,sans-serif;font-size:x-small">I found the params send to Nova, are not suitable to match it in AWS api.</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">I logged it in launchpad: </span><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="https://bugs.launchpad.net/nova/+bug/1272844">https://bugs.launchpad.net/nova/+bug/1272844</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">-------------</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">1. Here is the definition part of modify_image_attribute(): </span><br></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"> def modify_image_attribute(</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"> self, context, image_id, attribute, operation_type, **kwargs)</span><br>
</div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">2. And here is the example of it in AWS api:</span><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><a href="https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&LaunchPermission.Remove.1.UserId=111122223333">https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&LaunchPermission.Remove.1.UserId=111122223333</a><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">-----</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">3. You can see the value isn't suitable to match the defination in Nova codes.</span><br></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"> Therefore, Nova will raise the exception like this:</span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><font face="verdana, sans-serif" size="1">>TypeError: 'modify_image_attribute() takes exactly 5 non-keyword arguments (3 given)'</font><br>
</div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><div>4. I printed out the params send to Nova via eucaTools.</div><div> The results also validate the conclusions above:</div>
<div><br></div><div>> args={'launch_permission': {'add': {'1': {'group': u'all'}}}, 'image_id': u'ami-00000004'} </div></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br>
</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">--------------</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small"><br></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">So, is this api correct? Should we need to modify it according to the format of AWS api?</span></div>
<div><br></div><div><br></div><div><div>Best Wishes,</div><div>wingwj</div></div></div>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote></div><br></div></body></html>