Sha256: b506dc5ca1da06aa4c5f4c2e01cbf00e60c1ff2b3deb6311325617f682231f0c

Contents?: true

Size: 975 Bytes

Versions: 12

Compression:

Stored size: 975 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, location_id, options = {})
          request(
            :expects  => 200,
            :method   => 'POST',
            :path     => '/api/blocks.json',
            :query    => {'product' => product_id, 'template' => template_id, 'location' => location_id}.merge!(options)
          )
        end

      end
    end
  end
end

Version data entries

12 entries across 12 versions & 6 rubygems

Version Path
fog-1.5.0 lib/fog/bluebox/requests/compute/create_block.rb
rackspace-fog-1.4.2 lib/rackspace-fog/bluebox/requests/compute/create_block.rb
fog-1.4.0 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
michiels-fog-1.3.1 lib/fog/bluebox/requests/compute/create_block.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
fog-1.3.1 lib/fog/bluebox/requests/compute/create_block.rb
fog-1.3.0 lib/fog/bluebox/requests/compute/create_block.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_block.rb
fog-1.2.0 lib/fog/bluebox/requests/compute/create_block.rb
ktheory-fog-1.1.2 lib/fog/bluebox/requests/compute/create_block.rb