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:
		
				
					committed by
					
						
						Dietmar Maurer
					
				
			
			
				
	
			
			
			
						parent
						
							12710fd3c3
						
					
				
				
					commit
					40dc103103
				
			@ -260,11 +260,9 @@ fn task_mgmt_cli() -> CommandLineInterface {
 | 
				
			|||||||
            "remote-store": {
 | 
					            "remote-store": {
 | 
				
			||||||
                schema: DATASTORE_SCHEMA,
 | 
					                schema: DATASTORE_SCHEMA,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            delete: {
 | 
					            "remove-vanished": {
 | 
				
			||||||
                description: "Delete vanished backups. This remove the local copy if the remote backup was deleted.",
 | 
					                schema: REMOVE_VANISHED_BACKUPS_SCHEMA,
 | 
				
			||||||
                type: Boolean,
 | 
					 | 
				
			||||||
                optional: true,
 | 
					                optional: true,
 | 
				
			||||||
                default: true,
 | 
					 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "output-format": {
 | 
					            "output-format": {
 | 
				
			||||||
                schema: OUTPUT_FORMAT,
 | 
					                schema: OUTPUT_FORMAT,
 | 
				
			||||||
@ -278,7 +276,7 @@ async fn pull_datastore(
 | 
				
			|||||||
    remote: String,
 | 
					    remote: String,
 | 
				
			||||||
    remote_store: String,
 | 
					    remote_store: String,
 | 
				
			||||||
    local_store: String,
 | 
					    local_store: String,
 | 
				
			||||||
    delete: Option<bool>,
 | 
					    remove_vanished: Option<bool>,
 | 
				
			||||||
    param: Value,
 | 
					    param: Value,
 | 
				
			||||||
) -> Result<Value, Error> {
 | 
					) -> Result<Value, Error> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -286,16 +284,13 @@ async fn pull_datastore(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    let mut client = connect()?;
 | 
					    let mut client = connect()?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let mut args = json!({
 | 
					    let args = json!({
 | 
				
			||||||
        "store": local_store,
 | 
					        "store": local_store,
 | 
				
			||||||
        "remote": remote,
 | 
					        "remote": remote,
 | 
				
			||||||
        "remote-store": remote_store,
 | 
					        "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?;
 | 
					    let result = client.post("api2/json/pull", Some(args)).await?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    view_task_result(client, result, &output_format).await?;
 | 
					    view_task_result(client, result, &output_format).await?;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user