all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2] fix #4971: client: Improve output on successful snapshot deletion
@ 2023-10-16 10:56 Philipp Hufnagl
  2023-10-16 11:37 ` Philipp Hufnagl
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Hufnagl @ 2023-10-16 10:56 UTC (permalink / raw)
  To: pbs-devel

When a snapshot gets deleted (forgotten), the proxmox backup client
currently returns returns
"Result: {
  "data": null
}"

This feedback may confuse users therefore this patch changes the output
to

"Successfully deleted snapshot <snapshot>"

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
---

Changes since v1
* Remove output message

 proxmox-backup-client/src/snapshot.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-backup-client/src/snapshot.rs b/proxmox-backup-client/src/snapshot.rs
index 4ca8015f..fcfe5840 100644
--- a/proxmox-backup-client/src/snapshot.rs
+++ b/proxmox-backup-client/src/snapshot.rs
@@ -188,13 +188,13 @@ async fn forget_snapshots(param: Value) -> Result<Value, Error> {
 
     let path = format!("api2/json/admin/datastore/{}/snapshots", repo.store());
 
-    let result = client
+    client
         .delete(&path, Some(snapshot_args(&backup_ns, &snapshot)?))
         .await?;
 
     record_repository(&repo);
 
-    Ok(result)
+    Ok(Value::Null)
 }
 
 #[api(
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup v2] fix #4971: client: Improve output on successful snapshot deletion
  2023-10-16 10:56 [pbs-devel] [PATCH proxmox-backup v2] fix #4971: client: Improve output on successful snapshot deletion Philipp Hufnagl
@ 2023-10-16 11:37 ` Philipp Hufnagl
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hufnagl @ 2023-10-16 11:37 UTC (permalink / raw)
  To: pbs-devel

forgott to change the commit message. sendig v3

On 10/16/23 12:56, Philipp Hufnagl wrote:
> When a snapshot gets deleted (forgotten), the proxmox backup client
> currently returns returns
> "Result: {
>   "data": null
> }"
> 
> This feedback may confuse users therefore this patch changes the output
> to
> 
> "Successfully deleted snapshot <snapshot>"
> 
> Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
> ---
> 
> Changes since v1
> * Remove output message
> 
>  proxmox-backup-client/src/snapshot.rs | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/proxmox-backup-client/src/snapshot.rs b/proxmox-backup-client/src/snapshot.rs
> index 4ca8015f..fcfe5840 100644
> --- a/proxmox-backup-client/src/snapshot.rs
> +++ b/proxmox-backup-client/src/snapshot.rs
> @@ -188,13 +188,13 @@ async fn forget_snapshots(param: Value) -> Result<Value, Error> {
>  
>      let path = format!("api2/json/admin/datastore/{}/snapshots", repo.store());
>  
> -    let result = client
> +    client
>          .delete(&path, Some(snapshot_args(&backup_ns, &snapshot)?))
>          .await?;
>  
>      record_repository(&repo);
>  
> -    Ok(result)
> +    Ok(Value::Null)
>  }
>  
>  #[api(




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-16 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 10:56 [pbs-devel] [PATCH proxmox-backup v2] fix #4971: client: Improve output on successful snapshot deletion Philipp Hufnagl
2023-10-16 11:37 ` Philipp Hufnagl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal