ves-io-schema-operate-debug-CustomPublicAPI-HostPing

Examples of performing operate_debug CustomPublicAPI HostPing

Usecase:

Run Ping from VoltNode

Request:

Request using vesctl:

vesctl request rpc operate_debug.CustomPublicAPI.HostPing -i request.yaml --uri /public/namespaces/system/sites/site1/vpm/debug/master-0/host-ping --http-method POST

where file request.yaml has following contents:

namespace: system
node: master-0
site: site1

vesctl yaml response:

avgRtt: 76.599µs
destIp: 8.8.8.8
maxRtt: 134.83µs
minRtt: 44.686µs
received: 5
sent: 5
stdDevRtt: 30.619µs

Request using curl:

curl -X 'POST' -d '{"namespace":"system","site":"site1","node":"master-0"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/operate/namespaces/system/sites/site1/vpm/debug/master-0/host-ping'

curl response:

HTTP/1.1 200 OK
Content-Length: 177
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:50:35 GMT
Vary: Accept-Encoding

{
  "dest_ip": "8.8.8.8",
  "sent": 5,
  "received": 5,
  "lost": 0,
  "min_rtt": "44.686µs",
  "max_rtt": "134.83µs",
  "avg_rtt": "76.599µs",
  "std_dev_rtt": "30.619µs"
}