You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2012/06/01 12:08:23 UTC
[dev] [jira] [Updated] (LIBCLOUD-202) KeyError on conn.list_images in
CloudStack compute
[ https://issues.apache.org/jira/browse/LIBCLOUD-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gabriel Reid updated LIBCLOUD-202:
----------------------------------
Attachment: cloudstack_list_images_key_error.patch
Patch (with unit tests) which fixes the KeyError issue
> KeyError on conn.list_images in CloudStack compute
> --------------------------------------------------
>
> Key: LIBCLOUD-202
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-202
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Reporter: Gabriel Reid
> Priority: Minor
> Labels: cloudstack
> Attachments: cloudstack_list_images_key_error.patch
>
>
> When conn.list_images() is called on a CloudStack connection, a KeyError is thrown when parsing the response due to a lack of any template information in the response.
> For example:
> >>> conn = Driver(key=CS_API_KEY, secret=CS_SECRET_KEY, ...)
> >>> conn.list_images()
> Traceback (most recent call last):
> File "cloudstack.py", line 24, in <module>
> images = conn.list_images()
> File "/usr/local/lib/python2.6/dist-packages/libcloud/compute/drivers/cloudstack.py", line 127, in list_images
> for img in imgs['template']:
> KeyError: 'template'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira