Compare commits
1 Commits
81815bab82
...
3ed570f60a
Author | SHA1 | Date | |
---|---|---|---|
3ed570f60a |
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user