Skip to content

Commit ff0eb05

Browse files
author
Frank Louwers
committed
Fixes bug when VM has no nic (eg in Expunging state) (closes Issue #4)
1 parent dd9da43 commit ff0eb05

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)