From 850ab086bcebb22e0780169742ee9e49965d8ef1 Mon Sep 17 00:00:00 2001 From: Eric Stonfer Date: Tue, 7 Aug 2012 12:20:57 -0400 Subject: [PATCH] fix reboot guest in vsphere to reboot rather than shutdown guest --- lib/fog/aws/requests/elb/create_load_balancer.rb | 2 +- lib/fog/vsphere/requests/compute/vm_reboot.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/aws/requests/elb/create_load_balancer.rb b/lib/fog/aws/requests/elb/create_load_balancer.rb index b18f55941..c12d16d08 100644 --- a/lib/fog/aws/requests/elb/create_load_balancer.rb +++ b/lib/fog/aws/requests/elb/create_load_balancer.rb @@ -77,7 +77,7 @@ module Fog 'AvailabilityZones' => availability_zones, 'Subnets' => options[:subnet_ids], 'Scheme' => options[:scheme].nil? ? 'internet-facing' : options[:scheme], - 'SecurityGroups' => options[:security_groups], + 'SecurityGroups' => options[:security_groups].nil? ? [] : options[:security_groups], 'CanonicalHostedZoneName' => '', 'CanonicalHostedZoneNameID' => '', 'CreatedTime' => Time.now, diff --git a/lib/fog/vsphere/requests/compute/vm_reboot.rb b/lib/fog/vsphere/requests/compute/vm_reboot.rb index d9a975173..c506ece68 100644 --- a/lib/fog/vsphere/requests/compute/vm_reboot.rb +++ b/lib/fog/vsphere/requests/compute/vm_reboot.rb @@ -15,7 +15,7 @@ module Fog task.wait_for_completion { 'task_state' => task.info.result, 'reboot_type' => 'reset_power' } else - vm_mob_ref.ShutdownGuest + vm_mob_ref.RebootGuest { 'task_state' => "running", 'reboot_type' => 'reboot_guest' } end end