[ 
https://issues.apache.org/jira/browse/LIBCLOUD-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287964#comment-13287964
 ] 

Tomaz Muraus commented on LIBCLOUD-201:
---------------------------------------

Hey, this seems like an API miss-use on your end and not an actual bug.

When you call 'list_records' and 'update_zone' you need to pass in Zone object 
to the function and not the zone id. Basically everywhere you see 'zone' 
argument you need to pass in Zone object and where you see 'zone_id' you need 
to pass in zone id string.
                
> zerigo.py - zone.id
> -------------------
>
>                 Key: LIBCLOUD-201
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-201
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.10.1
>         Environment: CentOS 6.2
>            Reporter: Gary Wilson
>              Labels: dns, libcloud, zerigo
>         Attachments: LIBCLOUD-201.patch
>
>
> in libcloud/dns/drivers/zerigo.py in the_get_more function lines 433 and 434 
> reference zone.id
> Within the list_records(ZONE_ID) function zone.id breaks this function:
> Traceback (most recent call last):
>   File "/opt/zpf/scripts/libcloud.zerigo.dns.list.records", line 52, in 
> <module>
>     for host in hosts:
>   File "/usr/lib/python2.6/site-packages/libcloud/common/types.py", line 95, 
> in __iter__
>     self._load_all()
>   File "/usr/lib/python2.6/site-packages/libcloud/common/types.py", line 121, 
> in _load_all
>     value_dict=self._value_dict)
>   File "/usr/lib/python2.6/site-packages/libcloud/dns/drivers/zerigo.py", 
> line 435, in _get_more
>     path = API_ROOT + 'zones/%s/hosts.xml' % (zone.id)
> AttributeError: 'str' object has no attribute 'id'
> I changed the zone.id to just zone and that seems to fix it...

--
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

        

Reply via email to