ves-io-schema-network_interface-API-Replace

Examples of replacing network_interface

Usecase:

Replace network-interface-1

Request using vesctl:

vesctl configuration replace network_interface -i network_interface.yaml

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

metadata:
  name: network-interface-1
  namespace: system
spec:
  ethernetInterface:
    cluster: {}
    device: eth0
    dhcpClient: {}
    isPrimary: {}
    mtu: 1500
    priority: 20
    siteLocalInsideNetwork: {}
    untagged: {}

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"network-interface-1","namespace":"system"},"spec":{"ethernetInterface":{"device":"eth0","cluster":{},"untagged":{},"dhcpClient":{},"siteLocalInsideNetwork":{},"mtu":1500,"priority":20,"isPrimary":{}}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/network_interfaces/network-interface-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:03:33 GMT
Vary: Accept-Encoding

{

}