ves-io-schema-bgp-API-Get

Examples of getting bgp

Usecase:

Get bgp object bgp-peering from system

Request using vesctl:

vesctl configuration get bgp bgp-peering --namespace system

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: bgp-peering
  namespace: system
referringObjects: []
resourceVersion: "127"
spec:
  bgpParameters:
    asn: 64512
    localAddress: {}
  peers:
  - external:
      address: 10.1.1.1
      asn: 64513
      familyInet:
        enable: {}
      interface:
        name: eth0
        namespace: system
        tenant: acmecorp
      port: 65379
    metadata:
      name: peer-0
  where:
    virtualSite:
      ref:
      - kind: virtual_site
        name: acmecrop-vsite1
        namespace: system
        tenant: acmecorp
status: []
systemMetadata:
  creationTimestamp: "2021-07-14T08:06:44.876462394Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 0ef05ca0-fc5e-4e27-ab7a-7b4051eecbf2

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/bgps/bgp-peering?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:06:44 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "127",
  "metadata": {
    "name": "bgp-peering",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "0ef05ca0-fc5e-4e27-ab7a-7b4051eecbf2",
    "creation_timestamp": "2021-07-14T08:06:44.876462394Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "where": {
      "virtual_site": {
        "ref": [
          {
            "kind": "virtual_site",
            "uid": "",
            "tenant": "acmecorp",
            "namespace": "system",
            "name": "acmecrop-vsite1"
          }
        ],
        "network_type": "VIRTUAL_NETWORK_SITE_LOCAL"
      }
    },
    "bgp_parameters": {
      "asn": 64512,
      "local_address": {

      },
      "bgp_router_id_type": "BGP_ROUTER_ID_FROM_INTERFACE",
      "bgp_router_id": null,
      "bgp_router_id_key": ""
    },
    "peers": [
      {
        "metadata": {
          "name": "peer-0",
          "description": "",
          "disable": false
        },
        "external": {
          "asn": 64513,
          "address": "10.1.1.1",
          "port": 65379,
          "family_inet": {
            "enable": {

            }
          },
          "interface": {
            "tenant": "acmecorp",
            "namespace": "system",
            "name": "eth0"
          }
        },
        "target_service": ""
      }
    ]
  },
  "status": [
  ],
  "referring_objects": [
  ]
}