ves-io-schema-views-voltstack_site-API-Replace

Examples of replacing voltstack_site

Usecase:

Replace voltstack site to enable gpu

Request using vesctl:

vesctl configuration replace voltstack_site -i voltstack_site.yaml

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

metadata:
  name: cluster-1
  namespace: system
spec:
  bondDeviceList:
    bondDevices:
    - activeBackup: {}
      devices:
      - eth1
      - eth2
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond0
    - activeBackup: {}
      devices:
      - em0
      - em1
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond2
  customNetworkConfig:
    defaultConfig: {}
    interfaceList:
      interfaces:
      - defaultInterface:
          cluster: {}
          device: eth0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          untagged: {}
      - ethernetInterface:
          cluster: {}
          device: bond0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 400
    noForwardProxy: {}
    noGlobalNetwork: {}
    noNetworkPolicy: {}
  customStorageConfig:
    noStaticRoutes: {}
    storageClassList:
      storageClasses:
      - openebsEnterprise:
          protocol: iscsi
          replication: 3
        storageDevice: dev0
    storageDeviceList:
      storageDevices:
      - advancedAdvancedParameters:
          k: v
        openebsEnterprise:
          mayastorPools:
          - node: master-0
            poolDiskDevices:
            - dev/sda
            poolName: pool-0-master-0
        storageDevice: dev0
    storageInterfaceList:
      storageInterfaces:
      - description: Storage Network Bond
        labels:
          abc: xyz
        storageInterface:
          cluster: {}
          device: bond2
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 200
  enableGpu: {}
  masterNodes:
  - master0
  - master1
  - master2
  volterraCertifiedHw: dell-edger640-series-voltstack-combo
  workerNodes:
  - worker0
  - worker1
  - worker2

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"cluster-1","namespace":"system"},"spec":{"volterraCertifiedHw":"dell-edger640-series-voltstack-combo","masterNodes":["master0","master1","master2"],"workerNodes":["worker0","worker1","worker2"],"bondDeviceList":{"bondDevices":[{"name":"bond0","devices":["eth1","eth2"],"activeBackup":{},"linkPollingInterval":501,"linkUpDelay":200},{"name":"bond2","devices":["em0","em1"],"activeBackup":{},"linkPollingInterval":501,"linkUpDelay":200}]},"customNetworkConfig":{"defaultConfig":{},"interfaceList":{"interfaces":[{"defaultInterface":{"device":"eth0","cluster":{},"untagged":{},"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}},{"ethernetInterface":{"device":"bond0","cluster":{},"vlanId":400,"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}}]},"noNetworkPolicy":{},"noForwardProxy":{},"noGlobalNetwork":{}},"customStorageConfig":{"storageInterfaceList":{"storageInterfaces":[{"description":"Storage Network Bond","labels":{"abc":"xyz"},"storageInterface":{"device":"bond2","cluster":{},"vlanId":200,"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}}]},"storageDeviceList":{"storageDevices":[{"storageDevice":"dev0","openebsEnterprise":{"mayastorPools":[{"poolName":"pool-0-master-0","node":"master-0","poolDiskDevices":["dev/sda"]}]},"advancedAdvancedParameters":{"k":"v"}}]},"storageClassList":{"storageClasses":[{"storageDevice":"dev0","openebsEnterprise":{"protocol":"iscsi","replication":3}}]},"noStaticRoutes":{}},"enableGpu":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186851157_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/voltstack_sites/cluster-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Tue, 24 Nov 2020 10:47:41 GMT
Vary: Accept-Encoding

{

}