[pbs-devel] [RFC proxmox{, -datacenter-manager} 0/6] Add fallback variants to PBS API types

Stefan Hanreich s.hanreich at proxmox.com
Thu Nov 20 15:50:08 CET 2025


## Introduction

This patch series adds fallback variants to all enums that are an ApiType and
public in pbs-api-types. The main motivation is to provide forward compatibility
for PDM in case any of the enums gets extended in the future. The main
difference between the PBS and PVE api type implementation is, that those
fallback variants are guarded behind a feature flag, so PBS can use the strict
types internally, but PDM can use the lenient types.

A lot of the same reasoning and problems from the respective pve-api-types patch
series [1] apply, so I'm linking it here for reference.

## Maintainer's Notes
* pve-api-types depends on the new proxmox-fixed-string
* pbs-api-types depends on the new proxmox-fixed-string
* proxmox-datacenter-manager requires pbs-api-types with new feature flag

[1] https://lore.proxmox.com/pdm-devel/88845236-a159-4c98-be8a-def920e49a8b@proxmox.com/T/#mce9e11c9644df097fdcfeffa0e2c6e2ccfb8fb4d

proxmox:

Stefan Hanreich (5):
  proxmox-upgrade-checks: fix meta package version check
  proxmox-fixed-string: extract FixedString into own crate
  proxmox-fixed-string: implement hash trait
  pve-api-types: add proxmox-fixed-string
  pbs-api-types: add fallback variants to enums in public API

 Cargo.toml                                    |  2 ++
 pbs-api-types/Cargo.toml                      |  4 +++
 pbs-api-types/debian/control                  |  8 ++++-
 pbs-api-types/src/crypto.rs                   |  6 ++++
 pbs-api-types/src/datastore.rs                | 36 +++++++++++++++++++
 pbs-api-types/src/file_restore.rs             |  6 ++++
 pbs-api-types/src/jobs.rs                     | 13 +++++++
 pbs-api-types/src/key_derivation.rs           |  6 ++++
 pbs-api-types/src/ldap.rs                     |  9 +++++
 pbs-api-types/src/lib.rs                      | 12 +++++++
 pbs-api-types/src/maintenance.rs              |  6 ++++
 pbs-api-types/src/metrics.rs                  | 10 ++++++
 pbs-api-types/src/node.rs                     |  5 +++
 pbs-api-types/src/tape/changer.rs             |  6 ++++
 pbs-api-types/src/tape/device.rs              |  6 ++++
 pbs-api-types/src/tape/drive.rs               |  9 +++++
 pbs-api-types/src/tape/media_status.rs        |  6 ++++
 pbs-api-types/src/zfs.rs                      |  8 +++++
 proxmox-fixed-string/Cargo.toml               | 14 ++++++++
 proxmox-fixed-string/debian/changelog         |  5 +++
 proxmox-fixed-string/debian/control           | 34 ++++++++++++++++++
 proxmox-fixed-string/debian/copyright         | 18 ++++++++++
 proxmox-fixed-string/debian/debcargo.toml     |  7 ++++
 .../src/lib.rs                                |  7 ++++
 proxmox-upgrade-checks/src/lib.rs             |  8 ++++-
 pve-api-types/Cargo.toml                      |  1 +
 pve-api-types/debian/control                  |  2 ++
 pve-api-types/src/types/mod.rs                |  3 +-
 28 files changed, 253 insertions(+), 4 deletions(-)
 create mode 100644 proxmox-fixed-string/Cargo.toml
 create mode 100644 proxmox-fixed-string/debian/changelog
 create mode 100644 proxmox-fixed-string/debian/control
 create mode 100644 proxmox-fixed-string/debian/copyright
 create mode 100644 proxmox-fixed-string/debian/debcargo.toml
 rename pve-api-types/src/types/fixed_string.rs => proxmox-fixed-string/src/lib.rs (98%)


proxmox-datacenter-manager:

Stefan Hanreich (1):
  tree-wide: add enum fallback variants for pbs api types

 Cargo.toml                               | 2 +-
 server/src/metric_collection/rrd_task.rs | 4 ++++
 ui/Cargo.toml                            | 2 +-
 ui/src/pbs/snapshot_list.rs              | 7 +++++++
 4 files changed, 13 insertions(+), 2 deletions(-)


Summary over all repositories:
  32 files changed, 266 insertions(+), 6 deletions(-)

-- 
Generated by git-murpp 0.8.0



More information about the pbs-devel mailing list