feature #1977: Fix 2 minor bugs (poll unknown VM and detach_nic)

This commit is contained in:
Tino Vazquez committed 2013-05-29 18:19:01 +02:00
1 parent ff1dd67282
commit b9bb70ab64
1 file changed
+5 -2
+5 -2
View File
@@ -147,7 +147,7 @@ class VIDriver
nic_to_detach = nil
vm.config.hardware.device.each{ |dv|
if dv.class.ancestors[1] == RbVmomi::VIM::VirtualEthernetCard
nic_to_detach = dv if nic.macAddress == mac
nic_to_detach = dv if dv.macAddress == mac
end
}
@@ -232,8 +232,11 @@ class VIDriver
# Get network information
net_info = get_perf_value([vm], ["net.packetsRx","net.packetsTx"])
state = get_state(vm)
return "STATE=d"+ if state.downcase == "d"
str_info = ""
str_info += "STATE=" + get_state(vm) + " "
str_info += "STATE=" + state + " "
str_info += "USEDCPU=" + get_used_cpu(vm) + " "
str_info += "USEDMEMORY=" + get_used_memory(vm)