[pdm-devel] [PATCH proxmox-datacenter-manager 1/1] api-types: resource: fix storage identifier
Stefan Hanreich
s.hanreich at proxmox.com
Tue Dec 2 15:38:06 CET 2025
Storages in PVE are uniquely identified by their name and the node
they reside on. The current method only includes the name of the
storage, not the node. Since the ID method is used in the UI for
generating the deep URLs to the respective PVE resources, the
generated URLs are wrong.
The generated global ID is correct, because the map_pve_storage
function uses the id field returned by the PVE API directly, which
includes the node name already.
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
lib/pdm-api-types/src/resource.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
index af3a211e..93f8bd2a 100644
--- a/lib/pdm-api-types/src/resource.rs
+++ b/lib/pdm-api-types/src/resource.rs
@@ -36,7 +36,7 @@ impl Resource {
/// `qemu/<vmid>`
pub fn id(&self) -> String {
match self {
- Resource::PveStorage(r) => format!("storage/{}", r.storage),
+ Resource::PveStorage(r) => format!("storage/{}/{}", r.node, r.storage),
Resource::PveQemu(r) => format!("qemu/{}", r.vmid),
Resource::PveLxc(r) => format!("lxc/{}", r.vmid),
Resource::PveNode(r) => format!("node/{}", r.node),
--
2.47.3
More information about the pdm-devel
mailing list