mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #1068: The onedatastore command now shows the DISK_TYPE
This commit is contained in:
parent
a64f23372a
commit
20df320d7c
@ -110,6 +110,7 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
|
||||
puts str % ["DS_MAD", datastore['DS_MAD']]
|
||||
puts str % ["TM_MAD", datastore['TM_MAD']]
|
||||
puts str % ["BASE PATH",datastore['BASE_PATH']]
|
||||
puts str % ["DISK_TYPE",Image::DISK_TYPES[datastore['DISK_TYPE'].to_i]]
|
||||
puts
|
||||
|
||||
CLIHelper.print_header(str_h1 % "PERMISSIONS",false)
|
||||
|
@ -102,14 +102,14 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
|
||||
{
|
||||
:name => "disk_type",
|
||||
:large => "--disk_type disk_type",
|
||||
:description => "Type of the image (BLOCK, CDROM or FILE)",
|
||||
:description => "Type of the image (BLOCK, CDROM, RBD or FILE)",
|
||||
:format => String,
|
||||
:proc => lambda do |o, options|
|
||||
type=o.strip.upcase
|
||||
if %w{BLOCK CDROM FILE}.include? type
|
||||
if %w{BLOCK CDROM FILE RBD}.include? type
|
||||
[0, type]
|
||||
else
|
||||
[-1, "Disk type must be BLOCK, CDROM or FILE"]
|
||||
[-1, "Disk type must be BLOCK, CDROM, RBD or FILE"]
|
||||
end
|
||||
end
|
||||
},
|
||||
|
@ -64,6 +64,8 @@ module OpenNebula
|
||||
"CONTEXT" => "CX"
|
||||
}
|
||||
|
||||
DISK_TYPES=%w{FILE CD_ROM BLOCK RBD}
|
||||
|
||||
# Creates an Image description with just its identifier
|
||||
# this method should be used to create plain Image objects.
|
||||
# +id+ the id of the image
|
||||
|
Loading…
x
Reference in New Issue
Block a user