ves-io-schema-fleet-API-Replace
On This Page:
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):
RequestJSON:
{"metadata":{"name":"superstore-fleet","namespace":"system"},"spec":{"volterra_software_version":"2019-build-9990","network_connectors":[{"kind":"network_connector","tenant":"acmecorp","namespace":"system","name":"connect-in-out"}],"network_firewall":[{"kind":"network_firewall","tenant":"acmecorp","namespace":"system","name":"superstore-firewall"}],"interface_list":{"interfaces":[{"tenant":"acmecorp","namespace":"system","name":"int-eth0"},{"tenant":"acmecorp","namespace":"system","name":"int-eth1"}]},"no_bond_devices":{},"no_storage_interfaces":{},"no_storage_device":{},"default_storage_class":{},"no_dc_cluster_group":{},"disable_gpu":{},"no_storage_static_routes":{},"logs_streaming_disabled":{},"allow_all_usb":{},"disable_vm":{}}}
`
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"superstore-fleet","namespace":"system"},"spec":{"volterra_software_version":"2019-build-9990","network_connectors":[{"kind":"network_connector","tenant":"acmecorp","namespace":"system","name":"connect-in-out"}],"network_firewall":[{"kind":"network_firewall","tenant":"acmecorp","namespace":"system","name":"superstore-firewall"}],"interface_list":{"interfaces":[{"tenant":"acmecorp","namespace":"system","name":"int-eth0"},{"tenant":"acmecorp","namespace":"system","name":"int-eth1"}]},"no_bond_devices":{},"no_storage_interfaces":{},"no_storage_device":{},"default_storage_class":{},"no_dc_cluster_group":{},"disable_gpu":{},"no_storage_static_routes":{},"logs_streaming_disabled":{},"allow_all_usb":{},"disable_vm":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_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: Thu, 28 Jul 2022 12:10:07 GMT
Vary: Accept-Encoding
{
}