From b90445a12c31c970c1cd1d2f37508ffcee586bf8 Mon Sep 17 00:00:00 2001 From: zamrih Date: Mon, 16 Oct 2023 20:14:26 -0400 Subject: [PATCH] fix(lxc): unmarshal string/int vmid as int when read container status (#622) fix(lxc): unmarshal string/int vmid as int Signed-off-by: zamrih Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- proxmox/nodes/containers/containers_types.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/proxmox/nodes/containers/containers_types.go b/proxmox/nodes/containers/containers_types.go index 308c0e91..481fef26 100644 --- a/proxmox/nodes/containers/containers_types.go +++ b/proxmox/nodes/containers/containers_types.go @@ -204,16 +204,16 @@ type GetStatusResponseBody struct { // GetStatusResponseData contains the data from a container get status response. type GetStatusResponseData struct { - CPUCount *float64 `json:"cpus,omitempty"` - Lock *string `json:"lock,omitempty"` - MemoryAllocation *int `json:"maxmem,omitempty"` - Name *string `json:"name,omitempty"` - RootDiskSize *interface{} `json:"maxdisk,omitempty"` - Status string `json:"status,omitempty"` - SwapAllocation *int `json:"maxswap,omitempty"` - Tags *string `json:"tags,omitempty"` - Uptime *int `json:"uptime,omitempty"` - VMID *int `json:"vmid,omitempty"` + CPUCount *float64 `json:"cpus,omitempty"` + Lock *string `json:"lock,omitempty"` + MemoryAllocation *int `json:"maxmem,omitempty"` + Name *string `json:"name,omitempty"` + RootDiskSize *interface{} `json:"maxdisk,omitempty"` + Status string `json:"status,omitempty"` + SwapAllocation *int `json:"maxswap,omitempty"` + Tags *string `json:"tags,omitempty"` + Uptime *int `json:"uptime,omitempty"` + VMID *types.CustomInt `json:"vmid,omitempty"` } // StartResponseBody contains the body from a container start response.