all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager v5 00/10] subscription key pool registry
@ 2026-05-23 22:56 Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-05-23 22:56 UTC (permalink / raw)
  To: pdm-devel

v5 of the Subscription Registry. Addresses the review feedback Dominik
raised on v4; this round is mostly polishing and most of in UI one.

For the v3 -> v4 changelog and the design discussion see the v4 cover:
  https://lore.proxmox.com/pdm-devel/20260522085128.2678090-1-t.lamprecht@proxmox.com

Notable v4 -> v5 (see per-patch notes for details):

* Loading feedback: Auto-Assign opens a "computing" dialog at once and
  the registry panel masks while refreshing, so a slow remote no longer
  looks like a no-op (Dominik).
* add-keys dedups duplicate input keys (server and UI) and reports the
  dropped count instead of erroring (Dominik).
* apply-pending continues past a failed entry instead of aborting the
  whole run, and reports the failures (Dominik).
* Node Status panel gets a real toolbar: per-node actions on the left,
  bulk / queue actions on the right; Apply/Discard Pending and
  Auto-Assign move off the old standalone top toolbar, each panel gets
  its own refresh (Dominik).
* Auto-Assign and Adopt All preview grids made non-interactive
  (Dominik).
* Revert is no longer offered for an already-applied binding even when
  Expired/Invalid - freeing it is Clear Key.
* Smaller nits: #[builder] macro, direct CSS imports, an AssignTarget
  struct, column widths, dialog padding.

Lukas's Tested-by from v4 is dropped on the patches that changed
materially since (0005, 0006, 0008, 0009, 0010); 0001-0003 and 0007 keep
their v4 trailers.

Each commit cleanly formats (cargo fmt --check), builds, and passes
cargo test --workspace on its own.

For the record, no blockers for the MVP, the open follow-ups still not
in this series:
* Multi-select on the Auto-Assign proposal (all ticked) so the operator
  can deselect a few nodes before applying, e.g. 100 nodes but skip 3.
* Cross-Integration with the relatively new Auto-Installer feature, as
  the installer now also supports accepting a subscription since PVE 9.2
  ISO.
* Shop-side full reissue, so PDM can drive the actual key rotation
  rather than just freeing the pool binding via Clear Key.
* Shop-bundle import path; the on-disk shadow-file plumbing already
  accommodates the signed SubscriptionInfo blob.
And some left out that might be fine, but I'm not so sure about:
* Per-row Auto-Assign overrides for pinning a specific key to a node.
* Atomic clear-and-assign as one queued change (today swapping a key on
  a node is Clear / Apply / Assign / Apply; the canonical case is an
  Expired live subscription that the operator wants to replace).
* Status column filter on the node-status tree.

Thomas Lamprecht (10):
  api types: subscription level: render full names
  pdm-client: add wait_for_local_task helper
  subscription: pool: add data model and config layer
  subscription: api: add key pool and node status endpoints
  ui: registry: add view with key pool and node status
  cli: client: add subscription key pool management subcommands
  docs: add subscription registry chapter
  subscription: add Clear Key action and per-node revert
  subscription: add Adopt Key action for foreign live subscriptions
  subscription: add Check Subscription action

 Cargo.toml                                    |    4 +-
 cli/client/src/subscriptions.rs               |  406 ++-
 docs/index.rst                                |    1 +
 docs/subscription-registry.rst                |   84 +
 lib/pdm-api-types/Cargo.toml                  |    1 +
 lib/pdm-api-types/src/subscription.rs         |  504 +++-
 lib/pdm-api-types/tests/test_import.rs        |  367 +++
 lib/pdm-client/Cargo.toml                     |    3 +
 lib/pdm-client/src/lib.rs                     |  332 ++-
 lib/pdm-config/src/lib.rs                     |    1 +
 lib/pdm-config/src/setup.rs                   |    7 +
 lib/pdm-config/src/subscriptions.rs           |  118 +
 server/src/api/mod.rs                         |    2 +
 server/src/api/resources.rs                   |   34 +-
 server/src/api/subscriptions/mod.rs           | 2378 +++++++++++++++++
 server/src/context.rs                         |    7 +
 server/src/pbs_client.rs                      |   31 +
 ui/src/configuration/mod.rs                   |    3 +
 ui/src/configuration/subscription_assign.rs   |  328 +++
 ui/src/configuration/subscription_keys.rs     |  588 ++++
 ui/src/configuration/subscription_registry.rs | 1485 ++++++++++
 ui/src/dashboard/subscriptions_list.rs        |   18 +-
 ui/src/main_menu.rs                           |   10 +
 ui/src/widget/pve_node_selector.rs            |   91 +-
 ui/src/widget/remote_selector.rs              |   28 +-
 25 files changed, 6764 insertions(+), 67 deletions(-)
 create mode 100644 docs/subscription-registry.rst
 create mode 100644 lib/pdm-api-types/tests/test_import.rs
 create mode 100644 lib/pdm-config/src/subscriptions.rs
 create mode 100644 server/src/api/subscriptions/mod.rs
 create mode 100644 ui/src/configuration/subscription_assign.rs
 create mode 100644 ui/src/configuration/subscription_keys.rs
 create mode 100644 ui/src/configuration/subscription_registry.rs

