1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Rackspace: add keypair support

This commit is contained in:
Bart Vercammen 2013-07-17 09:18:27 +02:00
parent b9c58fbc3a
commit 54709b8677
10 changed files with 199 additions and 10 deletions

View file

@ -0,0 +1,29 @@
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_key(key_name)
request(
:method => 'GET',
:expects => 200,
:path => "/os-keypairs/#{key_name}"
)
end
end
end
end
end