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

[bbg] provide for using ssh_key when calling create_block

This commit is contained in:
geemus 2010-06-02 19:46:41 -07:00
parent 961a333fd0
commit 45fa630386

View file

@ -8,19 +8,21 @@ module Fog
# * product_id<~Integer> - Id of product to create block with
# * template_id<~Integer> - Id of template to create block with
# * name<~String> - Name of block
# * password<~String> - Password for block
# * options<~Hash>:
# * password<~String> - Password for block
# or
# * ssh_key<~String> - ssh public key
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# TODO
def create_block(product_id, template_id, name, password)
def create_block(product_id, template_id, name, options = {})
data = {
'name' => name,
'password' => password,
'product' => product_id,
'template' => template_id
}
}.merge!(options)
request(
:body => data.to_json,