-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH datacenter-manager v5 00/10] subscription key pool registry
@ 2026-05-23 22:57 Thomas Lamprecht
  2026-05-23 22:57 ` [PATCH datacenter-manager v5 01/10] api types: subscription level: render full names Thomas Lamprecht
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2026-05-23 22:57 UTC (permalink / raw)
  To: pdm-devel

v5 of the Subscription Registry. Addresses the review feedback Dominik
raised on v4; this round is mostly polishing and most of in UI one.

For the v3 -> v4 changelog and the design discussion see the v4 cover:
  https://lore.proxmox.com/pdm-devel/20260522085128.2678090-1-t.lamprecht@proxmox.com

Notable v4 -> v5 (see per-patch notes for details):

* Loading feedback: Auto-Assign opens a "computing" dialog at once and
  the registry panel masks while refreshing, so a slow remote no longer
  looks like a no-op (Dominik).
* add-keys dedups duplicate input keys (server and UI) and reports the
  dropped count instead of erroring (Dominik).
* apply-pending continues past a failed entry instead of aborting the
  whole run, and reports the failures (Dominik).
* Node Status panel gets a real toolbar: per-node actions on the left,
  bulk / queue actions on the right; Apply/Discard Pending and
  Auto-Assign move off the old standalone top toolbar, each panel gets
  its own refresh (Dominik).
* Auto-Assign and Adopt All preview grids made non-interactive
  (Dominik).
* Revert is no longer offered for an already-applied binding even when
  Expired/Invalid - freeing it is Clear Key.
* Smaller nits: #[builder] macro, direct CSS imports, an AssignTarget
  struct, column widths, dialog padding.

Lukas's Tested-by from v4 is dropped on the patches that changed
materially since (0005, 0006, 0008, 0009, 0010); 0001-0003 and 0007 keep
their v4 trailers.

Each commit cleanly formats (cargo fmt --check), builds, and passes
cargo test --workspace on its own.

For the record, no blockers for the MVP, the open follow-ups still not
in this series:
* Multi-select on the Auto-Assign proposal (all ticked) so the operator
  can deselect a few nodes before applying, e.g. 100 nodes but skip 3.
* Cross-Integration with the relatively new Auto-Installer feature, as
  the installer now also supports accepting a subscription since PVE 9.2
  ISO.
* Shop-side full reissue, so PDM can drive the actual key rotation
  rather than just freeing the pool binding via Clear Key.
* Shop-bundle import path; the on-disk shadow-file plumbing already
  accommodates the signed SubscriptionInfo blob.
And some left out that might be fine, but I'm not so sure about:
* Per-row Auto-Assign overrides for pinning a specific key to a node.
* Atomic clear-and-assign as one queued change (today swapping a key on
  a node is Clear / Apply / Assign / Apply; the canonical case is an
  Expired live subscription that the operator wants to replace).
* Status column filter on the node-status tree.

Thomas Lamprecht (10):
  api types: subscription level: render full names
  pdm-client: add wait_for_local_task helper
  subscription: pool: add data model and config layer
  subscription: api: add key pool and node status endpoints
  ui: registry: add view with key pool and node status
  cli: client: add subscription key pool management subcommands
  docs: add subscription registry chapter
  subscription: add Clear Key action and per-node revert
  subscription: add Adopt Key action for foreign live subscriptions
  subscription: add Check Subscription action

 Cargo.toml                                    |    4 +-
 cli/client/src/subscriptions.rs               |  406 ++-
 docs/index.rst                                |    1 +
 docs/subscription-registry.rst                |   84 +
 lib/pdm-api-types/Cargo.toml                  |    1 +
 lib/pdm-api-types/src/subscription.rs         |  504 +++-
 lib/pdm-api-types/tests/test_import.rs        |  367 +++
 lib/pdm-client/Cargo.toml                     |    3 +
 lib/pdm-client/src/lib.rs                     |  332 ++-
 lib/pdm-config/src/lib.rs                     |    1 +
 lib/pdm-config/src/setup.rs                   |    7 +
 lib/pdm-config/src/subscriptions.rs           |  118 +
 server/src/api/mod.rs                         |    2 +
 server/src/api/resources.rs                   |   34 +-
 server/src/api/subscriptions/mod.rs           | 2378 +++++++++++++++++
 server/src/context.rs                         |    7 +
 server/src/pbs_client.rs                      |   31 +
 ui/src/configuration/mod.rs                   |    3 +
 ui/src/configuration/subscription_assign.rs   |  328 +++
 ui/src/configuration/subscription_keys.rs     |  588 ++++
 ui/src/configuration/subscription_registry.rs | 1485 ++++++++++
 ui/src/dashboard/subscriptions_list.rs        |   18 +-
 ui/src/main_menu.rs                           |   10 +
 ui/src/widget/pve_node_selector.rs            |   91 +-
 ui/src/widget/remote_selector.rs              |   28 +-
 25 files changed, 6764 insertions(+), 67 deletions(-)
 create mode 100644 docs/subscription-registry.rst
 create mode 100644 lib/pdm-api-types/tests/test_import.rs
 create mode 100644 lib/pdm-config/src/subscriptions.rs
 create mode 100644 server/src/api/subscriptions/mod.rs
 create mode 100644 ui/src/configuration/subscription_assign.rs
 create mode 100644 ui/src/configuration/subscription_keys.rs
 create mode 100644 ui/src/configuration/subscription_registry.rs

-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH datacenter-manager v5 01/10] api types: subscription level: render full names
  2026-05-23 22:57 [PATCH datacenter-manager v5 00/10] subscription key pool registry Thomas Lamprecht
@ 2026-05-23 22:57 ` Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-05-23 22:57 UTC (permalink / raw)
  To: pdm-devel

