API to Create an Appliance
This endpoint creates an Appliance.
POST /openapi/v1/ext_appliances
In request payload, to obtain <config> schema, select one of the “valid_config” from API to Get Appliance Schema response, apply the “valid_config” to API to Get the Schema of Config.
Parameters: The request URL contains the following parameters
Name |
Type |
Description |
---|---|---|
name |
string |
Specify the name |
root_scope_id |
string |
Specify the root scope |
type |
string |
Specify the Appliance type, the value can be either “TETRATION_EDGE”, “TETRATION_DATA_INGEST”, “TETRATION_EXPORT”, “TETRATION_ERSPAN” or “TETRATION_INTERNAL” |
config |
set |
Provide the filled config schema in JSON format |
taas |
boolean |
Indicate if the Appliance is for TAAS env |
version |
string |
Specify the version |
Response object: Returns the created Appliance.
Sample response
req_payload = {
"name":"Data Ingest Appliance",
"type":"tetration_data_ingest",
"root_scope_id":"63c41ff2497d4f5f5be73662",
"config":{
"VM3":{
"secured":{},
"unsecured":{
"cidr":[
"172.26.231.141/23",
"172.26.231.142/23",
"172.26.231.143/23"
],
"gateway":[
"172.26.231.140",
"172.26.231.140",
"172.26.231.140"
],
"cidr_v6":[],
"gateway_v6":[],
"dns":[
"testserver"
],
"search_domains":[],
"hostname":"",
"use_proxy_for_tetration":false,
"https_proxy":"",
"no_proxy":[],
"docker_subnet":""
}
}
}
}
resp = restclient.post('/ext_appliances', json_body=json.dumps(req_payload))
if resp.status_code == 200:
parsed_resp = json.loads(resp.content)
print json.dumps(parsed_resp)
Sample response
{
"root_scope_id":"63c41ff2497d4f5f5be73662",
"type":"tetration_data_ingest",
"status":{
"state":"pending_dio",
"controller_state":"down",
"message":"Setting up appliance",
"display_state":"preparing"
},
"auto_upgrade":true,
"created_at":1674183549,
"updated_at":1674183549,
"registered_at":0,
"last_checkin_at":0,
"last_rpm_sent_at":0,
"upgrade_attempts":0,
"delete_attempts":0,
"last_delete_msg_sent_at":0,
"name":"Data Ingest Appliance",
"taas":false,
"deleted":false,
"deleted_at":0,
"connector_limit":3,
"available_slots":0,
"internal":false,
"id":"63ca037dbca44e263daeb5d0",
"ha_peer_appliance_id":"",
"display_type":"Tetration Data Ingest"
}