Class: Fog::Compute::RackspaceV2::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudflock/patch/fog.rb

Instance Method Summary collapse

Instance Method Details

#rescueBoolean

Note:

Rescue mode is only guaranteed to be active for 90 minutes.

Place existing server into rescue mode, allowing for offline editing of configuration. The original server’s disk is attached to a new instance of the same base image for a period of time to facilitate working within rescue mode. The original server will be autom atically restored after 90 minutes.

  • Status Transition:

    • ACTIVE -> PREP_RESCUE -> RESCUE

Returns:

  • (Boolean)

    returns true if call to put server in rescue mode returns success

Raises:

  • (Fog::Rackspace::Errors::NotFound)
    • HTTP 404

  • (Fog::Rackspace::Errors::BadRequest)
    • HTTP 400

  • (Fog::Rackspace::Errors::InternalServerError)
    • HTTP 500

  • (Fog::Rackspace::Errors::ServiceError)

See Also:



18
19
20
21
22
23
24
# File 'lib/cloudflock/patch/fog.rb', line 18

def rescue
  requires :identity
  data = service.rescue_server(identity)
  merge_attributes(data.body)
  self.state = RESCUE
  true
end

#unrescueBoolean

Note:

Rescue mode is only guaranteed to be active for 90 minutes.

Remove existing server from rescue mode.

  • Status Transition:

    • RESCUE -> PREP_UNRESCUE -> ACTIVE

Returns:

  • (Boolean)

    returns true if call to remove server from rescue mode returns success

Raises:

  • (Fog::Rackspace::Errors::NotFound)
    • HTTP 404

  • (Fog::Rackspace::Errors::BadRequest)
    • HTTP 400

  • (Fog::Rackspace::Errors::InternalServerError)
    • HTTP 500

  • (Fog::Rackspace::Errors::ServiceError)

See Also:



38
39
40
41
42
43
# File 'lib/cloudflock/patch/fog.rb', line 38

def unrescue
  requires :identity
  service.unrescue_server(identity)
  self.state = ACTIVE
  true
end