Sha256: 6302a18d20eafad38bf2c853ed6825061a5e70dc043d1a3e5b023e482e6c7a46

Contents?: true

Size: 726 Bytes

Versions: 5

Compression:

Stored size: 726 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def delete_key_pair(key_name)
          request(
            :expects => 202,
            :method  => 'DELETE',
            :path    => "os-keypairs/#{Fog::OpenStack.escape(key_name)}"
          )
        end
      end

      class Mock
        def delete_key_pair(_key_name)
          response = Excon::Response.new
          response.status = 202
          response.headers = {
            "Content-Type"   => "text/html; charset=UTF-8",
            "Content-Length" => "0",
            "Date"           => Date.new
          }
          response.body = {}
          response
        end
      end # mock
    end # openstack
  end # compute
end # fog

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-openstack-0.1.24 lib/fog/compute/openstack/requests/delete_key_pair.rb
fog-openstack-0.1.23 lib/fog/compute/openstack/requests/delete_key_pair.rb
fog-openstack-0.1.22 lib/fog/compute/openstack/requests/delete_key_pair.rb
fog-openstack-0.1.21 lib/fog/compute/openstack/requests/delete_key_pair.rb
fog-openstack-0.1.20 lib/fog/compute/openstack/requests/delete_key_pair.rb