def list
@machines = {}
Machine.find(:all, :select => "distinct email").map{|x| x.email}.each do |email|
@machines[email] = Machine.find(:all, :conditions => "email = '#{email}'", :order => 'cloud')
end
@memory = Cloud.sum('memory')
@cloud_machines = Cloud.find(:all)
@cloud_names = {}
@cloud_machines.each do |machine|
printed_name = machine.name
if machine.virttype
printed_name += (machine.virttype == "Xen") ? " (Xen)": " (KVM)"
end
@cloud_names[machine.name] = printed_name
end
render :status
end