You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by vi...@apache.org on 2025/08/27 11:21:53 UTC

(cloudstack-go) branch main updated: Zone and Pod update responses aren't being processed correctly

This is an automated email from the ASF dual-hosted git repository.

vishesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 10ff80d  Zone and Pod update responses aren't being processed correctly
10ff80d is described below

commit 10ff80df022b4a8154a3032a79cb34cd3278b46b
Author: Ben Sandberg <pd...@users.noreply.github.com>
AuthorDate: Wed Aug 27 04:21:48 2025 -0700

    Zone and Pod update responses aren't being processed correctly
---
 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 88a0853..d13ca16 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 f907426..b1cbaa3 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 2e29be1..7e428e5 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 ba200aa..bd330a7 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -1797,11 +1797,13 @@ func (s *service) generateNewAPICallFunc(a *API) {
 		"UpdateCluster",
 		"UpdateVlanIpRange",
 		"CreatePod",
+		"UpdatePod",
 		"CreateSSHKeyPair",
 		"CreateSecurityGroup",
 		"CreateServiceOffering",
 		"CreateUser",
 		"CreateZone",
+		"UpdateZone",
 		"DedicateGuestVlanRange",
 		"EnableUser",
 		"GetVirtualMachineUserData",