From 40dc10310320663fefce18d96265a1842f3955d7 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 26 May 2020 12:23:27 +0200 Subject: [PATCH] fix cli pull api call there is no 'delete' parameter, only 'remove-vanished', so fix that Signed-off-by: Dominik Csapak --- src/bin/proxmox-backup-manager.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 185e44d3..c6a2d03e 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -260,11 +260,9 @@ fn task_mgmt_cli() -> CommandLineInterface { "remote-store": { schema: DATASTORE_SCHEMA, }, - delete: { - description: "Delete vanished backups. This remove the local copy if the remote backup was deleted.", - type: Boolean, + "remove-vanished": { + schema: REMOVE_VANISHED_BACKUPS_SCHEMA, optional: true, - default: true, }, "output-format": { schema: OUTPUT_FORMAT, @@ -278,7 +276,7 @@ async fn pull_datastore( remote: String, remote_store: String, local_store: String, - delete: Option, + remove_vanished: Option, param: Value, ) -> Result { @@ -286,16 +284,13 @@ async fn pull_datastore( let mut client = connect()?; - let mut args = json!({ + let args = json!({ "store": local_store, "remote": remote, "remote-store": remote_store, + "remove-vanished": remove_vanished, }); - if let Some(delete) = delete { - args["delete"] = delete.into(); - } - let result = client.post("api2/json/pull", Some(args)).await?; view_task_result(client, result, &output_format).await?;