Sha256: 83fe425cd5eefdb1ced0ad31edb9b3cb2d8d79ec6653d51cbfe26c5fda675c4e

Contents?: true

Size: 648 Bytes

Versions: 26

Compression:

Stored size: 648 Bytes

Contents

module Fog
  module Rackspace
    class Compute
      class Real

        # Reboot an existing server
        #
        # ==== Parameters
        # * server_id<~Integer> - Id of server to reboot
        # * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
        #
        def reboot_server(server_id, type = 'SOFT')
          body = { 'reboot' => { 'type' => type }}
          server_action(server_id, body)
        end

      end

      class Mock

        def reboot_server(server_id, type = 'SOFT')
          response = Excon::Response.new
          response.status = 202
          response
        end

      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
fog-0.8.2 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.8.1 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.8.0 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.7.2 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.7.1 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.7.0 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.6.0 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.5.3 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.5.2 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.5.1 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.5.0 lib/fog/compute/requests/rackspace/reboot_server.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/rackspace/reboot_server.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/rackspace/reboot_server.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/rackspace/reboot_server.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.4.1 lib/fog/compute/requests/rackspace/reboot_server.rb
fog-0.4.0 lib/fog/rackspace/requests/compute/reboot_server.rb
fog-0.3.34 lib/fog/rackspace/requests/compute/reboot_server.rb
fog-0.3.33 lib/fog/rackspace/requests/compute/reboot_server.rb
fog-0.3.32 lib/fog/rackspace/requests/compute/reboot_server.rb