api: split max-depth schema/types

into the regular one (with default == MAX) and the one used for
pull/sync, where the default is 'None' which actually means the remote
end reduces the scope of sync automatically (or, if needed,
backwards-compat mode without any remote namespaces at all).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2022-05-13 11:26:55 +02:00
parent 66abc4cb7d
commit e40c7fb906
3 changed files with 12 additions and 5 deletions

View File

@ -9,7 +9,8 @@ use proxmox_schema::*;
use crate::{
Authid, BackupNamespace, BackupType, RateLimitConfig, Userid, BACKUP_GROUP_SCHEMA,
BACKUP_NAMESPACE_SCHEMA, DATASTORE_SCHEMA, DRIVE_NAME_SCHEMA, MEDIA_POOL_NAME_SCHEMA,
NS_MAX_DEPTH_SCHEMA, PROXMOX_SAFE_ID_FORMAT, REMOTE_ID_SCHEMA, SINGLE_LINE_COMMENT_SCHEMA,
NS_MAX_DEPTH_REDUCED_SCHEMA, PROXMOX_SAFE_ID_FORMAT, REMOTE_ID_SCHEMA,
SINGLE_LINE_COMMENT_SCHEMA,
};
const_regex! {
@ -436,7 +437,7 @@ pub const GROUP_FILTER_LIST_SCHEMA: Schema =
optional: true,
},
"max-depth": {
schema: NS_MAX_DEPTH_SCHEMA,
schema: NS_MAX_DEPTH_REDUCED_SCHEMA,
optional: true,
},
comment: {