Class: Fog::Compute::RackspaceV2::Real
- Inherits:
-
Object
- Object
- Fog::Compute::RackspaceV2::Real
- Defined in:
- lib/cloudflock/patch/fog.rb
Instance Method Summary collapse
-
#rescue_server(server_id) ⇒ Excon::Response
Puts server into rescue mode * Status Transition: * ACTIVE -> PREP_RESCUE -> RESCUE.
-
#unrescue_server(server_id) ⇒ Excon::Response
Take server out of rescue mode * Status Transition: * RESCUE -> PREP_UNRESCUE -> ACTIVE.
Instance Method Details
#rescue_server(server_id) ⇒ Excon::Response
Note:
Rescue mode is only guaranteed to be active for 90 minutes.
Puts server into rescue mode
-
Status Transition:
-
ACTIVE -> PREP_RESCUE -> RESCUE
-
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/cloudflock/patch/fog.rb', line 59 def rescue_server(server_id) data = { 'rescue' => nil } request( :body => Fog::JSON.encode(data), :expects => [200], :method => 'POST', :path => "servers/#{server_id}/action" ) end |
#unrescue_server(server_id) ⇒ Excon::Response
Take server out of rescue mode
-
Status Transition:
-
RESCUE -> PREP_UNRESCUE -> ACTIVE
-
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/cloudflock/patch/fog.rb', line 83 def unrescue_server(server_id) data = { 'unrescue' => nil } request( :body => Fog::JSON.encode(data), :expects => [202], :method => 'POST', :path => "servers/#{server_id}/action" ) end |