ves-io-schema-virtual_network-API-Replace

Examples of replacing virtual_network

Usecase:

Replace virtual-network-1

Request using vesctl:

vesctl configuration replace virtual_network -i virtual_network.yaml

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

metadata:
  name: virtual-network-1
  namespace: system
spec:
  siteLocalNetwork: {}
  staticRoutes:
  - attrs:
    - ROUTE_ATTR_INSTALL_FORWARDING
    ipAddress: 10.2.2.1
    ipPrefixes:
    - 10.1.1.0/24

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"virtual-network-1","namespace":"system"},"spec":{"siteLocalNetwork":{},"staticRoutes":[{"ipPrefixes":["10.1.1.0/24"],"ipAddress":"10.2.2.1","attrs":["ROUTE_ATTR_INSTALL_FORWARDING"]}]}}' -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/virtual_networks/virtual-network-1'

curl response:

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

{

}