This section describes how to deploy the Controller using REST API.

CSP uses basic authentication for the REST API.

Procedure

  1. Use the following curl command to create the Controller service:
    curl -X POST --user admin:AviCsp@2100 -H "Content-Type: application/json" -d '{
    
       "service":{
    
         "name":"Controller",
    
         "power":"on",
    
         "iso_name":"controller.qcow2",
    
         "day0_filename":"avi_meta_controller.yml",
    
         "numcpu":8,
    
         "memory":24576,
    
         "vnics":{
    
           "vnic":[
    
             {
    
               "nic":"0",
    
               "type":"access",
    
               "tagged":"false",
    
               "network_name":"enp1s0f1"
    
             }
    
           ]
    
         }
    
       }
    
     }' -k "https://10.8.3.106/api/running/services/" 
  2. The CSP should reply with status code 201 Created. To verify, get all installed services using following curl command:
    curl -X GET --user username:password -H "Content-Type: application/json"  -k "https://10.8.3.106/api/running/services/service/Controller" 
    

Results

The following output is generated:

{
{

  "vsb:service": {

    "name": "Controller",

    "uuid": "368bf2e5-7590-4efc-b19b-2a501e616933",

    "memory": 24576,

    "numcpu": 8,

    "macid": 153,

    "disk_size": "64.0",

    "iso_name": "controller.qcow2",

    "power": "on",

    "day0_filename": "avi_meta_controller.yml",

    "vnics": {

      "vnic": [

        {

          "nic": 0

        }

      ]

    },

    "operations": {

      "export": "/api/running/services/service/Controller/_operations/export",

      "monitor": "/api/running/services/service/Controller/_operations/monitor"

    }

  }

}