From de875c0f0e358b3bd46b4d0e3c0aa75af7c9e887 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 15 Jan 2025 13:03:42 +0100 Subject: [PATCH] update to proxmox-schema 4 Signed-off-by: Wolfgang Bumiller --- Cargo.toml | 2 +- debian/control | 18 +++++++++--------- pbs-api-types/src/traffic_control.rs | 18 ++++++++---------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9354fb17..adeeb6ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ proxmox-router = { version = "3.0.0", default-features = false } proxmox-rrd = "0.4" proxmox-rrd-api-types = "1.0.2" # everything but pbs-config and pbs-client use "api-macro" -proxmox-schema = "3" +proxmox-schema = "4" proxmox-section-config = "2" proxmox-serde = "0.1.1" proxmox-shared-cache = "0.1" diff --git a/debian/control b/debian/control index a4117a90..cc9eeda9 100644 --- a/debian/control +++ b/debian/control @@ -74,8 +74,8 @@ Build-Depends: bash-completion, librust-proxmox-ldap-0.2+default-dev (>= 0.2.1-~~), librust-proxmox-log-0.2+default-dev (>= 0.2.6-~~), librust-proxmox-metrics-0.3+default-dev (>= 0.3.1-~~), - librust-proxmox-notify-0.5+default-dev (>= 0.5.1~), - librust-proxmox-notify-0.5+pbs-context-dev (>= 0.5.1~), + librust-proxmox-notify-0.5+default-dev (>= 0.5.1-~~), + librust-proxmox-notify-0.5+pbs-context-dev (>= 0.5.1-~~), librust-proxmox-openid-0.10+default-dev, librust-proxmox-rest-server-0.8+default-dev (>= 0.8.5-~~), librust-proxmox-rest-server-0.8+rate-limited-stream-dev (>= 0.8.5-~~), @@ -84,8 +84,8 @@ Build-Depends: bash-completion, librust-proxmox-router-3+server-dev, librust-proxmox-rrd-0.4+default-dev, librust-proxmox-rrd-api-types-1+default-dev (>= 1.0.2-~~), - librust-proxmox-schema-3+api-macro-dev, - librust-proxmox-schema-3+default-dev, + librust-proxmox-schema-4+api-macro-dev, + librust-proxmox-schema-4+default-dev, librust-proxmox-section-config-2+default-dev, librust-proxmox-serde-0.1+default-dev (>= 0.1.1-~~), librust-proxmox-serde-0.1+serde-json-dev (>= 0.1.1-~~), @@ -94,11 +94,11 @@ Build-Depends: bash-completion, librust-proxmox-sortable-macro-0.1+default-dev (>= 0.1.2-~~), librust-proxmox-subscription-0.5+api-types-dev, librust-proxmox-subscription-0.5+default-dev, - librust-proxmox-sys-0.6+acl-dev, - librust-proxmox-sys-0.6+crypt-dev, - librust-proxmox-sys-0.6+default-dev (>= 0.6.5~~), - librust-proxmox-sys-0.6+logrotate-dev, - librust-proxmox-sys-0.6+timer-dev, + librust-proxmox-sys-0.6+acl-dev (>= 0.6.5-~~), + librust-proxmox-sys-0.6+crypt-dev (>= 0.6.5-~~), + librust-proxmox-sys-0.6+default-dev (>= 0.6.5-~~), + librust-proxmox-sys-0.6+logrotate-dev (>= 0.6.5-~~), + librust-proxmox-sys-0.6+timer-dev (>= 0.6.5-~~), librust-proxmox-systemd-0.1+default-dev, librust-proxmox-tfa-5+api-dev, librust-proxmox-tfa-5+api-types-dev, diff --git a/pbs-api-types/src/traffic_control.rs b/pbs-api-types/src/traffic_control.rs index 0da327f2..c68f4637 100644 --- a/pbs-api-types/src/traffic_control.rs +++ b/pbs-api-types/src/traffic_control.rs @@ -68,17 +68,15 @@ impl RateLimitConfig { } } -const CLIENT_RATE_LIMIT_SCHEMA: Schema = StringSchema { - description: "Rate limit (for Token bucket filter) in bytes/s with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).", - ..*HumanByte::API_SCHEMA.unwrap_string_schema() -} -.schema(); +const CLIENT_RATE_LIMIT_SCHEMA: Schema = HumanByte::API_SCHEMA + .unwrap_string_schema_cloned() + .description("Rate limit (for Token bucket filter) in bytes/s with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).") + .schema(); -const CLIENT_BURST_SCHEMA: Schema = StringSchema { - description: "Size of the token bucket (for Token bucket filter) in bytes with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).", - ..*HumanByte::API_SCHEMA.unwrap_string_schema() -} -.schema(); +const CLIENT_BURST_SCHEMA: Schema = HumanByte::API_SCHEMA + .unwrap_string_schema_cloned() + .description("Size of the token bucket (for Token bucket filter) in bytes with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).") + .schema(); #[api( properties: {