Sha256: 5273935d2e1932f583de32c306a3393a94a26c56d71549dc00447eef1653ae09

Contents?: true

Size: 935 Bytes

Versions: 23

Compression:

Stored size: 935 Bytes

Contents

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

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
fog-1.1.2 lib/fog/bluebox/requests/compute/create_block.rb
fog_tractical-1.1.4 lib/fog/bluebox/requests/compute/create_block.rb
fog_tractical-1.1.3 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
fog-1.1.1 lib/fog/bluebox/requests/compute/create_block.rb
fog-1.1.0 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
tag-fog-1.0.1 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
fog-1.0.0 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/requests/bluebox/create_block.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/requests/bluebox/create_block.rb
fog-0.11.0 lib/fog/compute/requests/bluebox/create_block.rb
fog-0.10.0 lib/fog/compute/requests/bluebox/create_block.rb