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 0A8A21FF14C for ; Fri, 15 May 2026 17:21:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BFA1212591; Fri, 15 May 2026 17:21:48 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH datacenter-manager v3 03/12] subscription: pool: add data model and config layer From: Wolfgang Bumiller To: Thomas Lamprecht In-Reply-To: <20260515074623.766766-4-t.lamprecht@proxmox.com> References: <20260515074623.766766-1-t.lamprecht@proxmox.com> <20260515074623.766766-4-t.lamprecht@proxmox.com> Date: Fri, 15 May 2026 17:21:04 +0200 Message-Id: <177885846422.344453.370413228863820279.b4-review@b4> X-Mailer: b4 0.15.2 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778858466039 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.087 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 Message-ID-Hash: RI5MYG54J7OEYALYWHW3FOLPDOXABGGN X-Message-ID-Hash: RI5MYG54J7OEYALYWHW3FOLPDOXABGGN X-MailFrom: w.bumiller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pdm-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 15 May 2026 09:43:13 +0200, Thomas Lamprecht wrote: > diff --git a/lib/pdm-api-types/src/subscription.rs b/lib/pdm-api-types/src/subscription.rs > index f0eb525..811bce4 100644 > --- a/lib/pdm-api-types/src/subscription.rs > +++ b/lib/pdm-api-types/src/subscription.rs > @@ -174,3 +179,395 @@ pub struct PdmSubscriptionInfo { > [ ... skip 94 lines ... ] > +pub fn socket_count_from_key(key: &str) -> Option { > + let (prefix, _) = key.split_once('-')?; > + if !prefix.starts_with("pve") { > + return None; > + } > + let after_pve = &prefix[3..]; Above 4 lines could be shortened to let after_pve = prefix.strip_prefix("pve")?; --