diff --git a/include/Datastore.h b/include/Datastore.h index 57f757b28d..2e7816f8e1 100644 --- a/include/Datastore.h +++ b/include/Datastore.h @@ -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 */ diff --git a/include/ImageManager.h b/include/ImageManager.h index 1f32bbb4f3..d8eb8fcb10 100644 --- a/include/ImageManager.h +++ b/include/ImageManager.h @@ -215,7 +215,7 @@ private: ImagePool * ipool; /** - * Pointer to the Image Pool to access VMs + * Pointer to the DS Pool */ DatastorePool * dspool; diff --git a/include/PoolSQL.h b/include/PoolSQL.h index fed7b87ff6..6cd6a6d375 100644 --- a/include/PoolSQL.h +++ b/include/PoolSQL.h @@ -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 */ diff --git a/src/cli/etc/onedatastore.yaml b/src/cli/etc/onedatastore.yaml index 9081f21403..f3feb939aa 100644 --- a/src/cli/etc/onedatastore.yaml +++ b/src/cli/etc/onedatastore.yaml @@ -11,7 +11,6 @@ :SIZE: :desc: Total Datastore size :size: 10 - :left: true :AVAIL: :desc: Free Datastore size (%) diff --git a/src/cli/one_helper/onedatastore_helper.rb b/src/cli/one_helper/onedatastore_helper.rb index 3137ab700e..b640ce94f5 100644 --- a/src/cli/one_helper/onedatastore_helper.rb +++ b/src/cli/one_helper/onedatastore_helper.rb @@ -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)