mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
feature #2097: Fine tune new VMware net drivers
(cherry picked from commit 9b959b8af3c282de98f43e624fee606aea721551)
This commit is contained in:
1 parent
57a7e19578
commit
e608cca2b9
1 file changed
+3
-3
@@ -42,7 +42,7 @@ class OpenNebulaVMware < OpenNebulaNetwork
|
||||
XPATH_FILTER = "TEMPLATE/NIC"
|
||||
VCLI_CMD = "/sbin/esxcfg-vswitch"
|
||||
|
||||
def initialize(vm, host, deploy_id = nil, hypervisor = nil)
|
||||
def initialize(vm, deploy_id = nil, hypervisor = nil)
|
||||
super(vm,XPATH_FILTER,deploy_id,hypervisor)
|
||||
|
||||
@locking = false
|
||||
@@ -80,10 +80,10 @@ class OpenNebulaVMware < OpenNebulaNetwork
|
||||
def add_pg_to_switch(host, pg, switch, vlan)
|
||||
# Check's first if the vSwitch exists
|
||||
add_pg_cmd = "((esxcfg-vswitch vSwitch0 -l|grep #{pg})"
|
||||
add_pg_cmd += "&& #{VCLI_CMD} #{switch} --add-pg #{pg})"
|
||||
add_pg_cmd += " || #{VCLI_CMD} #{switch} --add-pg #{pg})"
|
||||
|
||||
if vlan
|
||||
add_pg_cmd = "; #{VCLI_CMD} #{switch} -p #{pg} --vlan=#{vlan}"
|
||||
add_pg_cmd += "; #{VCLI_CMD} #{switch} -p #{pg} --vlan=#{vlan}"
|
||||
end
|
||||
|
||||
do_ssh_action(add_pg_cmd, host)
|
||||
|
||||
Reference in new issue
Block a user