src/bin/proxmox-backup-client.rs: minor code cleanup
This commit is contained in:
parent
9bc3ddb822
commit
25f1650b71
@ -223,6 +223,12 @@ fn main() {
|
|||||||
.into()
|
.into()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let backup_source_schema: Arc<Schema> = Arc::new(
|
||||||
|
StringSchema::new("Backup source specification ([<label>:<path>]).")
|
||||||
|
.format(Arc::new(ApiStringFormat::Pattern(&BACKUPSPEC_REGEX)))
|
||||||
|
.into()
|
||||||
|
);
|
||||||
|
|
||||||
let create_cmd_def = CliCommand::new(
|
let create_cmd_def = CliCommand::new(
|
||||||
ApiMethod::new(
|
ApiMethod::new(
|
||||||
create_backup,
|
create_backup,
|
||||||
@ -232,9 +238,7 @@ fn main() {
|
|||||||
"backupspec",
|
"backupspec",
|
||||||
ArraySchema::new(
|
ArraySchema::new(
|
||||||
"List of backup source specifications ([<label>:<path>] ...)",
|
"List of backup source specifications ([<label>:<path>] ...)",
|
||||||
StringSchema::new("Directory source specification ([<label>:<path>]).")
|
backup_source_schema,
|
||||||
.format(Arc::new(ApiStringFormat::Pattern(&BACKUPSPEC_REGEX)))
|
|
||||||
.into()
|
|
||||||
).min_length(1)
|
).min_length(1)
|
||||||
)
|
)
|
||||||
.optional(
|
.optional(
|
||||||
|
Loading…
Reference in New Issue
Block a user