fix cli pull api call
there is no 'delete' parameter, only 'remove-vanished', so fix that Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
12710fd3c3
commit
40dc103103
@ -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<bool>,
|
||||
remove_vanished: Option<bool>,
|
||||
param: Value,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
@ -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?;
|
||||
|
Loading…
Reference in New Issue
Block a user