mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #1678: Do not show local system DS monitoring information in onedatastore output
This commit is contained in:
parent
cce158ef4a
commit
8a58141fb1
@ -49,7 +49,12 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
|
||||
end
|
||||
|
||||
column :SIZE, "Datastore total size", :size =>10 do |d|
|
||||
OpenNebulaHelper.unit_to_str(d['TOTAL_MB'].to_i, {}, 'M')
|
||||
shared = d['TEMPLATE']['SHARED']
|
||||
if shared != nil && shared.upcase == 'NO'
|
||||
"-"
|
||||
else
|
||||
OpenNebulaHelper.unit_to_str(d['TOTAL_MB'].to_i, {}, 'M')
|
||||
end
|
||||
end
|
||||
|
||||
column :AVAIL, "Datastore free size", :left, :size =>5 do |d|
|
||||
@ -126,9 +131,13 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
|
||||
puts
|
||||
|
||||
CLIHelper.print_header(str_h1 % "DATASTORE 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')]
|
||||
|
||||
shared = datastore['TEMPLATE/SHARED']
|
||||
local = shared != nil && shared.upcase == 'NO'
|
||||
|
||||
puts str % ["TOTAL:", local ? '-' : OpenNebulaHelper.unit_to_str(datastore['TOTAL_MB'].to_i, {},'M')]
|
||||
puts str % ["USED: ", local ? '-' : OpenNebulaHelper.unit_to_str(datastore['USED_MB'].to_i, {},'M')]
|
||||
puts str % ["FREE:", local ? '-' : OpenNebulaHelper.unit_to_str(datastore['FREE_MB'].to_i, {},'M')]
|
||||
puts
|
||||
|
||||
CLIHelper.print_header(str_h1 % "PERMISSIONS",false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user