Sha256: 524f3899314b9e28c9f45c61ab90fb76ffe9f4dbba63f367e0b207ae84d7a0b8

Contents?: true

Size: 759 Bytes

Versions: 1

Compression:

Stored size: 759 Bytes

Contents

module Fog
  module Compute
    class DigitalOceanV2
      # noinspection RubyStringKeysInHashInspection
      class Real
        def delete_ssh_key(id)
          request(
            :expects => [204],
            :headers => {
              'Content-Type' => "application/json; charset=UTF-8",
            },
            :method  => 'DELETE',
            :path    => "/v2/account/keys#{id}",
          )
        end
      end

      # noinspection RubyStringKeysInHashInspection
      class Mock
        def delete_ssh_key(id)
          self.data[:ssh_keys].select! do |key|
            key["id"] != id
          end

          response        = Excon::Response.new
          response.status = 204
          response
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-1.36.0 lib/fog/digitalocean/requests/compute_v2/delete_ssh_key.rb