]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/api2/types/mod.rs
add pbs-datastore module
[proxmox-backup.git] / src / api2 / types / mod.rs
index 2838a6098ee54f21db457566cf73f13a7ff402bf..c9ba6db6a46f6fdc734405a65a9727107cfbdea5 100644 (file)
@@ -7,12 +7,13 @@ use proxmox::api::{api, schema::*};
 use proxmox::const_regex;
 use proxmox::{IPRE, IPRE_BRACKET, IPV4RE, IPV6RE, IPV4OCTET, IPV6H16, IPV6LS32};
 
+use pbs_datastore::catalog::CatalogEntryType;
+
 use crate::{
     backup::{
         CryptMode,
         Fingerprint,
         DirEntryAttribute,
-        CatalogEntryType,
     },
     server::UPID,
     config::acl::Role,
@@ -514,6 +515,12 @@ pub const BLOCKDEVICE_NAME_SCHEMA: Schema = StringSchema::new("Block device name
     .max_length(64)
     .schema();
 
+pub const REALM_ID_SCHEMA: Schema = StringSchema::new("Realm name.")
+    .format(&PROXMOX_SAFE_ID_FORMAT)
+    .min_length(2)
+    .max_length(32)
+    .schema();
+
 // Complex type definitions
 
 #[api(