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

Feature #1678: Add local system DS capacity section to onehost show

This commit is contained in:
Carlos Martín 2013-10-25 11:53:23 +02:00
parent b6d1960f89
commit dd70961c90

View File

@ -278,6 +278,16 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
puts str % ["RUNNING VMS", host['HOST_SHARE/RUNNING_VMS']]
puts
datastores = [host.to_hash['HOST']['HOST_SHARE']['DATASTORES']['DS']].flatten
datastores.each do |datastore|
CLIHelper.print_header(str_h1 % "LOCAL SYSTEM DATASTORE ##{datastore['ID']} CAPACITY", false)
puts str % ["TOTAL:", OpenNebulaHelper.unit_to_str(datastore['TOTAL_MB'].to_i, {},'M')]
puts str % ["USED: ", OpenNebulaHelper.unit_to_str(datastore['USED_MB'].to_i, {},'M')]
puts str % ["FREE:", OpenNebulaHelper.unit_to_str(datastore['FREE_MB'].to_i, {},'M')]
puts
end
CLIHelper.print_header(str_h1 % "MONITORING INFORMATION", false)
puts host.template_str