Sha256: 8b5fa816e8169e456a623fef04997a1f28bc795cdd9cc3116638e06943184c09

Contents?: true

Size: 980 Bytes

Versions: 7

Compression:

Stored size: 980 Bytes

Contents

module Fog
  module Compute
    class DigitalOcean
      # noinspection RubyStringKeysInHashInspection
      class Real
        def delete_server(server_id)
          Fog::Logger.warning("delete_server method has been deprecated, use destroy_server instead")
          destroy_server(server_id)
        end
        def destroy_server(server_id)
          request(
            :expects         => [204],
            :headers         => {
              'Content-Type' => "application/json; charset=UTF-8",
            },
            :method          => 'DELETE',
            :path            => "/v2/droplets/#{server_id}",
          )
        end
      end

      # noinspection RubyStringKeysInHashInspection
      class Mock
        def delete_server(server_id)
          destroy_server(server_id)
        end
        def destroy_server(_)
          response        = Excon::Response.new
          response.status = 204
          response
        end
      end
    end
  end
end

Version data entries

7 entries across 5 versions & 2 rubygems

Version Path
fog-digitalocean-0.4.0 lib/fog/compute/digitalocean/requests/destroy_server.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/destroy_server.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/destroy_server.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/destroy_server.rb
fog-digitalocean-0.3.0 lib/fog/digitalocean/requests/compute/destroy_server.rb
fog-digitalocean-0.2.0 lib/fog/digitalocean/requests/compute/destroy_server.rb
fog-digitalocean-0.1.0 lib/fog/digitalocean/requests/compute/destroy_server.rb