From 92343a6468d3bd59b31fef4803726fb55d53af48 Mon Sep 17 00:00:00 2001 From: Ben Sandberg Date: Thu, 21 Aug 2025 16:11:13 -0700 Subject: [PATCH] Zone and Pod update responses aren't being processed the same as other updates --- README.md | 7 ++++++- cloudstack/PodService.go | 4 ++++ cloudstack/ZoneService.go | 4 ++++ generate/generate.go | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88a0853d..d13ca165 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,14 @@ The `listAPIs.json` file holds the output of `listApis` command for a specific r ``` # Run it via the Makefile make all - ``` +### Prerequisites + +* `goimports`: Install by running `go install golang.org/x/tools/cmd/goimports@latest` + +* `mockgen`: Install by running `go install go.uber.org/mock/mockgen@latest` + ## Getting Help _Please try to see if the [module documentation](https://pkg.go.dev/github.com/apache/cloudstack-go/v2/cloudstack) can provide some answers first!_ diff --git a/cloudstack/PodService.go b/cloudstack/PodService.go index f907426d..b1cbaa30 100644 --- a/cloudstack/PodService.go +++ b/cloudstack/PodService.go @@ -1830,6 +1830,10 @@ func (s *PodService) UpdatePod(p *UpdatePodParams) (*UpdatePodResponse, error) { return nil, err } + if resp, err = getRawValue(resp); err != nil { + return nil, err + } + var r UpdatePodResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err diff --git a/cloudstack/ZoneService.go b/cloudstack/ZoneService.go index 2e29be1e..7e428e5e 100644 --- a/cloudstack/ZoneService.go +++ b/cloudstack/ZoneService.go @@ -3691,6 +3691,10 @@ func (s *ZoneService) UpdateZone(p *UpdateZoneParams) (*UpdateZoneResponse, erro return nil, err } + if resp, err = getRawValue(resp); err != nil { + return nil, err + } + var r UpdateZoneResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err diff --git a/generate/generate.go b/generate/generate.go index 6c43048b..8edb67c3 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -1794,11 +1794,13 @@ func (s *service) generateNewAPICallFunc(a *API) { "UpdateCluster", "UpdateVlanIpRange", "CreatePod", + "UpdatePod", "CreateSSHKeyPair", "CreateSecurityGroup", "CreateServiceOffering", "CreateUser", "CreateZone", + "UpdateZone", "DedicateGuestVlanRange", "EnableUser", "GetVirtualMachineUserData",