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:
parent
b9c58fbc3a
commit
54709b8677
10 changed files with 199 additions and 10 deletions
29
lib/fog/rackspace/requests/compute_v2/get_keypair.rb
Normal file
29
lib/fog/rackspace/requests/compute_v2/get_keypair.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue