Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update "datastore create" default parameters
Previously the following input was accepted by the server: ``` { "name": "mclaren-ds19", "sizeInBytes": 17179869184, "storageSystemId": "126fd201-9e6e-5e31-9ffb-a766265b1fd3", "targetHypervisorClusterId": "", "volumeInfo": { "deduplication": false, "encryption": { "cipher": "None" }, "qos": { "iopsLimit": -1, "mbpsLimit": -1 } }, "datastoreType": "VMFS" } ``` But this now triggers a 400 response. ``` { "debugId": "df4c4f566584ca1fc4511d77fe668f0d", "errorCode": "HPE_GL_VIRTUALIZATION_BAD_REQUEST", "httpStatusCode": 400, "message": "input attributes name, type, sizeInBytes, storageSystemID and targetHypervisorClusterID are mandatory parameters. Error: Key: 'CreateDatastoreVirtRequest.TargetHypervisorClusterID' Error:Field validation for 'TargetHypervisorClusterID' failed on the 'required' tag" } ``` In particular, providing `-1` to imply default values for limits no longer seems to work. Rather than specifying limits in this way, we now remove them entirely. We also do the same for other parameters (eg encryption) to pick up default values. The create datastore POST request body will now look like: ``` { "name": "datastore-100", "sizeInBytes": 17179869184, "storageSystemId": "f9689284-0bbd-5bf1-981f-b9799bbc106c", "targetHypervisorClusterId": "", "datastoreType": "VMFS" } ```
- Loading branch information