]>
git.proxmox.com Git - proxmox-backup.git/blob - pbs-api-types/src/zfs.rs
1 use serde
::{Deserialize, Serialize}
;
3 use proxmox
::api
::{api, schema::*}
;
5 use proxmox
::const_regex
;
8 pub ZPOOL_NAME_REGEX
= r
"^[a-zA-Z][a-z0-9A-Z\-_.:]+$";
11 pub const ZFS_ASHIFT_SCHEMA
: Schema
= IntegerSchema
::new(
12 "Pool sector size exponent.")
18 pub const ZPOOL_NAME_SCHEMA
: Schema
= StringSchema
::new("ZFS Pool Name")
19 .format(&ApiStringFormat
::Pattern(&ZPOOL_NAME_REGEX
))
23 #[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
24 #[serde(rename_all = "lowercase")]
25 /// The ZFS compression algorithm to use.
26 pub enum ZfsCompressionType
{
37 /// Enable compression using the default algorithm.
39 /// Disable compression.
44 #[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
45 #[serde(rename_all = "lowercase")]
46 /// The ZFS RAID level to use.
47 pub enum ZfsRaidLevel
{
63 #[derive(Debug, Serialize, Deserialize)]
64 #[serde(rename_all="kebab-case")]
66 pub struct ZpoolListItem
{
77 /// ZFS fragnentation level
79 /// ZFS deduplication ratio