You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by qu...@apache.org on 2017/11/11 02:51:18 UTC

[2/2] libcloud git commit: cloudstack: nics can have no addresses

cloudstack: nics can have no addresses

Signed-off-by: Quentin Pradet <qu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/96d29f59
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/96d29f59
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/96d29f59

Branch: refs/heads/trunk
Commit: 96d29f59572e5b92d257d5c36c01d750584b2b58
Parents: db4bc42
Author: Pierre-Yves Ritschard <py...@spootnik.org>
Authored: Thu Nov 9 16:56:10 2017 +0100
Committer: Quentin Pradet <qu...@apache.org>
Committed: Sat Nov 11 06:46:41 2017 +0400

----------------------------------------------------------------------
 libcloud/compute/drivers/cloudstack.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/96d29f59/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index 44ef8f5..a97758c 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -4648,6 +4648,8 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
         private_ips = []
 
         for nic in data['nic']:
+            if 'ipaddress' not in nic:
+                continue
             if is_private_subnet(nic['ipaddress']):
                 private_ips.append(nic['ipaddress'])
             else: