ves-io-schema-network_connector-API-Replace

Examples of replacing network_connector

Usecase:

Replace connect-in-out to now update no proxy to do forward proxy between inside network and outside network

Request using vesctl:

vesctl configuration replace network_connector -i network_connector.yaml

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

RequestJSON:

          {
    "metadata": {
        "name": "connect-in-out",
        "namespace": "system"
    },
    "spec": {
        "sli_to_slo_snat": {
            "default_gw_snat": {},
            "interface_ip": {}
        },
        "enable_forward_proxy": {
            "max_connect_attempts": 2
        }
    }
}
        

vesctl yaml response: None

Request using curl:

          curl -X 'PUT' -d '{"metadata":{"name":"connect-in-out","namespace":"system"},"spec":{"sli_to_slo_snat":{"default_gw_snat":{},"interface_ip":{}},"enable_forward_proxy":{"max_connect_attempts":2}}}' -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/network_connectors/connect-in-out'
        

curl response:

          HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:06:14 GMT
Vary: Accept-Encoding

{

}