From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/5] api: types: add 'mount_status' to schema
Date: Tue, 26 Nov 2024 12:43:21 +0100 [thread overview]
Message-ID: <20241126114323.105838-4-h.laimer@proxmox.com> (raw)
In-Reply-To: <20241126114323.105838-1-h.laimer@proxmox.com>
... and deserialize with default if field is missing in data.
Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Fixes: 76609915d6 ("pbs-api-types: add mount_status field to DataStoreListItem")
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
pbs-api-types/src/datastore.rs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 203e75e38..90f1195bf 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -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")]
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-11-26 11:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 11:43 [pbs-devel] [PATCH proxmox-backup 0/5] removable datastore follow-up Hannes Laimer
2024-11-26 11:43 ` [pbs-devel] [PATCH proxmox-backup 1/5] api: mainatenance: allow setting of maintenance mode if 'unmounting' Hannes Laimer
2024-11-26 11:43 ` [pbs-devel] [PATCH proxmox-backup 2/5] api: add Sys.Modify on /system/disks as permission to endpoints handling removable datastores Hannes Laimer
2024-11-26 12:07 ` Fabian Grünbichler
2024-11-26 12:26 ` Thomas Lamprecht
2024-11-26 13:53 ` Hannes Laimer
2024-11-26 14:14 ` Fabian Grünbichler
2024-11-26 11:43 ` Hannes Laimer [this message]
2024-11-26 11:43 ` [pbs-devel] [PATCH proxmox-backup 4/5] docs: add information for " Hannes Laimer
2024-11-26 11:43 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: allow resetting unmounting maintenance Hannes Laimer
2024-11-26 12:11 ` Fabian Grünbichler
2024-11-26 15:35 ` [pbs-devel] applied: " Thomas Lamprecht
2024-11-26 12:09 ` [pbs-devel] partially applied: [PATCH proxmox-backup 0/5] removable datastore follow-up Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241126114323.105838-4-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox