src/api2/types.rs: define CHUNK_DIGEST_SCHEMA

This commit is contained in:
Dietmar Maurer
2019-06-13 07:30:42 +02:00
parent b595cb9d2c
commit 6762db70d6
2 changed files with 10 additions and 4 deletions

View File

@ -27,6 +27,13 @@ lazy_static!{
StringSchema::new("Prevent changes if current configuration file has different SHA256 digest. This can be used to prevent concurrent modifications.")
.format(PVE_CONFIG_DIGEST_FORMAT.clone()).into();
pub static ref CHUNK_DIGEST_FORMAT: Arc<ApiStringFormat> =
ApiStringFormat::Pattern(&common_regex::SHA256_HEX_REGEX).into();
pub static ref CHUNK_DIGEST_SCHEMA: Arc<Schema> =
StringSchema::new("Chunk digest (SHA256).")
.format(CHUNK_DIGEST_FORMAT.clone()).into();
pub static ref NODE_SCHEMA: Arc<Schema> = Arc::new(
StringSchema::new("Node name (or 'localhost')")
.format(