1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/openstack/requests/compute/delete_key_pair.rb
Alfonso Juan Dillera e99450ec1f [openstack|compute] Add requests, models and tests for keypairs
- Added tests to already existing requests.
2012-04-30 10:34:58 +08:00

31 lines
695 B
Ruby

module Fog
module Compute
class OpenStack
class Real
def delete_key_pair(key_name)
request(
:expects => 202,
:method => 'DELETE',
:path => "os-keypairs/#{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