The Display impl produced single-letter codes ("c", "b", "s", "p"),
forcing the dashboard to keep a private letter-to-name helper just
to render labels.

Switching Display to the full names is safe: FromStr is extended to
accept the names alongside the legacy single-letter codes, so any
previously serialised value still parses, and the only in-tree
Display caller, the dashboard helper, is dropped alongside the
change. The level strings reported by the PVE/PBS API land in
unrelated String fields and are not touched.

Add Debug to the derives, required for assert_eq! over the level in
the upcoming key-pool tests.

Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---

No code changes since v2.

 lib/pdm-api-types/src/subscription.rs  | 24 ++++++++++++------------
 ui/src/dashboard/subscriptions_list.rs | 18 ++----------------
 2 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/lib/pdm-api-types/src/subscription.rs b/lib/pdm-api-types/src/subscription.rs
index ca23b8e5..f0eb525b 100644
--- a/lib/pdm-api-types/src/subscription.rs
+++ b/lib/pdm-api-types/src/subscription.rs
@@ -8,7 +8,7 @@ use proxmox_subscription::{SubscriptionInfo, SubscriptionStatus};
 
 #[api]
 // order is important here, since we use that for determining if a node has a valid subscription
-#[derive(Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
 /// Describes the level of subscription
 pub enum SubscriptionLevel {
     #[default]
@@ -50,11 +50,11 @@ impl FromStr for SubscriptionLevel {
 
     fn from_str(s: &str) -> Result<Self, Self::Err> {
         Ok(match s {
-            "p" => SubscriptionLevel::Premium,
-            "s" => SubscriptionLevel::Standard,
-            "b" => SubscriptionLevel::Basic,
-            "c" => SubscriptionLevel::Community,
-            "" => SubscriptionLevel::None,
+            "p" | "premium" | "Premium" => SubscriptionLevel::Premium,
+            "s" | "standard" | "Standard" => SubscriptionLevel::Standard,
+            "b" | "basic" | "Basic" => SubscriptionLevel::Basic,
+            "c" | "community" | "Community" => SubscriptionLevel::Community,
+            "" | "none" | "None" => SubscriptionLevel::None,
             _ => SubscriptionLevel::Unknown,
         })
     }
@@ -63,12 +63,12 @@ impl FromStr for SubscriptionLevel {
 impl std::fmt::Display for SubscriptionLevel {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         f.write_str(match self {
-            SubscriptionLevel::None => "",
-            SubscriptionLevel::Unknown => "unknown",
-            SubscriptionLevel::Community => "c",
-            SubscriptionLevel::Basic => "b",
-            SubscriptionLevel::Standard => "s",
-            SubscriptionLevel::Premium => "p",
+            SubscriptionLevel::None => "None",
+            SubscriptionLevel::Unknown => "Unknown",
+            SubscriptionLevel::Community => "Community",
+            SubscriptionLevel::Basic => "Basic",
+            SubscriptionLevel::Standard => "Standard",
+            SubscriptionLevel::Premium => "Premium",
         })
     }
 }
diff --git a/ui/src/dashboard/subscriptions_list.rs b/ui/src/dashboard/subscriptions_list.rs
index b0a96eb6..fdb9e9e1 100644
--- a/ui/src/dashboard/subscriptions_list.rs
+++ b/ui/src/dashboard/subscriptions_list.rs
@@ -204,17 +204,6 @@ fn columns(
             .with_child(Container::from_tag("span").with_child(text))
     }
 
-    fn render_subscription_level(level: SubscriptionLevel) -> &'static str {
-        match level {
-            SubscriptionLevel::None => "None",
-            SubscriptionLevel::Basic => "Basic",
-            SubscriptionLevel::Community => "Community",
-            SubscriptionLevel::Premium => "Premium",
-            SubscriptionLevel::Standard => "Standard",
-            SubscriptionLevel::Unknown => "Unknown",
-        }
-    }
-
     let subscription_column = DataTableColumn::new(tr!("Subscription"))
         .render(|entry: &SubscriptionTreeEntry| match entry {
             SubscriptionTreeEntry::Node(node) => {
@@ -222,16 +211,13 @@ fn columns(
                     let (sub_state, text) = match node.level {
                         SubscriptionLevel::None => (RemoteSubscriptionState::None, None),
                         SubscriptionLevel::Unknown => (RemoteSubscriptionState::Unknown, None),
-                        other => (
-                            RemoteSubscriptionState::Active,
-                            Some(render_subscription_level(other)),
-                        ),
+                        other => (RemoteSubscriptionState::Active, Some(other.to_string())),
                     };
                     render_subscription_state(&sub_state)
                         .with_optional_child(text)
                         .into()
                 } else {
-                    render_subscription_level(node.level).into()
+                    node.level.to_string().into()
                 }
             }
             SubscriptionTreeEntry::Remote(remote) => {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH datacenter-manager v5 00/10] subscription key pool registry
@ 2026-05-23 22:58 Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-05-23 22:58 UTC (permalink / raw)
  To: pdm-devel

v5 of the Subscription Registry. Addresses the review feedback Dominik
raised on v4; this round is mostly polishing and most of in UI one.

For the v3 -> v4 changelog and the design discussion see the v4 cover:
  https://lore.proxmox.com/pdm-devel/20260522085128.2678090-1-t.lamprecht@proxmox.com

Notable v4 -> v5 (see per-patch notes for details):

* Loading feedback: Auto-Assign opens a "computing" dialog at once and
  the registry panel masks while refreshing, so a slow remote no longer
  looks like a no-op (Dominik).
* add-keys dedups duplicate input keys (server and UI) and reports the
  dropped count instead of erroring (Dominik).
* apply-pending continues past a failed entry instead of aborting the
  whole run, and reports the failures (Dominik).
* Node Status panel gets a real toolbar: per-node actions on the left,
  bulk / queue actions on the right; Apply/Discard Pending and
  Auto-Assign move off the old standalone top toolbar, each panel gets
  its own refresh (Dominik).
* Auto-Assign and Adopt All preview grids made non-interactive
  (Dominik).
* Revert is no longer offered for an already-applied binding even when
  Expired/Invalid - freeing it is Clear Key.
* Smaller nits: #[builder] macro, direct CSS imports, an AssignTarget
  struct, column widths, dialog padding.

Lukas's Tested-by from v4 is dropped on the patches that changed
materially since (0005, 0006, 0008, 0009, 0010); 0001-0003 and 0007 keep
their v4 trailers.

Each commit cleanly formats (cargo fmt --check), builds, and passes
cargo test --workspace on its own.

For the record, no blockers for the MVP, the open follow-ups still not
in this series:
* Multi-select on the Auto-Assign proposal (all ticked) so the operator
  can deselect a few nodes before applying, e.g. 100 nodes but skip 3.
* Cross-Integration with the relatively new Auto-Installer feature, as
  the installer now also supports accepting a subscription since PVE 9.2
  ISO.
* Shop-side full reissue, so PDM can drive the actual key rotation
  rather than just freeing the pool binding via Clear Key.
* Shop-bundle import path; the on-disk shadow-file plumbing already
  accommodates the signed SubscriptionInfo blob.
And some left out that might be fine, but I'm not so sure about:
* Per-row Auto-Assign overrides for pinning a specific key to a node.
* Atomic clear-and-assign as one queued change (today swapping a key on
  a node is Clear / Apply / Assign / Apply; the canonical case is an
  Expired live subscription that the operator wants to replace).
* Status column filter on the node-status tree.

Thomas Lamprecht (10):
  api types: subscription level: render full names
  pdm-client: add wait_for_local_task helper
  subscription: pool: add data model and config layer
  subscription: api: add key pool and node status endpoints
  ui: registry: add view with key pool and node status
  cli: client: add subscription key pool management subcommands
  docs: add subscription registry chapter
  subscription: add Clear Key action and per-node revert
  subscription: add Adopt Key action for foreign live subscriptions
  subscription: add Check Subscription action

 Cargo.toml                                    |    4 +-
 cli/client/src/subscriptions.rs               |  406 ++-
 docs/index.rst                                |    1 +
 docs/subscription-registry.rst                |   84 +
 lib/pdm-api-types/Cargo.toml                  |    1 +
 lib/pdm-api-types/src/subscription.rs         |  504 +++-
 lib/pdm-api-types/tests/test_import.rs        |  367 +++
 lib/pdm-client/Cargo.toml                     |    3 +
 lib/pdm-client/src/lib.rs                     |  332 ++-
 lib/pdm-config/src/lib.rs                     |    1 +
 lib/pdm-config/src/setup.rs                   |    7 +
 lib/pdm-config/src/subscriptions.rs           |  118 +
 server/src/api/mod.rs                         |    2 +
 server/src/api/resources.rs                   |   34 +-
 server/src/api/subscriptions/mod.rs           | 2378 +++++++++++++++++
 server/src/context.rs                         |    7 +
 server/src/pbs_client.rs                      |   31 +
 ui/src/configuration/mod.rs                   |    3 +
 ui/src/configuration/subscription_assign.rs   |  328 +++
 ui/src/configuration/subscription_keys.rs     |  588 ++++
 ui/src/configuration/subscription_registry.rs | 1485 ++++++++++
 ui/src/dashboard/subscriptions_list.rs        |   18 +-
 ui/src/main_menu.rs                           |   10 +
 ui/src/widget/pve_node_selector.rs            |   91 +-
 ui/src/widget/remote_selector.rs              |   28 +-
 25 files changed, 6764 insertions(+), 67 deletions(-)
 create mode 100644 docs/subscription-registry.rst
 create mode 100644 lib/pdm-api-types/tests/test_import.rs
 create mode 100644 lib/pdm-config/src/subscriptions.rs
 create mode 100644 server/src/api/subscriptions/mod.rs
 create mode 100644 ui/src/configuration/subscription_assign.rs
 create mode 100644 ui/src/configuration/subscription_keys.rs
 create mode 100644 ui/src/configuration/subscription_registry.rs

-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-23 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-23 22:57 [PATCH datacenter-manager v5 00/10] subscription key pool registry Thomas Lamprecht
2026-05-23 22:57 ` [PATCH datacenter-manager v5 01/10] api types: subscription level: render full names Thomas Lamprecht
  -- strict thread matches above, loose matches on Subject: below --
2026-05-23 22:58 [PATCH datacenter-manager v5 00/10] subscription key pool registry Thomas Lamprecht
2026-05-23 22:56 Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal