close #3459: manager: add --ignore-verified and --outdated-after parameters

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Hannes Laimer 2021-06-22 09:56:20 +02:00 committed by Thomas Lamprecht
parent dcbf29e71b
commit 60abf03f05
1 changed files with 11 additions and 3 deletions

View File

@ -269,6 +269,14 @@ async fn pull_datastore(
"store": { "store": {
schema: DATASTORE_SCHEMA, schema: DATASTORE_SCHEMA,
}, },
"ignore-verified": {
schema: IGNORE_VERIFIED_BACKUPS_SCHEMA,
optional: true,
},
"outdated-after": {
schema: VERIFICATION_OUTDATED_AFTER_SCHEMA,
optional: true,
},
"output-format": { "output-format": {
schema: OUTPUT_FORMAT, schema: OUTPUT_FORMAT,
optional: true, optional: true,
@ -279,14 +287,14 @@ async fn pull_datastore(
/// Verify backups /// Verify backups
async fn verify( async fn verify(
store: String, store: String,
param: Value, mut param: Value,
) -> Result<Value, Error> { ) -> Result<Value, Error> {
let output_format = get_output_format(&param); let output_format = extract_output_format(&mut param);
let mut client = connect_to_localhost()?; let mut client = connect_to_localhost()?;
let args = json!({}); let args = json!(param);
let path = format!("api2/json/admin/datastore/{}/verify", store); let path = format!("api2/json/admin/datastore/{}/verify", store);