mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-29 03:00:44 +00:00
api: types: add 'mount_status' to schema
... and deserialize with default if field is missing in data.
Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Fixes: 35fb5d4f7f
("pbs-api-types: add mount_status field to DataStoreListItem")
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
2ed9c4bfca
commit
f1f8c65c70
@ -452,6 +452,9 @@ impl DataStoreConfig {
|
||||
optional: true,
|
||||
schema: SINGLE_LINE_COMMENT_SCHEMA,
|
||||
},
|
||||
"mount-status": {
|
||||
type: DataStoreMountStatus,
|
||||
},
|
||||
maintenance: {
|
||||
optional: true,
|
||||
format: &ApiStringFormat::PropertyString(&MaintenanceMode::API_SCHEMA),
|
||||
@ -465,6 +468,7 @@ impl DataStoreConfig {
|
||||
pub struct DataStoreListItem {
|
||||
pub store: String,
|
||||
pub comment: Option<String>,
|
||||
#[serde(default)]
|
||||
pub mount_status: DataStoreMountStatus,
|
||||
/// If the datastore is in maintenance mode, information about it
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -1447,6 +1451,9 @@ pub struct DataStoreStatus {
|
||||
store: {
|
||||
schema: DATASTORE_SCHEMA,
|
||||
},
|
||||
"mount-status": {
|
||||
type: DataStoreMountStatus,
|
||||
},
|
||||
history: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
@ -1471,6 +1478,7 @@ pub struct DataStoreStatusListItem {
|
||||
/// The available bytes of the underlying storage. (-1 on error)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub avail: Option<u64>,
|
||||
#[serde(default)]
|
||||
pub mount_status: DataStoreMountStatus,
|
||||
/// A list of usages of the past (last Month).
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
Loading…
Reference in New Issue
Block a user