ves-io-schema-site-API-Replace

Examples of replacing site

Usecase:

Replace site-1

Request using vesctl:

vesctl configuration replace site -i site.yaml

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

metadata:
  labels:
    host-os-version: coreos-2135-6-0
    hw-vendor: amazon-ec2
    hw-version: ""
    provider: AWS
  name: site-1
  namespace: documentation
spec:
  address: Bangalore
  bgpPeerAddress: 2.3.4.5
  bgpRouterId: 1.2.3.4
  siteToSiteTunnelIp: 1.2.3.4
  tunnelType: SITE_TO_SITE_TUNNEL_IPSEC
  vipVrrpMode: VIP_VRRP_ENABLE

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"site-1","namespace":"documentation","labels":{"host-os-version":"coreos-2135-6-0","hw-vendor":"amazon-ec2","hw-version":"","provider":"AWS"}},"spec":{"address":"Bangalore","vipVrrpMode":"VIP_VRRP_ENABLE","siteToSiteTunnelIp":"1.2.3.4","bgpRouterId":"1.2.3.4","bgpPeerAddress":"2.3.4.5","tunnelType":"SITE_TO_SITE_TUNNEL_IPSEC"}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/sites/site-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:33 GMT
Vary: Accept-Encoding

{

}