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
resourceVersion: "100"
spec:
  bgpParameters:
    asn: 64512
  bgpPeers:
  - asn: 64512
    port: 179
  networkInterface:
  - kind: network_interface
    name: eth0
    namespace: system
    tenant: acmecorp
  where:
    virtualSite:
      ref:
      - kind: virtual_site
        name: acmecrop-vsite1
        namespace: system
        tenant: acmecorp
status: []
systemMetadata:
  creationTimestamp: "2021-02-22T15:43:35.611226400Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: a3aa1fc9-532f-4074-85e1-dca21eb897f2

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_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: Mon, 22 Feb 2021 15:43:35 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "100",
  "metadata": {
    "name": "bgp-peering",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "a3aa1fc9-532f-4074-85e1-dca21eb897f2",
    "creation_timestamp": "2021-02-22T15:43:35.611226400Z",
    "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,
      "bgp_router_id_type": "BGP_ROUTER_ID_FROM_INTERFACE",
      "bgp_router_id": null,
      "bgp_router_id_key": ""
    },
    "bgp_peers": [
      {
        "asn": 64512,
        "bgp_peer_address_type": "BGP_PEER_ADDRESS_FROM_DEFAULT_GW",
        "bgp_peer_address": null,
        "bgp_peer_address_key": "",
        "port": 179,
        "bgp_peer_subnet_offset": 0
      }
    ],
    "network_interface": [
      {
        "kind": "network_interface",
        "uid": "",
        "tenant": "acmecorp",
        "namespace": "system",
        "name": "eth0"
      }
    ]
  },
  "status": [
  ]
}