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

Feature #1613: Minor changes

This commit is contained in:
Carlos Martín 2013-07-12 16:51:36 +02:00
parent 8df7cb816f
commit a771e7e271
5 changed files with 14 additions and 9 deletions

View File

@ -164,7 +164,7 @@ public:
/**
* Returns the available capacity in the datastore.
* @params avail the total available size in the datastore (mb)
* @params avail the total available size in the datastore (MB)
* @return true if the datastore is configured to enforce capacity
* checkings
*/

View File

@ -215,7 +215,7 @@ private:
ImagePool * ipool;
/**
* Pointer to the Image Pool to access VMs
* Pointer to the DS Pool
*/
DatastorePool * dspool;

View File

@ -100,7 +100,7 @@ public:
/**
* List the objects in the pool
* @param oids a vector with the oids of the objects.
* @param the name of the DB table.
* @param table the name of the DB table.
*
* @return 0 on success
*/

View File

@ -11,7 +11,6 @@
:SIZE:
:desc: Total Datastore size
:size: 10
:left: true
:AVAIL:
:desc: Free Datastore size (%)

View File

@ -48,8 +48,12 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
d["NAME"]
end
column :SIZE, "Datastore total size", :left, :size =>10 do |d|
OpenNebulaHelper.unit_to_str(d['TOTAL_MB'].to_i, {}, 'M')
column :SIZE, "Datastore total size", :size =>10 do |d|
if d['TEMPLATE']['TYPE'] == 'SYSTEM_DS'
"-"
else
OpenNebulaHelper.unit_to_str(d['TOTAL_MB'].to_i, {}, 'M')
end
end
column :AVAIL, "Datastore free size", :left, :size =>5 do |d|
@ -111,6 +115,8 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
str="%-15s: %-20s"
str_h1="%-80s"
system = datastore.type == 1
CLIHelper.print_header(str_h1 % "DATASTORE #{datastore['ID']} INFORMATION")
puts str % ["ID", datastore.id.to_s]
puts str % ["NAME", datastore.name]
@ -126,9 +132,9 @@ 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')]
puts str % ["TOTAL:", system ? '-' : OpenNebulaHelper.unit_to_str(datastore['TOTAL_MB'].to_i, {},'M')]
puts str % ["USED: ", system ? '-' : OpenNebulaHelper.unit_to_str(datastore['USED_MB'].to_i, {},'M')]
puts str % ["FREE:", system ? '-' : OpenNebulaHelper.unit_to_str(datastore['FREE_MB'].to_i, {},'M')]
puts
CLIHelper.print_header(str_h1 % "PERMISSIONS",false)