From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3F0E079DCD for ; Thu, 28 Oct 2021 11:06:21 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3611E1D883 for ; Thu, 28 Oct 2021 11:05:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id C038F1D878 for ; Thu, 28 Oct 2021 11:05:50 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9A67245AD9 for ; Thu, 28 Oct 2021 11:05:50 +0200 (CEST) Date: Thu, 28 Oct 2021 11:05:50 +0200 From: Wolfgang Bumiller To: Dominik Csapak Cc: pbs-devel@lists.proxmox.com Message-ID: <20211028090550.xkr6gjabznywk2nr@olga.proxmox.com> References: <20211027112238.3758515-1-d.csapak@proxmox.com> <20211027112238.3758515-10-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211027112238.3758515-10-d.csapak@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.585 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [snapshot.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup v3 09/13] proxmox-backup-client: add 'protected' commands X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2021 09:06:21 -0000 just an FYI about all the explicit `Null` values we have by now... We *can* just return `()` ;-) On Wed, Oct 27, 2021 at 01:22:34PM +0200, Dominik Csapak wrote: > includes 'update' and 'show' similar to the notes commands > > Signed-off-by: Dominik Csapak > --- > proxmox-backup-client/src/snapshot.rs | 113 ++++++++++++++++++++++++++ > 1 file changed, 113 insertions(+) > > diff --git a/proxmox-backup-client/src/snapshot.rs b/proxmox-backup-client/src/snapshot.rs > index 6b563d79..46b1db09 100644 > --- a/proxmox-backup-client/src/snapshot.rs > +++ b/proxmox-backup-client/src/snapshot.rs > @@ -358,6 +358,118 @@ async fn update_notes(param: Value) -> Result { > Ok(Value::Null) > } > > +#[api( (...) > +)] > +/// Show protection status of the specified snapshot > +async fn show_protection(param: Value) -> Result { ^ `-> Result<(), Error>` (...) v `Ok(())` > + Ok(Value::Null) > +} > + > +#[api( (...) > +)] > +/// Update Protection Status of a snapshot > +async fn update_protection(protected: bool, param: Value) -> Result { ^ `-> Result<(), Error>` (...) v `Ok(())` > + Ok(Value::Null) > +}