Class: Chef::Provider::RsShutdown

Inherits:
Chef::Provider show all
Defined in:
lib/chef/providers/rs_shutdown_provider.rb

Overview

Scriptable system reboot chef provider.

Instance Method Summary collapse

Instance Method Details

#action_rebootObject

Schedules a reboot.

Return

true

Always return true



42
43
44
45
46
# File 'lib/chef/providers/rs_shutdown_provider.rb', line 42

def action_reboot
  RightScale::ShutdownRequestProxy.submit(:level => ::RightScale::ShutdownRequest::REBOOT, :immediately => @new_resource.immediately)
  exit 0 if @new_resource.immediately
  true
end

#action_stopObject

Schedules a reboot.

Return

true

Always return true



52
53
54
55
56
# File 'lib/chef/providers/rs_shutdown_provider.rb', line 52

def action_stop
  RightScale::ShutdownRequestProxy.submit(:level => ::RightScale::ShutdownRequest::STOP, :immediately => @new_resource.immediately)
  exit 0 if @new_resource.immediately
  true
end

#action_terminateObject

Schedules a reboot.

Return

true

Always return true



62
63
64
65
66
# File 'lib/chef/providers/rs_shutdown_provider.rb', line 62

def action_terminate
  RightScale::ShutdownRequestProxy.submit(:level => ::RightScale::ShutdownRequest::TERMINATE, :immediately => @new_resource.immediately)
  exit 0 if @new_resource.immediately
  true
end

#load_current_resourceObject

Load current

Return

true

Always return true



34
35
36
# File 'lib/chef/providers/rs_shutdown_provider.rb', line 34

def load_current_resource
  true
end