ves-io-schema-fleet-API-Replace

Examples of replacing fleet

Usecase:

Replace superstore fleet to change the software version

Request using vesctl:

vesctl configuration replace fleet -i fleet.yaml

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

metadata:
  name: superstore-fleet
  namespace: system
spec:
  devices:
  - name: eth0
    networkDevice:
      interface:
      - kind: network_interface
        name: eth0
        namespace: system
        tenant: acmecorp
      use: NETWORK_INTERFACE_USE_OUTSIDE
    owner: DEVICE_OWNER_VER
  - name: eth1
    networkDevice:
      interface:
      - kind: network_interface
        name: eth1
        namespace: system
        tenant: acmecorp
      use: NETWORK_INTERFACE_USE_INSIDE
    owner: DEVICE_OWNER_VER
  networkConnectors:
  - kind: network_connector
    name: connect-in-out
    namespace: system
    tenant: acmecorp
  networkFirewall:
  - kind: network_firewall
    name: superstore-firewall
    namespace: system
    tenant: acmecorp
  volterraSoftwareVersion: 2019-build-9990

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"superstore-fleet","namespace":"system"},"spec":{"volterraSoftwareVersion":"2019-build-9990","devices":[{"name":"eth0","owner":"DEVICE_OWNER_VER","networkDevice":{"interface":[{"kind":"network_interface","tenant":"acmecorp","namespace":"system","name":"eth0"}],"use":"NETWORK_INTERFACE_USE_OUTSIDE"}},{"name":"eth1","owner":"DEVICE_OWNER_VER","networkDevice":{"interface":[{"kind":"network_interface","tenant":"acmecorp","namespace":"system","name":"eth1"}],"use":"NETWORK_INTERFACE_USE_INSIDE"}}],"networkConnectors":[{"kind":"network_connector","tenant":"acmecorp","namespace":"system","name":"connect-in-out"}],"networkFirewall":[{"kind":"network_firewall","tenant":"acmecorp","namespace":"system","name":"superstore-firewall"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/fleets/superstore-fleet'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:39 GMT
Vary: Accept-Encoding

{

}