From e9413966786e7d7bfec1cf4a60d1fc4218ee7872 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 11 May 2022 09:43:10 +0200 Subject: [PATCH] verify job: support max-depth config Signed-off-by: Thomas Lamprecht --- pbs-api-types/src/jobs.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs index 46ae4fe2..87009b3a 100644 --- a/pbs-api-types/src/jobs.rs +++ b/pbs-api-types/src/jobs.rs @@ -186,6 +186,10 @@ pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = optional: true, schema: BACKUP_NAMESPACE_SCHEMA, }, + "max-depth": { + optional: true, + schema: crate::NS_MAX_DEPTH_SCHEMA, + }, } )] #[derive(Serialize, Deserialize, Updater)] @@ -212,6 +216,10 @@ pub struct VerificationJobConfig { #[serde(skip_serializing_if = "Option::is_none", default)] /// on which backup namespace to run the verification recursively pub ns: Option, + #[serde(skip_serializing_if = "Option::is_none", default)] + /// how deep the verify should go from the `ns` level downwards. Passing 0 verifies only the + /// snapshots on the same level as the passed `ns`, or the datastore root if none. + pub max_depth: Option, } #[api(