You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/11/07 15:02:05 UTC
svn commit: r1198739 - /libcloud/trunk/libcloud/compute/drivers/cloudstack.py
Author: tomaz
Date: Mon Nov 7 14:02:05 2011
New Revision: 1198739
URL: http://svn.apache.org/viewvc?rev=1198739&view=rev
Log:
"publicipaddress" field in the CloudStack driver are not always available. This
patch has been contributed by "gigimon" and is part of GITHUB-36.
Modified:
libcloud/trunk/libcloud/compute/drivers/cloudstack.py
Modified: libcloud/trunk/libcloud/compute/drivers/cloudstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/cloudstack.py?rev=1198739&r1=1198738&r2=1198739&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/cloudstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/cloudstack.py Mon Nov 7 14:02:05 2011
@@ -120,7 +120,7 @@ class CloudStackNodeDriver(CloudStackDri
addrs = self._sync_request('listPublicIpAddresses')
public_ips = {}
- for addr in addrs['publicipaddress']:
+ for addr in addrs.get('publicipaddress', []):
if 'virtualmachineid' not in addr:
continue
vm_id = addr['virtualmachineid']