Sha256: 5fbb36f9784827c59312e6ef45190a952008e31613bbb99476a1d507ede3cd5c

Contents?: true

Size: 817 Bytes

Versions: 17

Compression:

Stored size: 817 Bytes

Contents

module Fog
  module Rackspace
    class Compute
      class Real

        # Reboot an existing server
        #
        # ==== Parameters
        # * server_id<~Integer> - Id of server to reboot
        # * body<~.to_json object> - Body of the request, describes the action (see reboot_server as an example)
        # * expect<~Integer> - expected return, 202 except for confirm resize (204)
        #
        def server_action(server_id, body, expects=202)
          request(
            :body     => body.to_json,
            :expects  => expects,
            :method   => 'POST',
            :path     => "servers/#{server_id}/action.json"
          )
        end

      end

      class Mock

        def server_action(server_id, body)
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/compute/requests/rackspace/server_action.rb
fog-0.5.0 lib/fog/compute/requests/rackspace/server_action.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/rackspace/server_action.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/rackspace/server_action.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/rackspace/server_action.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/rackspace/server_action.rb
fog-0.4.1 lib/fog/compute/requests/rackspace/server_action.rb
fog-0.4.0 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.34 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.33 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.32 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.31 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.30 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.29 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.28 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.27 lib/fog/rackspace/requests/compute/server_action.rb
fog-0.3.26 lib/fog/rackspace/requests/compute/server_action.rb