From: Christian Ebner <c.ebner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox 1/1] pbs-api-types: extend datastore config by backend config parser helper
Date: Tue, 4 Nov 2025 15:49:02 +0100 [thread overview]
Message-ID: <20251104144905.582920-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20251104144905.582920-1-c.ebner@proxmox.com>
Adds a helper method to `DataStoreConfig` which will facilitate the
parsing of the `DatastoreBackendConfig`.
This is required several times, so although logically trivial making
this a common helper is justified.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
pbs-api-types/src/datastore.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index a214ac25..97f530ee 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -630,6 +630,11 @@ impl DataStoreConfig {
Ok(())
}
+
+ /// Parse the datastore backend config from the datastore config
+ pub fn parse_backend_config(&self) -> Result<DatastoreBackendConfig, Error> {
+ self.backend.as_deref().unwrap_or_default().parse()
+ }
}
#[api(
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-04 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 14:49 [pdm-devel] [PATCH proxmox{, -datacenter-manager} 0/4] show dedicated datastore icons in tree view and removable/s3 backend info in overview Christian Ebner
2025-11-04 14:49 ` Christian Ebner [this message]
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] ui: indicate removable datastore in overview and show backing device Christian Ebner
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] ui: indicate s3 datastores in overview and show endpoint id Christian Ebner
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] ui: datastore tree: indicate datastore type by different icons Christian Ebner
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=20251104144905.582920-2-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pdm-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.