You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CloudStack backend response for listClustersMetrics "command" has changed its JSON structure, but the cloudstack-go wrapper is still parsing the old field (hostmetrics).
This results in host metrics being returned as null in the Go SDK response.
This is the listClustersMetrics counterpart of #136: the response struct used the stale json tag (clustersmetric) while the backend returns the list under cluster, so the slice deserialized to nil.
PR #137 fixes exactly this (ClustersMetrics []*ClustersMetric json:"clustersmetric" → json:"cluster"). I confirmed the key against a live CloudStack 4.22 deployment — listClustersMetrics returns its list under the top-level key cluster — so that change is correct. Once #137 merges (it needs two unrelated corrections I flagged there for db/usageserver, but the cluster/host changes are good), this is resolved.
Activity
jmsperu commentedon Jun 20, 2026
This is the
listClustersMetricscounterpart of #136: the response struct used the stale json tag (clustersmetric) while the backend returns the list undercluster, so the slice deserialized to nil.PR #137 fixes exactly this (
ClustersMetrics []*ClustersMetric json:"clustersmetric"→json:"cluster"). I confirmed the key against a live CloudStack 4.22 deployment —listClustersMetricsreturns its list under the top-level keycluster— so that change is correct. Once #137 merges (it needs two unrelated corrections I flagged there fordb/usageserver, but the cluster/host changes are good), this is resolved.