mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 01:03:14 +09:00
Fix minor vnet bug in vcenter
This commit is contained in:
1 parent
14a159d3f5
commit
04c09dd963
1 file changed
+5
-2
@@ -660,10 +660,13 @@ class Template
|
||||
nic[:mac] = device.macAddress rescue nil
|
||||
if wild?
|
||||
if online?
|
||||
inets_raw = @item["guest.net"].map.with_index { |x,i| [x.macAddress, x] } unless inets_raw
|
||||
inets_raw ||= @item["guest.net"].map.with_index { |x,i| [x.macAddress, x] }
|
||||
inets = parse_live.call(inets_raw) if inets.empty?
|
||||
|
||||
ipAddresses = inets[nic[:mac]].ipConfig.ipAddress
|
||||
if !inets[nic[:mac]]
|
||||
ipAddresses = inets[nic[:mac]].ipConfig.ipAddress
|
||||
end
|
||||
|
||||
if !ipAddresses.nil? && !ipAddresses.empty?
|
||||
nic[:ipv4], nic[:ipv4_additionals] = nil
|
||||
nic[:ipv6], nic[:ipv6_ula], nic[:ipv6_global], nic[:ipv6_additionals] = nil
|
||||
|
||||
Reference in new issue
Block a user