Sha256: 90dcf2d5c058bd1dbecd76f0ac29d4851c79d25f79a48816929e35e981bb3325

Contents?: true

Size: 745 Bytes

Versions: 7

Compression:

Stored size: 745 Bytes

Contents

unless Fog.mocking?

  module Fog
    module Rackspace
      class Servers

        # 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)
          data = {
            'reboot' => { 'type' => type }
          }
          request(
            :body     => data.to_json,
            :expects  => 202,
            :method   => 'POST',
            :path     => "servers/#{id}"
          )
        end

      end
    end
  end

else

  module Fog
    module Rackspace
      class Servers

        def update_server
        end

      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.0.29 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.28 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.27 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.26 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.25 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.24 lib/fog/rackspace/requests/servers/reboot_server.rb
fog-0.0.23 lib/fog/rackspace/requests/servers/reboot_server.rb