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:
parent
6713600f0d
commit
05a52847b1
@ -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
|
||||
|
@ -36,7 +36,7 @@ class VirtualMachineDriver < OpenNebulaDriver
|
||||
ACTION = {
|
||||
:deploy => "DEPLOY",
|
||||
:shutdown => "SHUTDOWN",
|
||||
:reboot => "REBOOT"
|
||||
:reboot => "REBOOT",
|
||||
:cancel => "CANCEL",
|
||||
:save => "SAVE",
|
||||
:restore => "RESTORE",
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user