mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #1224: Make the snapshot name optional in the CLI
This commit is contained in:
parent
ddcc7dc655
commit
75a6692761
@ -627,7 +627,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
Creates a new VM snapshot
|
||||
EOT
|
||||
|
||||
command :"snapshot-create", snapshot_create_desc, :vmid, :name do
|
||||
command :"snapshot-create", snapshot_create_desc, :vmid, [:name, nil] do
|
||||
helper.perform_action(args[0],options,"snapshot created") do |o|
|
||||
o.snapshot_create(args[1])
|
||||
end
|
||||
|
@ -417,7 +417,8 @@ module OpenNebula
|
||||
#
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def snapshot_create(name)
|
||||
def snapshot_create(name="")
|
||||
name ||= ""
|
||||
return call(VM_METHODS[:snapshotcreate], @pe_id, name)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user