From 3ed570f60a5d75e852945cfc3b9a8c3e128ca094 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 9 Jul 2025 00:21:37 +0000 Subject: [PATCH] add MP value for container mp volumes --- app/proxmox.go | 6 ++++++ app/types.go | 1 + 2 files changed, 7 insertions(+) diff --git a/app/proxmox.go b/app/proxmox.go index eeb08a7..64e1ed6 100644 --- a/app/proxmox.go +++ b/app/proxmox.go @@ -234,6 +234,11 @@ func GetVolumeInfo(host *Node, volume string) (*Volume, error) { storageID := strings.Split(volume, ":")[0] volumeID := strings.Split(volume, ",")[0] + mp := "" + if strings.Contains(volume, "mp=") { + x := strings.Split(volume, "mp=")[1] + mp = strings.Split(x, ",")[0] + } storage, err := host.pvenode.Storage(context.Background(), storageID) if err != nil { return &volumeData, nil @@ -250,6 +255,7 @@ func GetVolumeInfo(host *Node, volume string) (*Volume, error) { volumeData.Format = c.Format volumeData.Size = uint64(c.Size) volumeData.File = volumeID + volumeData.MP = mp } } diff --git a/app/types.go b/app/types.go index 73aabb5..0573adf 100644 --- a/app/types.go +++ b/app/types.go @@ -68,6 +68,7 @@ type Volume struct { Format string `json:"format"` Size uint64 `json:"size"` File string `json:"file"` + MP string `json:"mp"` } type NetID string