Skip to content

Commit d1793a0

Browse files
committed
Merge pull request #113 from franklouwers/bug/fix-no-nic
Fixes bug when VM has no nic (eg in Expunging state) (closes Issue #4)
2 parents dd9da43 + ff0eb05 commit d1793a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/knife-cloudstack/connection.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def get_server_public_ip(server, cached_rules=nil, cached_nat=nil)
114114
if ip_addr
115115
return ip_addr['ipaddress']
116116
end
117+
if nic.empty?
118+
return []
119+
end
117120
nic['ipaddress'] || []
118121
end
119122

0 commit comments

Comments
 (0)