mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
feature #476: apply hm hook only for NICs with phydev attributes
This commit is contained in:
parent
b34d3856fe
commit
9cf294daf3
@ -413,12 +413,14 @@ class OpenNebulaHM < OpenNebulaVLAN
|
|||||||
process do |nic|
|
process do |nic|
|
||||||
bridge = nic[:bridge]
|
bridge = nic[:bridge]
|
||||||
dev = nic[:phydev]
|
dev = nic[:phydev]
|
||||||
vlan = CONF[:start_vlan] + nic[:network_id].to_i
|
if dev
|
||||||
|
vlan = CONF[:start_vlan] + nic[:network_id].to_i
|
||||||
|
|
||||||
create_bridge bridge if !bridge_exists? bridge
|
create_bridge bridge if !bridge_exists? bridge
|
||||||
create_dev_vlan(dev, vlan) if !device_exists?(dev, vlan)
|
create_dev_vlan(dev, vlan) if !device_exists?(dev, vlan)
|
||||||
if !attached_bridge_dev?(bridge, dev, vlan)
|
if !attached_bridge_dev?(bridge, dev, vlan)
|
||||||
attach_brigde_dev(bridge, dev, vlan)
|
attach_brigde_dev(bridge, dev, vlan)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user