Class: Bluebox

Bluebox

new Bluebox(options)

Parameters:
Name Type Description
options hash
Properties
Name Type Description
customer_id string

The Bluebox customer Id

api_key string

The Bluebox API key

strictSSL boolean

Enables/Disables the SSL checking of the request (usefull for mocks)

Source:

Members

<static, constant> API_URL :String

Base URL that is used to make requests

Type:
  • String
Source:

settings :hash

Settings as used by the Bluebox object

Type:
  • hash
Source:

Methods

<private> _request(method, url, parameters, callback)

Parameters:
Name Type Description
method String

to use for the request (get, post, put , del)

url String

url to request

parameters String

variable to post to the url

callback Request-Callback

function to execute when request succeeds or fails

Source:

block_create(options, callback)

This command creates a new block.

Parameters:
Name Type Description
options Hash
Properties
Name Type Argument Description
product String

The UUID of a product. These are available with the /api/block_products call.

template String

The UUID of a template. These are available with the /api/block_templates call.

password String

password that be used to login (either specify password, ssh_public_key , or both)

ssh_public_key String

ssh-public_key that can be used to login into the block (either specify password, ssh_public_key , or both)

hostname String <optional>

Short hostname for your new block. It will be automatically appended with .custXXXX where XXXX is your customer ID

username String <optional>

Username for your new user. Defaults to deploy.

location String <optional>

The UUID of a location. These are available with the /api/locations call.

lb_applications String <optional>

List of Load Balanced Application UUID's, separated by commas without whitespace

lb_services String <optional>

List of Load Balanced Service UUID's, separated by commas without whitespace

lb_backends String <optional>

List of Load Balanced Backend UUID's, separated by commas without whitespace

callback function
Source:

block_destroy(options, callback)

Destroys a block

Parameters:
Name Type Description
options Hash
Properties
Name Type Description
uuid String

UUID of the block to destroy

callback Function
callback function
Source:

block_details(options, callback)

Retrieve block details

Special Note - Status Field: The status field shows the status of the block through its lifecycle. It can have the following values:

queued - The block has been queued and is awaiting pickup by a host. building - The block has been picked up and is building on a remote host. running - The block is now running and should be accessible via IP. error - There was a failure with the deployment. BBG will investigate, but this block should not be functional.

Parameters:
Name Type Description
options Hash
Properties
Name Type Description
uuid String

UUID of the block to retrieve

callback Function
callback function
Source:

block_list(options, callback)

Returns collection of existing block servers.

Parameters:
Name Type Description
options Hash
callback function
Source:

block_reboot(options, callback)

Reboots a block

Parameters:
Name Type Description
options Hash
Properties
Name Type Description
uuid String

UUID of the block to destroy

callback Function
callback function
Source:

credentials() → {Credential-Pair}

Credentials to access Bluebox API

Source:
Returns:

The Bluebox credential pair in use

Type
Credential-Pair

location_list(options, callback)

Returns collection of existing locations

Parameters:
Name Type Description
options Hash
callback function
Source:

product_list(options, callback)

Returns collection of existing products

Parameters:
Name Type Description
options Hash
callback function
Source:

template_create(options, callback)

This method will take the UUID of a block and turn it into a new template.

Parameters:
Name Type Description
options Hash
Properties
Name Type Argument Description
id String

The UUID of the block you want to archive into a template

description String <optional>

This will record a description on the template for future use

callback function
Source:

template_destroy(options, callback)

Destroys a template

Parameters:
Name Type Description
options Hash
Properties
Name Type Description
uuid String

UUID of the block to destroy

callback Function
callback function
Source:

template_details(options, callback)

Retrieve template details

Parameters:
Name Type Description
options Hash
Properties
Name Type Description
uuid String

UUID of the template to retrieve

callback Function
callback function
Source:

template_list(options, callback)

Returns collection of existing templates

Parameters:
Name Type Description
options Hash
callback function
Source: