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/rackspace/requests/compute_v2/get_keypair.rb
2013-07-23 09:42:25 +02:00

29 lines
734 B
Ruby

module Fog
module Compute
class RackspaceV2
class Real
# Returns details of key by name specified
#
# ==== Parameters
# 'key_name'<~String>: name of key to request
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'keypair'<~Hash>: Name of key
# * 'public_key'<~String>: public key
# * 'name'<~String>: key name
# * 'fingerprint'<~String>: id
#
def get_keypair(key_name)
request(
:method => 'GET',
:expects => 200,
:path => "/os-keypairs/#{key_name}"
)
end
end
end
end
end