ves-io-schema-topology-CustomDataAPI-GetRouteTable

Examples of performing topology CustomDataAPI GetRouteTable

Usecase:

Get route table rt-1

Request:

Request using vesctl:

vesctl request rpc topology.CustomDataAPI.GetRouteTable -i request.yaml --uri /public/namespaces/system/topology/route_table/rt-1 --http-method GET

where file request.yaml has following contents:

{}

vesctl yaml response:

metadata:
  name: rt-1
  tags: {}
routeTable:
  explicitSubnet: []
  implicitSubnet: []
  network: []
  routes:
  - destination: 10.0.0.0/24
    nexthop: igw-1
  - destination: 0.0.0.0/0
    nexthop: igw-1
  subnet: []
  transitGateway: []

Request using curl:

curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/system/topology/route_table/rt-1?name='

curl response:

HTTP/1.1 200 OK
Content-Length: 460
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:51:09 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "rt-1",
    "tags": {
    }
  },
  "route_table": {
    "subnet": [
    ],
    "network": [
    ],
    "transit_gateway": [
    ],
    "routes": [
      {
        "destination": "10.0.0.0/24",
        "nexthop": "igw-1"
      },
      {
        "destination": "0.0.0.0/0",
        "nexthop": "igw-1"
      }
    ],
    "route_table_type": "ROUTE_TABLE_NETWORK",
    "implicit_subnet": [
    ],
    "explicit_subnet": [
    ]
  }
}