ves-io-schema-bgp-API-Replace

Examples of replacing bgp

Usecase:

Replace BGP object bgp-peering in acmecrop-vsite1 to now start using port 2000 instead of 179

Request using vesctl:

vesctl configuration replace bgp -i bgp.yaml

where file bgp.yaml has following contents (bgp.ReplaceRequest):

metadata:
  name: bgp-peering
  namespace: system
spec:
  bgpParameters:
    asn: 64512
    localAddress: {}
  peers:
  - external:
      address: 10.1.1.2
      asn: 64514
      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

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"bgp-peering","namespace":"system"},"spec":{"where":{"virtualSite":{"ref":[{"kind":"virtual_site","tenant":"acmecorp","namespace":"system","name":"acmecrop-vsite1"}]}},"bgpParameters":{"asn":64512,"localAddress":{}},"peers":[{"metadata":{"name":"peer-0"},"external":{"asn":64514,"address":"10.1.1.2","port":65379,"familyInet":{"enable":{}},"interface":{"tenant":"acmecorp","namespace":"system","name":"eth0"}}}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build672621555_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/bgps/bgp-peering'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 12 May 2021 11:17:35 GMT
Vary: Accept-Encoding

{

}