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

feature #1797: cli and ruby oca restart -> boot

This commit is contained in:
Javi Fontan 2013-03-14 18:57:11 +01:00
parent 28dae143b5
commit 9dd1baacee
2 changed files with 8 additions and 6 deletions

View File

@ -398,19 +398,19 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
end
restart_desc = <<-EOT.unindent
boot_desc = <<-EOT.unindent
Boots the given VM.
States: UNKNOWN, BOOT, POWEROFF
EOT
command :restart, restart_desc, [:range,:vmid_list],
command :boot, boot_desc, [:range,:vmid_list],
:options => [OneVMHelper::SCHEDULE] do
if (!options[:schedule].nil?)
helper.schedule_actions(args[0], options, @comm_name)
else
helper.perform_actions(args[0],options,"restarting") do |vm|
vm.restart
helper.perform_actions(args[0],options,"booting") do |vm|
vm.boot
end
end
end

View File

@ -293,10 +293,12 @@ module OpenNebula
end
# Forces a re-deployment of a VM in UNKNOWN or BOOT state
def restart
action('restart')
def boot
action('boot')
end
alias_method :restart, :boot
# Resubmits a VM to PENDING state
def resubmit
action('resubmit')