libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris O'Brien (JIRA)" <>
Subject [jira] [Created] (LIBCLOUD-707) CloudSigma driver throws exception when parsing response in list_nodes
Date Thu, 07 May 2015 10:59:59 GMT
Chris O'Brien created LIBCLOUD-707:

             Summary: CloudSigma driver throws exception when parsing response in list_nodes
                 Key: LIBCLOUD-707
             Project: Libcloud
          Issue Type: Bug
          Components: Compute
    Affects Versions: 0.13.3, 0.14.0-beta3, 0.15.0, 0.15.1
            Reporter: Chris O'Brien

While attempting to parse the IPs from a node's NICs in CloudSigma's API response, libcloud
throws an exception when the node's IP is static: 

TypeError: unhashable type: 'dict'
File "/home/dbs_support/dev/libcloudsigma/", line 55, in <module>
  instances = deployer.getInstances()
File "/home/dbs_support/dev/libcloudsigma/", line 44, in getInstances
  return self.driver.list_nodes()
File "/home/dbs_support/lib/libcloud/compute/drivers/", line 1026, in list_nodes
  nodes = [self._to_node(data=item) for item in response['objects']]
File "/home/dbs_support/lib/libcloud/compute/drivers/", line 1910, in _to_node
  _public_ips, _private_ips = self._parse_ips_from_nic(nic=nic)
File "/home/dbs_support/lib/libcloud/compute/drivers/", line 1888, in _parse_ips_from_nic
  ips = set(ips)

It seems that libcloud doesn't account for CloudSigma's response for static IPs containing
the 'uuid' as a subobject of 'ip' in the 'ip_v4_conf' for a NIC.  
For example, a NIC with a static IP belonging to a server:

The NIC's {{\['ip_v4_conf'\]\['ip'\]}} object (which is a dict) gets put into a list (ips)
with other strings (representing IPs).  It chokes when attempting to convert this list containing
both dicts and strings into a set.  

This message was sent by Atlassian JIRA

View raw message