From 9dd1baacee537126086d378b45c35db60dda4b83 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 14 Mar 2013 18:57:11 +0100 Subject: [PATCH] feature #1797: cli and ruby oca restart -> boot --- src/cli/onevm | 8 ++++---- src/oca/ruby/opennebula/virtual_machine.rb | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cli/onevm b/src/cli/onevm index 1422cdecd3..0ffff221d9 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -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 diff --git a/src/oca/ruby/opennebula/virtual_machine.rb b/src/oca/ruby/opennebula/virtual_machine.rb index b83a23316a..f1e6f6043d 100644 --- a/src/oca/ruby/opennebula/virtual_machine.rb +++ b/src/oca/ruby/opennebula/virtual_machine.rb @@ -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')