1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #132: Reboot method for OCA (Ruby bindings). Add reboot command for onevm tool

This commit is contained in:
Ruben S. Montero 2011-12-26 00:46:42 +01:00
parent 6713600f0d
commit 05a52847b1
3 changed files with 19 additions and 1 deletions

View File

@ -182,6 +182,19 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
end
reboot_desc = <<-EOT.unindent
Reboots the given VM, this is equivalent to execute the reboot command
from the VM console.
States: RUNNING
EOT
command :reboot, reboot_desc, [:range,:vmid_list] do
helper.perform_actions(args[0],options,"rebooting") do |vm|
vm.reboot
end
end
deploy_desc = <<-EOT.unindent
Deploys the given VM in the specified Host. This command forces the
deployment, in a standard installation the Scheduler is in charge

View File

@ -36,7 +36,7 @@ class VirtualMachineDriver < OpenNebulaDriver
ACTION = {
:deploy => "DEPLOY",
:shutdown => "SHUTDOWN",
:reboot => "REBOOT"
:reboot => "REBOOT",
:cancel => "CANCEL",
:save => "SAVE",
:restore => "RESTORE",

View File

@ -143,6 +143,11 @@ module OpenNebula
action('shutdown')
end
# Shutdowns an already deployed VM
def reboot
action('reboot')
end
# Cancels a running VM
def cancel
action('cancel')