Sha256: d2ba69d98463229209a9ad05d91c40617bb148ee26199a645e316a6b5e7a8f8a

Contents?: true

Size: 1.05 KB

Versions: 44

Compression:

Stored size: 1.05 KB

Contents

module Fog
  module Bluebox
    class Compute
      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

        def create_block(product_id, template_id, options = {})
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
fog-0.5.1 lib/fog/compute/requests/bluebox/create_block.rb
fog-0.5.0 lib/fog/compute/requests/bluebox/create_block.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/bluebox/create_block.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/bluebox/create_block.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/bluebox/create_block.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/bluebox/create_block.rb
fog-0.4.1 lib/fog/compute/requests/bluebox/create_block.rb
fog-0.4.0 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.34 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.33 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.32 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.31 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.30 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.29 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.28 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.27 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.26 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.25 lib/fog/bluebox/requests/compute/create_block.rb
fog-0.3.24 lib/fog/bluebox/requests/compute/create_block.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/bluebox/requests/compute/create_block.rb