src/api2/types.rs: factor out DATASTORE_SCHEMA

This commit is contained in:
Dietmar Maurer
2019-12-11 13:45:23 +01:00
parent 567d3e00fb
commit 66c49c21c3
6 changed files with 20 additions and 17 deletions

View File

@ -28,7 +28,7 @@ pub const API_METHOD_UPGRADE_BACKUP: ApiMethod = ApiMethod::new(
&ObjectSchema::new(
concat!("Upgraded to backup protocol ('", PROXMOX_BACKUP_READER_PROTOCOL_ID_V1!(), "')."),
&sorted!([
("store", false, &StringSchema::new("Datastore name.").schema()),
("store", false, &DATASTORE_SCHEMA),
("backup-type", false, &StringSchema::new("Backup type.")
.format(&ApiStringFormat::Enum(&["vm", "ct", "host"]))
.schema()