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

rackspace: create_server - API change: options[:keypair] takes String i.s.o. Hash (-> the keypair name)

This commit is contained in:
Bart Vercammen 2013-07-24 13:28:29 +02:00
parent eb4b597cde
commit 969ae676a9

View file

@ -12,6 +12,7 @@ module Fog
# @option options [Hash] metadata key value pairs of server metadata
# @option options [String] OS-DCF:diskConfig The disk configuration value. (AUTO or MANUAL)
# @option options [Hash] personality Hash containing data to inject into the file system of the cloud server instance during server creation.
# @option options [String] keypair Name of the kay-pair to associate with this server.
# @return [Excon::Response] response:
# * body [Hash]:
# * server [Hash]:
@ -58,7 +59,7 @@ module Fog
{ :uuid => '00000000-0000-0000-0000-000000000000' },
{ :uuid => '11111111-1111-1111-1111-111111111111' }
]
data['server']['key_name'] = options[:keypair][:name] unless options[:keypair].nil?
data['server']['key_name'] = options[:keypair] unless options[:keypair].nil?
request(
:body => Fog::JSON.encode(data),