From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id ECC601FF191 for ; Tue, 21 Oct 2025 13:11:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7193A1BCA4; Tue, 21 Oct 2025 13:12:22 +0200 (CEST) From: Christian Ebner To: pdm-devel@lists.proxmox.com Date: Tue, 21 Oct 2025 13:11:22 +0200 Message-ID: <20251021111129.294349-13-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251021111129.294349-1-c.ebner@proxmox.com> References: <20251021111129.294349-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761045096686 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.042 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager v3 12/19] pdm-api-types: introduce PBS datastore specific counters X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Instead of using the storage counters, which are to limited to cover counts of e.g. high usage stores, datastores which are in maintenance mode ecc., introduce a dedicated type and add extended fields. Signed-off-by: Christian Ebner --- Changes since version 2: - not present in previous version lib/pdm-api-types/src/resource.rs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs index 400f2af..6c0125c 100644 --- a/lib/pdm-api-types/src/resource.rs +++ b/lib/pdm-api-types/src/resource.rs @@ -538,6 +538,28 @@ pub struct StorageStatusCount { pub unknown: u64, } +#[api] +#[derive(Default, Serialize, Deserialize, Clone, PartialEq)] +/// Amount of Proxmox Backup Server datastores with certain state +pub struct PbsDatastoreStatusCount { + /// Amount of online datastores + pub online: u64, + /// Amount of datastores which are in a maintenance mode + pub in_maintenance: Option, + /// Amount of datastores which have high datastore usage + #[serde(skip_serializing_if = "Option::is_none")] + pub high_usage: Option, + /// Amount of datastores in unknown state + #[serde(skip_serializing_if = "Option::is_none")] + pub unknown: Option, + /// Amount of removable datastores + #[serde(skip_serializing_if = "Option::is_none")] + pub removable: Option, + /// Amount of datastores with S3 backend + #[serde(skip_serializing_if = "Option::is_none")] + pub s3_backend: Option, +} + #[api] #[derive(Default, Serialize, Deserialize, Clone, PartialEq)] /// Amount of SDN zones in certain states @@ -580,7 +602,7 @@ pub struct ResourcesStatus { /// Status of PBS Nodes pub pbs_nodes: NodeStatusCount, /// Status of PBS Datastores - pub pbs_datastores: StorageStatusCount, + pub pbs_datastores: PbsDatastoreStatusCount, /// List of the failed remotes including type and error #[serde(default, skip_serializing_if = "Vec::is_empty")] pub failed_remotes_list: Vec, -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel