2010-09-07 19:26:01 -04:00
|
|
|
module Fog
|
|
|
|
module Bluebox
|
2010-09-08 15:07:45 -04:00
|
|
|
class Compute
|
2010-09-07 19:26:01 -04:00
|
|
|
class Real
|
|
|
|
|
|
|
|
# Create a new block
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * product_id<~Integer> - Id of product to create block with
|
|
|
|
# * template_id<~Integer> - Id of template to create block with
|
|
|
|
# * options<~Hash>:
|
|
|
|
# * password<~String> - Password for block
|
|
|
|
# or
|
|
|
|
# * ssh_key<~String> - ssh public key
|
|
|
|
# * username<~String> - optional, defaults to deploy
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# TODO
|
|
|
|
def create_block(product_id, template_id, options = {})
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'POST',
|
|
|
|
:path => '/api/blocks.json',
|
|
|
|
:query => {'product' => product_id, 'template' => template_id}.merge!(options)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
|
2010-09-09 20:50:38 -04:00
|
|
|
def create_block(product_id, template_id, options = {})
|
2010-09-07 19:26:01 -04:00
|
|
|
Fog::Mock.not_implemented
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|