Sha256: 9df1fdfdd2d44fb218e5c78bbb68ac4a80475f1d586501f7f279b82110f2d16d

Contents?: true

Size: 743 Bytes

Versions: 46

Compression:

Stored size: 743 Bytes

Contents

module Fog
  module Rackspace
    module Servers
      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')
          request(
            :body     => { 'reboot' => { 'type' => type }}.to_json,
            :expects  => 202,
            :method   => 'POST',
            :path     => "servers/#{server_id}/action.json"
          )
        end

      end

      class Mock

        def reboot_server(server_id, type)
          raise MockNotImplemented.new("Contributions welcome!")
        end

      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
fog-0.1.3 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.1.2 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.1.1 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.1.0 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.100 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.99 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.98 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.97 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.96 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.95 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.94 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.93 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.92 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.91 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.90 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.89 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.88 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.87 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.86 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.85 lib/fog/rackspace/requests/servers/reboot_server.rb