rbd: fix namespace json parser for xbdDeviceInfo

rbd device list --format=json returns namespace as a namespace not radosNamespace

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
This commit is contained in:
Seena Fallah 2021-01-02 20:25:16 +03:30 committed by mergify[bot]
parent 995879d349
commit fdec9f65b8

View File

@ -59,7 +59,7 @@ func init() {
type rbdDeviceInfo struct { type rbdDeviceInfo struct {
ID string `json:"id"` ID string `json:"id"`
Pool string `json:"pool"` Pool string `json:"pool"`
RadosNamespace string `json:"radosNamespace"` RadosNamespace string `json:"namespace"`
Name string `json:"name"` Name string `json:"name"`
Device string `json:"device"` Device string `json:"device"`
} }
@ -71,7 +71,7 @@ type rbdDeviceInfo struct {
type nbdDeviceInfo struct { type nbdDeviceInfo struct {
ID int64 `json:"id"` ID int64 `json:"id"`
Pool string `json:"pool"` Pool string `json:"pool"`
RadosNamespace string `json:"radosNamespace"` RadosNamespace string `json:"namespace"`
Name string `json:"image"` Name string `json:"image"`
Device string `json:"device"` Device string `json:"device"`
} }