apache / apache/cloudstack-go

Bug: listHostsMetrics response mapping mismatch (hostmetrics --> host) causes null parsing.

未关闭
#136 1 条评论 0 个 reaction 已指派 0 人 已被 @Nehanth67 认领 在 GitHub 查看
主要语言
Go
星标
39
派生
47
PR 合并指标
30 天内没有已合并 PR

描述

The CloudStack backend response for listHostsMetrics 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.

Affected Component

API: listHostsMetrics (command)

Client: github.com/apache/cloudstack-go/v2

Version tested: v2.19.0 (and likely later)

Key change:
The backend now returns metrics under the field host, not hostmetrics.
Go SDK should correctly deserialize host metrics into a non-nil slice.

Actual SDK Behavior currently
{
"count": 3,
"host": null
}

Please rectify.

Image

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查用于 listHostsMetrics API 的 cloudstack-go v2 wrapper 及其响应映射。根据 issue 中描述的后端字段确认该映射,然后验证 SDK 返回的 host metrics slice 是否为非 nil;关联的 pull request #137 表明相关工作已经在进行中。

由索引模型根据 Issue 内容生成。

评估

技术栈
go
领域
api
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。