Sha256: cb8323ebeddf3dec01d66394a11ab04b60b2f655fe3d712d06196544b3a2fa41

Contents?: true

Size: 822 Bytes

Versions: 25

Compression:

Stored size: 822 Bytes

Contents

module Fog
  module Rackspace
    class Compute
      class Real

        # Revert resizing
        #
        # ==== Parameters
        # * server_id<~Integer> - Id of server to revert
        #
        def revert_resized_server(server_id)
          body = { 'revertResize' => nil }
          server_action(server_id, body)
        end

      end

      class Mock

        def revert_resized_server(server_id)
          response = Excon::Response.new
          response.status = 202

          @data[:servers][server_id]['flavorId'] = @data[:servers][server_id]['old_flavorId']
          @data[:servers][server_id].delete('old_flavorId')
          @data[:last_modified][:servers][server_id] = Time.now
          @data[:servers][server_id]['status'] = 'ACTIVE'

          response
        end

      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

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