F #1509: Added more data to the description and possibility to introduce TiB

This commit is contained in:
juanmont authored and Ruben S. Montero committed 2018-04-26 17:06:04 +02:00
1 parent 9effa47d26
commit 32d61bc6c5
2 files changed
+8 -1

No files matched your search

+3 -1
View File
@@ -794,13 +794,15 @@ EOT
end
def OpenNebulaHelper.size_in_mb(size)
m = size.match(/^(\d+(?:\.\d+)?)(m|mb|g|gb)?$/i)
m = size.match(/^(\d+(?:\.\d+)?)(t|tb|m|mb|g|gb)?$/i)
if !m
# return OpenNebula::Error.new('Size value malformed')
return -1, 'Size value malformed'
else
multiplier=case m[2]
when /(t|tb)/i
1024*1024
when /(g|gb)/i
1024
else
+5
View File
@@ -879,6 +879,11 @@ cmd=CommandParser::CmdParser.new(ARGV) do
disk_resize_desc = <<-EOT.unindent
Resizes a VM disk. The new size should be larger than the old one.
The valid units are:
- T: TiB
- G: GiB
- M: MiB
By default is MiB.
States: RUNNING, POWEROFF
EOT