get_clusters: name the backup server behind a pbs storage (ClusterStorageDict.backup_server) #55

Closed
opened 2026-11-02 22:11:48 +00:00 by christianmanivong · 0 comments
Owner

Priority: P2 (important and urgent): NetOrk/netork#1918 links a backup server's groups to the cluster's guests through this, and nothing else tells netOrk which server a pbs storage writes to.

Step 6 of #52 was planned there and not done before #52 was closed with #53: get_clusters() lists a pbs storage like any other, without the backup_server reference napalm-device-types 4.25.0 added to ClusterStorageDict.

What

For each storage of type pbs in /storage, fill backup_server:

ClusterStorageDict.backup_server from /storage/{id}
server server
port port, None when not set (PVE then uses 8007)
datastore datastore
namespace namespace, None when not set
fingerprint fingerprint, None when not set

Every other storage type leaves the key out. The storage's password and encryption key are never read into it.

Test-First

  • A recorded /storage with a pbs entry (sanitised) → backup_server with all five fields.
  • A pbs storage without port/namespace/fingerprint → those None.
  • A dir/nfs/zfspool storage → no backup_server key.
  • /storage unreadable → the existing behaviour for storages (unchanged).

Then a minor release, and the netOrk pin bump in NetOrk/netork#1919's link stage.

Priority: P2 (important and urgent): NetOrk/netork#1918 links a backup server's groups to the cluster's guests through this, and nothing else tells netOrk which server a `pbs` storage writes to. Step 6 of #52 was planned there and not done before #52 was closed with #53: `get_clusters()` lists a `pbs` storage like any other, without the `backup_server` reference napalm-device-types 4.25.0 added to `ClusterStorageDict`. ## What For each storage of type `pbs` in `/storage`, fill `backup_server`: | `ClusterStorageDict.backup_server` | from `/storage/{id}` | |---|---| | `server` | `server` | | `port` | `port`, `None` when not set (PVE then uses 8007) | | `datastore` | `datastore` | | `namespace` | `namespace`, `None` when not set | | `fingerprint` | `fingerprint`, `None` when not set | Every other storage type leaves the key out. The storage's password and encryption key are never read into it. ## Test-First - [ ] A recorded `/storage` with a `pbs` entry (sanitised) → `backup_server` with all five fields. - [ ] A `pbs` storage without port/namespace/fingerprint → those `None`. - [ ] A `dir`/`nfs`/`zfspool` storage → no `backup_server` key. - [ ] `/storage` unreadable → the existing behaviour for storages (unchanged). Then a minor release, and the netOrk pin bump in NetOrk/netork#1919's link stage.
christianmanivong added the
prio
P2
enhancement
labels 2026-11-02 22:11:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#55