From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6FF8D1FF178 for ; Mon, 29 Dec 2025 15:57:16 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A36951CFB9; Mon, 29 Dec 2025 15:58:22 +0100 (CET) Mime-Version: 1.0 Date: Mon, 29 Dec 2025 15:57:48 +0100 Message-Id: From: "Lukas Wagner" To: "Shannon Sterz" , "Lukas Wagner" X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20251218142007.279631-1-l.wagner@proxmox.com> <20251218142007.279631-6-l.wagner@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1767020242558 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.112 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 POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 3/4] api: add /remotes/tasks/refresh 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 Cc: 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" On Fri Dec 19, 2025 at 2:52 PM CET, Shannon Sterz wrote: > some comments in-line: > > On Thu Dec 18, 2025 at 3:20 PM CET, Lukas Wagner wrote: [...] >> #[api( >> @@ -168,3 +175,80 @@ async fn task_statistics( >> >> Ok(TaskStatistics { by_type, by_remote }) >> } >> + >> +#[api( >> + input: { >> + properties: { >> + remote: { >> + schema: REMOTE_ID_SCHEMA, >> + optional: true, > > i wonder if it makes sense to allow a list of remotes here instead of > just a single remote. Yeah, good point. I don't see any reason why not, especially since the refresh_taskcache function supports a list of remotes anyway. As for permissions, I will implement it so that if `remotes` is provided, the user requires the appropriate permissions for *all* off them - opposed to just not showing them as we do for `remotes` is not provided. I will change this to a `remotes` parameter for v2. Thanks a lot, Shannon! > > this api endpoint would also benefit from a short description on how > this parameter influences the result imo. > Will do! >> + }, >> + }, >> + }, >> + access: { >> + permission: &Permission::Anybody, >> + description: "Resource.Modify privileges are needed on /resource/{remote}", >> + }, >> + returns: { type: UPID } >> +)] >> +/// Refresh the update summary of all remotes. >> +pub fn refresh_remote_tasks( >> + remote: Option, >> + rpcenv: &mut dyn RpcEnvironment, >> +) -> Result { >> + let (config, _digest) = pdm_config::remotes::config()?; >> + >> + let auth_id: Authid = rpcenv.get_auth_id().unwrap().parse()?; >> + let user_info = CachedUserInfo::new()?; [...] _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel