Gary Wilson created LIBCLOUD-343:
------------------------------------

             Summary: digitalocean json response bug on list_nodes
                 Key: LIBCLOUD-343
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-343
             Project: Libcloud
          Issue Type: Bug
          Components: Compute
         Environment: python="2.6"
hardwaremodel="x86_64"
installed_libcloud_version="0.12.4"
is_virtual="true"
kernel="Linux"
kernelrelease="2.6.32-358.6.2.el6.x86_64"
lsbdistdescription="CentOS release 6.4 (Final)"

            Reporter: Gary Wilson


Running 0.12.4

list_nodes is returning a rogue 'u' char in the responses from digitalocean, 
however rackspace and AWS remain OK

<pre>
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

DIGITALOCEAN_USER    = 'xxxxx'
DIGITALOCEAN_KEY     = 'xxxxx'

DigitalOceanDriver = get_driver(Provider.DIGITAL_OCEAN)
driver             = DigitalOceanDriver(DIGITALOCEAN_USER, DIGITALOCEAN_KEY)

nodes = driver.list_nodes()
for node in nodes:
  print(node.__dict__)
</pre>

The response with rogue u's on public_ips and name:

<pre>
{'private_ips': [], 'extra': {'backups_active': None, 'region_id': 2}, 'image': 
None, '_uuid': None, 'driver': 
<libcloud.compute.drivers.digitalocean.DigitalOceanNodeDriver object at 
0x7fd0870aded0>, 'state': 0, 'public_ips': [u'123.123.123.123'], 'size': None, 
'id': '237305', 'name': u'dev-20g-doa'}
{'private_ips': [], 'extra': {'backups_active': None, 'region_id': 2}, 'image': 
None, '_uuid': None, 'driver': 
<libcloud.compute.drivers.digitalocean.DigitalOceanNodeDriver object at 
0x7fd0870aded0>, 'state': 0, 'public_ips': [u'123.123.123.123'], 'size': None, 
'id': '238143', 'name': u'test'}
</pre>

The digitalocean json response seems fine:

<pre>
{"status":"OK","droplets":[{"id":237305,"name":"dev-20g-doa","image_id":365680,"size_id":66,"region_id":2,"backups_active":null,"ip_address":"123.123.123.123","status":"active","created_at":"2013-06-18T15:36:30Z"},{"id":238143,"name":"test","image_id":449303,"size_id":66,"region_id":2,"backups_active":null,"ip_address":"123.123.123.123","status":"active","created_at":"2013-06-18T23:26:06Z"}]}
</pre>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to