proxmox-backup/pbs-api-types
Dominik Csapak ff485aa320 fix #5622: backup client: properly handle rate/burst parameters
The rate and burst parameters are integers, so the mapping from value
with `.as_str()` will always return `None` effectively never
applying any rate limit at all.

Fix it by turning them into a HumanByte instead of an integer.

To not crowd the parameter section so much, create a
ClientRateLimitConfig struct that gets flattened into the parameter list
of the backup client.

To adapt the description of the parameters, add new schemas that copy
the `HumanByte` schema but change the description.

With this, the rate limit actually works, and there is no lower limit
any more.

The old TRAFFIC_CONTROL_RATE/BURST_SCHEMAs can be deleted since the
client was the only user of them.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-08-30 13:21:29 +02:00
..
src fix #5622: backup client: properly handle rate/burst parameters 2024-08-30 13:21:29 +02:00
tests move api-types tests to api-types and drop vec![] macro 2024-01-10 10:13:45 +01:00
Cargo.toml api-types: remove unused lazy_static dependency 2024-08-14 12:08:01 +02:00