exosite-archive / chube

Object-oriented bindings for the Linode API
MIT License
26 stars 3 forks source link

Fix KeyError bug in add_private_ip to reference value returned by Linode API #12

Closed kday closed 9 years ago

kday commented 9 years ago

The add_private_ip method successfully assigns a private IP address. However, the method fails when trying to lookup and return that IP address.

It returns:

KeyError: 'IPAddressID'

It looks like the new API response from Linode for that method uses all capital letters for it's parameters. Upon inspecting the actual response, I get this instead:

{u'IPADDRESS': u'192.168.181.144', u'IPADDRESSID': 230512}

I'm not sure what's going on with Linode, because their API documentation still shows the old parameter names:

https://www.linode.com/api/linode/linode.ip.addprivate

Regardless, this patch gets chube up to date with the actual return values.

danslimmon commented 9 years ago

Sweet! Thanks!