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

Bug #1334: Add sanity checks to oneacct

(cherry picked from commit 7f4db04a34f8a3af916e4e09f5e78b3e87de7e8d)
This commit is contained in:
Carlos Martín 2012-07-05 12:45:03 +02:00
parent a93ba1502d
commit 9b8fbb240d

View File

@ -136,15 +136,19 @@ public
CLIHelper.scr_bold
CLIHelper.scr_underline
username =
xmldoc.retrieve_elements(["HISTORY/VM[UID=#{uid}]/UNAME"]).uniq;
puts "# User #{uid} #{username} "
username_elems =
xmldoc.retrieve_elements(["HISTORY/VM[UID=#{uid}]/UNAME"])
username = username_elems.nil? ? "" : username_elems.uniq
puts "# User #{uid} #{username}".ljust(80)
CLIHelper.scr_restore
puts
history_elems.clear
vm_ids = xmldoc.retrieve_elements("HISTORY/VM[UID=#{uid}]/ID")
vm_ids = [] if vm_ids.nil?
vm_ids.uniq!
vm_ids.each do |vid|