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 4E3591FF0B0 for ; Fri, 09 Oct 2026 16:53:49 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 15AB921672; Fri, 09 Oct 2026 16:53:49 +0200 (CEST) From: Jonas Theisen To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional Date: Fri, 9 Oct 2026 16:53:11 +0200 Message-ID: <20261009145328.281554-3-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261009145328.281554-1-j.theisen@proxmox.com> References: <20261009145328.281554-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791557624212 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.169 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: BLI2YTX2OD2RLF3SFXN3NKDDNKL3GT7W X-Message-ID-Hash: BLI2YTX2OD2RLF3SFXN3NKDDNKL3GT7W X-MailFrom: j.theisen@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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: To align the prune job API to the other job types and to make use of the disable parameter the schedule should be optional. If this is not the case a new prune job cannot be created to be manually run i.e. disabled without a schedule. This also means the schedule should be an Option instead of a plain String. This is based on the existing other jobs. Signed-off-by: Jonas Theisen --- pbs-api-types/src/jobs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs index 73d7c13f..9587971a 100644 --- a/pbs-api-types/src/jobs.rs +++ b/pbs-api-types/src/jobs.rs @@ -924,6 +924,7 @@ impl PruneJobOptions { schema: DATASTORE_SCHEMA, }, schedule: { + optional: true, schema: PRUNE_SCHEDULE_SCHEMA, }, comment: { @@ -950,7 +951,8 @@ pub struct PruneJobConfig { #[updater(serde(skip_serializing_if = "Option::is_none"))] pub disable: bool, - pub schedule: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub schedule: Option, #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, -- 2.47.3