[pbs-devel] [PATCH proxmox-backup] api: add dedicated datastore disk schema
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Nov 28 18:49:50 CET 2023
Am 28/11/2023 um 16:25 schrieb Christian Ebner:
> Introduce a dedicated datastore disk schema for disks, to semantically
> distinguish between datastore name and datastore disk name.
>
> Further, adapt the systemd mount unit description accordingly.
>
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
> pbs-api-types/src/datastore.rs | 6 ++++++
> src/api2/node/disks/directory.rs | 8 ++++----
> src/api2/node/disks/zfs.rs | 4 ++--
> src/bin/proxmox_backup_manager/disk.rs | 10 +++++-----
> 4 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
> index 1f619c9d..4150c6c6 100644
> --- a/pbs-api-types/src/datastore.rs
> +++ b/pbs-api-types/src/datastore.rs
> @@ -102,6 +102,12 @@ pub const DATASTORE_SCHEMA: Schema = StringSchema::new("Datastore name.")
> .max_length(32)
> .schema();
>
> +pub const DATASTORE_DISK_SCHEMA: Schema = StringSchema::new("Datastore disk name.")
> + .format(&PROXMOX_SAFE_ID_FORMAT)
> + .min_length(3)
> + .max_length(32)
> + .schema();
> +
this is not really helping me, while that might be because its late, I also think
that this needs a different name, as what is a datastore-disk here actually?
More information about the pbs-devel
mailing list