mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-18 02:42:54 +09:00
Bug #1334: Add sanity checks to oneacct
This commit is contained in:
1 parent
82cbf0ff65
commit
7f4db04a34
1 file changed
+7
-3
+7
-3
@@ -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|
|
||||
|
||||
Reference in new issue
Block a user