From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id C7B101FF0C2 for ; Thu, 03 Dec 2026 10:58:58 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 170902175A; Thu, 03 Dec 2026 10:58:49 +0100 (CET) From: POYEN Alexis To: pve-devel@lists.proxmox.com Subject: [RFC PATCH manager 2/3] close #4186: api: backup: support tag based guest selection in jobs Date: Thu, 3 Dec 2026 10:27:09 +0100 Message-ID: <20261203092717.1863218-4-alexis.poyen@groupe-cyllene.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261203092717.1863218-1-alexis.poyen@groupe-cyllene.com> References: <20261203092717.1863218-1-alexis.poyen@groupe-cyllene.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: alexis.poyen@groupe-cyllene.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: 2GKM4MUJ77JZCIWC5Q2WQTAB6ROD66PJ X-Message-ID-Hash: 2GKM4MUJ77JZCIWC5Q2WQTAB6ROD66PJ X-Mailman-Approved-At: Thu, 03 Dec 2026 10:58:46 +0100 CC: POYEN Alexis X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Allow creating and updating vzdump backup jobs with the new 'tags' option. Keep the selection options mutually exclusive: setting 'vmid', 'all' or 'pool' removes 'tags' and vice versa. When switching a job to the 'tags' mode, the previously configured selection (e.g. a pool) is dropped, so the new mode takes effect. Signed-off-by: POYEN Alexis --- PVE/API2/Backup.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm index 7e1173bf..1b3208c9 100644 --- a/PVE/API2/Backup.pm +++ b/PVE/API2/Backup.pm @@ -622,13 +622,21 @@ __PACKAGE__->register_method({ delete $job->{all}; delete $job->{exclude}; delete $job->{pool}; + delete $job->{tags}; } elsif ($param->{all}) { delete $job->{vmid}; delete $job->{pool}; + delete $job->{tags}; + } elsif ($param->{tags}) { + delete $job->{vmid}; + delete $job->{all}; + delete $job->{exclude}; + delete $job->{pool}; } elsif ($job->{pool}) { delete $job->{vmid}; delete $job->{all}; delete $job->{exclude}; + delete $job->{tags}; } PVE::VZDump::verify_vzdump_parameters($job, 1); -- 2.53.0