ves-io-schema-bgp-API-Replace
On This Page:
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):
RequestJSON:
{
"metadata": {
"name": "bgp-peering",
"namespace": "system"
},
"spec": {
"where": {
"virtual_site": {
"ref": [
{
"kind": "virtual_site",
"tenant": "acmecorp",
"namespace": "system",
"name": "acmecrop-vsite1"
}
]
}
},
"bgp_parameters": {
"asn": 64512,
"local_address": {}
},
"peers": [
{
"metadata": {
"name": "peer-0"
},
"external": {
"asn": 64514,
"address": "10.1.1.2",
"port": 65379,
"family_inet": {
"enable": {}
},
"interface": {
"tenant": "acmecorp",
"namespace": "system",
"name": "eth0"
},
"address_ipv6": "571c:8935:700e:25ff:ca36:7cf3:279a:3f99"
}
}
]
}
}
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"bgp-peering","namespace":"system"},"spec":{"where":{"virtual_site":{"ref":[{"kind":"virtual_site","tenant":"acmecorp","namespace":"system","name":"acmecrop-vsite1"}]}},"bgp_parameters":{"asn":64512,"local_address":{}},"peers":[{"metadata":{"name":"peer-0"},"external":{"asn":64514,"address":"10.1.1.2","port":65379,"family_inet":{"enable":{}},"interface":{"tenant":"acmecorp","namespace":"system","name":"eth0"},"address_ipv6":"571c:8935:700e:25ff:ca36:7cf3:279a:3f99"}}]}}' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' '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: Thu, 21 Mar 2024 14:04:39 GMT
Vary: Accept-Encoding
{
}