Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated Controller API Examples

...

This API allows controllers to register themselves as gRPC servers consumed by the orchestrator.

IN-PROGRESS

POST

Code Block
languagebash
titlePOST
linenumberstrue
POST/PUT
URL: /v2/controllers
POST BODY:
{
  "name": "HPAhpa-Placementplacement-Controllercontroller",
  "host": "10.7.100.4",
  "port": 88009029
}

...

Example CURL Command:

Code Block
languagebash
titleGET, DELETEPOST
linenumberstrue
GET
URL: curl -X POST "http://10.7.100.1:9015/v2/controllers/{controller-name}

RETURN STATUS: 200
RETURN BODY: 
{
  "name": "HPA-Placement-Controller",
  "host": " -H "accept: */*" -H "Content-Type: application/json" -d "{\"name\": \"hpa-placement-controller\", \"host\":\"10.7.100.4\",
  \"port\":\"9029\"}"

GET, DELETE


Code Block
languagebash
titleGET, DELETE
linenumberstrue
GET
URL: /v2/controllers/{controller-name}

RETURN STATUS: 200
RETURN BODY: 
{
  "name": "HPA-Placement-Controller",
  "host": "10.7.100.4",
  "port": 8800
": 8800
}


DELETE
URL: /v2/controllers/{controller-name}

RETURN STATUS: 204

Example CURL Command:

Code Block
languagebash
titlePOST
linenumberstrue
curl -X GET "http://10.7.100.1:9015/v2/controllers/hpa-placement-controller" -H "accept: */*" -H "Content-Type: application/json"
curl -X DELETE "http://10.7.100.1:9015/v2/controllers/hpa-placement-controller" -H "accept: */*"