Previous Topic: Server Info RecordNext Topic: Retrieve Grids


Create a Grid

In the following example you create a new grid component in the BFC/grids folder.

POST BFC/grid
POST BFC/grids?checkExternalStorage&enableLanguagePacks&numAppIPs=10

The payload is a possibly sparse grid record. For the 1.0 release of the BFC, the following fields are required in the grid record:

For the 1.0 release of the BFC API, the following parameters in the grid record are honored:

Create Grid supports two IP modes:

Use the following table to review permissible IP and VLAN parameter combinations when passing the parameter. The top row identifies the parameter that you are passing, the value in the column below the parameter indicates the system response. Combinations can be permitted (OK), REQUIRED, or result in an ERROR. For example, when passing the external_network parameter, numAppIPs is REQUIRED.

Table - Create Grid IP and VLAN input (parameter and query string) combination rules

Provided data:

default_vlan

external_network

controller_ip

app_ips

numAppIPs*

default_vlan

N/A

OK

OK

OK

OK

external_network

OK

N/A

ERROR

ERROR

OK

controller_ip

OK

ERROR

N/A

REQUIRED

ERROR

app_ips

OK

ERROR

REQUIRED

N/A

ERROR

numAppIPs*

OK

REQUIRED

ERROR

ERROR

N/A

* = Query String input data (see below)

Supported query string parameters in the POST URI

checkExternalStorage

If simply present or set equal to true, then the accessibility of the external storage is verified as part of the grid creation operation.

enableLanguagePacks

If simply present or set equal to true, then all language packs will be applied to the grid being created.

numAppIPs

Specifies the number of application IP addresses that should be reserved for use by applications running on the grid being created. The specific addresses will be chosen by the system. Also, either this parameter or the app_ips parameter in the grid record is required and those parameters are mutually exclusive; only one or the other may be specified.

See the previous table that details legal IP and VLAN parameter combinations.

Result

On success, HTTP code 201 and the name of the created grid are returned. On error, an HTTP error code and fault(s) are returned.

Description

Creates a new grid component in the BFC.

Note: This action does not create the AppLogic grid. The first call to the start operation for the grid creates the grid.

Examples

The following example assumes you are using the query string ?numAppIPs=10 on the POST URI and a sparse grid record with the following values:

JSON Payload:

{"grid": {"grid_controller_user": "cadev@cadev.com", "name": "bfcapigrid", 
"xen_config":{"grid_server_configuration":{"min":2,"target":2,"max":2,"selection_criteria":null}}, 
"applogic_version": "3.0.8", 
"external_network": "222.222.222.131/16", "grid_controller_password": "F00b@r", 
"description": "a grid created via the bfc api"}} 

Response:

201

Header location:

BFC/grids/bfcapigrid

Note: The PUT and DELETE actions are not supported.