Compare commits

...

1 Commits

Author SHA1 Message Date
3ed570f60a add MP value for container mp volumes 2025-07-09 00:21:37 +00:00
2 changed files with 7 additions and 0 deletions

View File

@@ -234,6 +234,11 @@ func GetVolumeInfo(host *Node, volume string) (*Volume, error) {
storageID := strings.Split(volume, ":")[0] storageID := strings.Split(volume, ":")[0]
volumeID := 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) storage, err := host.pvenode.Storage(context.Background(), storageID)
if err != nil { if err != nil {
return &volumeData, nil return &volumeData, nil
@@ -250,6 +255,7 @@ func GetVolumeInfo(host *Node, volume string) (*Volume, error) {
volumeData.Format = c.Format volumeData.Format = c.Format
volumeData.Size = uint64(c.Size) volumeData.Size = uint64(c.Size)
volumeData.File = volumeID volumeData.File = volumeID
volumeData.MP = mp
} }
} }

View File

@@ -68,6 +68,7 @@ type Volume struct {
Format string `json:"format"` Format string `json:"format"`
Size uint64 `json:"size"` Size uint64 `json:"size"`
File string `json:"file"` File string `json:"file"`
MP string `json:"mp"`
} }
type NetID string type NetID string