[pbs-devel] [PATCH proxmox-backup] fix #4971: client: Improve output on successful snapshot deletion
Dominik Csapak
d.csapak at proxmox.com
Thu Oct 12 15:07:56 CEST 2023
LGTM
Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>
Tested-by: Dominik Csapak <d.csapak at proxmox.com>
On 10/3/23 16:07, 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 at proxmox.com>
> ---
> proxmox-backup-client/src/snapshot.rs | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/proxmox-backup-client/src/snapshot.rs b/proxmox-backup-client/src/snapshot.rs
> index 4ca8015f..1d985a2e 100644
> --- a/proxmox-backup-client/src/snapshot.rs
> +++ b/proxmox-backup-client/src/snapshot.rs
> @@ -188,13 +188,14 @@ 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)
> + println!("Successfully deleted snapshot {}", snapshot);
> + Ok(Value::Null)
> }
>
> #[api(
More information about the pbs-devel
mailing list