1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #1739: Fix wrong host vmware polling when libvirt returns warnings

This commit is contained in:
Tino Vazquez 2013-02-13 18:45:22 +01:00
parent e37c4d1665
commit 6437653813

View File

@ -86,10 +86,10 @@ end
def get_vm_names
rc, data = do_action("virsh -c #{@uri} --readonly list")
return [] if !rc
lines=data.split(/\n/)[2..-1]
data.gsub!(/^.*----$/m, '').strip!
lines=data.split(/\n/)
lines.map do |line|
line.split(/\s+/).delete_if {|d| d.empty? }[1]
@ -102,7 +102,6 @@ end
def get_all_vm_info(host, vms)
puts "VM_POLL=YES"
vms.each do |vm|
info=get_vm_info(host, vm)