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
  bgpPeers:
  - asn: 64512
    port: 2000
  networkInterface:
  - kind: network_interface
    name: eth0
    namespace: system
    tenant: acmecorp
  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},"bgpPeers":[{"asn":64512,"port":2000}],"networkInterface":[{"kind":"network_interface","tenant":"acmecorp","namespace":"system","name":"eth0"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build896999001_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: Fri, 31 Jul 2020 12:54:01 GMT
Vary: Accept-Encoding

{

}