ves-io-schema-tunnel-API-Replace
On This Page:
Examples of replacing tunnel
Usecase:
Replace tunnel-1
Request using vesctl:
vesctl configuration replace tunnel -i tunnel.yaml
where file tunnel.yaml has following contents (tunnel.ReplaceRequest):
RequestJSON:
{
"metadata": {
"name": "tunnel-1",
"namespace": "system"
},
"spec": {
"local_ip": {
"ip_address": {
"ip_address": {
"ipv4": {
"addr": "192.168.0.10"
}
},
"virtual_network_type": {
"public": {}
}
}
},
"remote_ip": {
"ip": {
"ipv4": {
"addr": "192.168.0.10"
}
}
},
"params": {
"ipsec": {
"ipsec_psk": {
"clear_secret_info": {
"url": "string://\u003cbase64\u003e"
}
}
}
}
}
}
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"tunnel-1","namespace":"system"},"spec":{"local_ip":{"ip_address":{"ip_address":{"ipv4":{"addr":"192.168.0.10"}},"virtual_network_type":{"public":{}}}},"remote_ip":{"ip":{"ipv4":{"addr":"192.168.0.10"}}},"params":{"ipsec":{"ipsec_psk":{"clear_secret_info":{"url":"string://\u003cbase64\u003e"}}}}}}' -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/tunnels/tunnel-1'
curl response:
HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:08:15 GMT
Vary: Accept-Encoding
{
}