ves-io-schema-tunnel-API-Replace

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):

metadata:
  name: tunnel-1
  namespace: documentation
spec:
  localIp:
    ipAddress:
      ipAddress:
        ipv4:
          addr: 192.168.0.10
      virtualNetworkType:
        public: {}
  params:
    ipsec:
      ipsecPsk:
        clearSecretInfo:
          url: string://<base64>
  remoteIp:
    ip:
      ipv4:
        addr: 192.168.0.10

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"tunnel-1","namespace":"documentation"},"spec":{"localIp":{"ipAddress":{"ipAddress":{"ipv4":{"addr":"192.168.0.10"}},"virtualNetworkType":{"public":{}}}},"remoteIp":{"ip":{"ipv4":{"addr":"192.168.0.10"}}},"params":{"ipsec":{"ipsecPsk":{"clearSecretInfo":{"url":"string://\u003cbase64\u003e"}}}}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build185306297_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/tunnels/tunnel-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 19 Oct 2020 09:49:23 GMT
Vary: Accept-Encoding

{

}