1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

Feature #1224: Allow snapshot commands for multiple VMs

This commit is contained in:
Carlos Martín 2013-02-21 14:43:35 +01:00
parent f94ba3da52
commit 51de89ff70

View File

@ -627,8 +627,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Creates a new VM snapshot Creates a new VM snapshot
EOT EOT
command :"snapshot-create", snapshot_create_desc, :vmid, [:name, nil] do command :"snapshot-create", snapshot_create_desc, [:range,:vmid_list],
helper.perform_action(args[0],options,"snapshot created") do |o| [:name, nil] do
helper.perform_actions(args[0],options,"snapshot created") do |o|
o.snapshot_create(args[1]) o.snapshot_create(args[1])
end end
end end
@ -638,8 +640,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Reverts a VM to a saved snapshot Reverts a VM to a saved snapshot
EOT EOT
command :"snapshot-revert", snapshot_revert_desc, :vmid, :snapshot_id do command :"snapshot-revert", snapshot_revert_desc, [:range,:vmid_list],
helper.perform_action(args[0],options,"snapshot reverted") do |o| :snapshot_id do
helper.perform_actions(args[0],options,"snapshot reverted") do |o|
o.snapshot_revert(args[1].to_i) o.snapshot_revert(args[1].to_i)
end end
end end