From 31cd6900a951704aabb13bfde37586a0f4f72977 Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Thu, 7 Dec 2023 04:50:18 +0000 Subject: [PATCH 1/2] Fix params for release api as per API documentation the release params needs to boolean However, currently it is being used as string Signed-off-by: Prabhjot Singh Sethi --- entity/machine.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entity/machine.go b/entity/machine.go index 45e957a..1c70b42 100644 --- a/entity/machine.go +++ b/entity/machine.go @@ -269,8 +269,8 @@ type MachineDeployParams struct { // MachineDeployParams enumerates the parameters for the release operation type MachineReleaseParams struct { Comment string `url:"comment,omitempty"` - Erase string `url:"erase,omitempty"` - Force string `url:"force,omitempty"` - QuickErase string `url:"quick_erase,omitempty"` - SecureErase string `url:"secure_erase,omitempty"` + Erase bool `url:"erase,omitempty"` + Force bool `url:"force,omitempty"` + QuickErase bool `url:"quick_erase,omitempty"` + SecureErase bool `url:"secure_erase,omitempty"` } From 664427b6e4d4f9e63de44d696c38b04867be0799 Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Thu, 7 Dec 2023 14:09:08 +0530 Subject: [PATCH 2/2] Fix the comments for the structure --- entity/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity/machine.go b/entity/machine.go index 1c70b42..ea9e333 100644 --- a/entity/machine.go +++ b/entity/machine.go @@ -266,7 +266,7 @@ type MachineDeployParams struct { EnableHwSync bool `url:"enable_hw_sync,omitempty"` } -// MachineDeployParams enumerates the parameters for the release operation +// MachineReleaseParams enumerates the parameters for the release operation type MachineReleaseParams struct { Comment string `url:"comment,omitempty"` Erase bool `url:"erase,omitempty"`