From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com
Subject: [PATCH pve-storage v2 7/9] plugin: add get_identity method
Date: Fri, 24 Apr 2026 10:29:41 +0200 [thread overview]
Message-ID: <20260424082943.89614-8-l.wagner@proxmox.com> (raw)
In-Reply-To: <20260424082943.89614-1-l.wagner@proxmox.com>
This one should return a unique identifier for each distinct storage
entity.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
src/PVE/Storage/PBSPlugin.pm | 9 +++++++++
src/PVE/Storage/Plugin.pm | 17 +++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm
index 17e285a..b916fe4 100644
--- a/src/PVE/Storage/PBSPlugin.pm
+++ b/src/PVE/Storage/PBSPlugin.pm
@@ -1002,4 +1002,13 @@ sub volume_has_feature {
return undef;
}
+sub get_identity {
+ my ($class, $scfg, $storeid) = @_;
+
+ my $client = PVE::PBSClient->new($scfg, $storeid);
+ my $ret = $client->get_server_identity();
+
+ return $ret->{'pbs-instance-id'};
+}
+
1;
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index afd3141..691aad3 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -2569,4 +2569,21 @@ sub config_aware_base_mkdir {
}
}
+=pod
+
+=head3 get_identity
+
+ $plugin->get_identity($scfg, $storeid)
+
+Return a unique identifier for this storage instance. The exact format and semantics
+may vary based on the concrete plugin implementation.
+
+=cut
+
+sub get_identity {
+ my ($class, $scfg, $storeid) = @_;
+
+ die("get_identity not implemented for this plugin");
+}
+
1;
--
2.47.3
next prev parent reply other threads:[~2026-04-24 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 8:29 [PATCH common/proxmox{,-backup}/storage v2 0/9] establish unique instance-id for PBS nodes Lukas Wagner
2026-04-24 8:29 ` [PATCH proxmox v2 1/9] pbs-api-types: add ServerIdentity response type Lukas Wagner
2026-04-24 8:29 ` [PATCH proxmox v2 2/9] systemd: add support for machine-id generation Lukas Wagner
2026-04-24 8:29 ` [PATCH proxmox-backup v2 3/9] api: add /nodes/localhost/identity Lukas Wagner
2026-04-24 8:29 ` [PATCH proxmox-backup v2 4/9] client: add 'server-identity' sub-command Lukas Wagner
2026-04-24 8:29 ` [PATCH proxmox-backup v2 5/9] manager: add 'server-identity' subcommand Lukas Wagner
2026-04-24 8:29 ` [PATCH common v2 6/9] pbs-client: add support for the 'server-identity' command Lukas Wagner
2026-04-24 8:29 ` Lukas Wagner [this message]
2026-04-24 8:29 ` [PATCH pve-storage v2 8/9] bump storage plugin APIVER and reset APIAGE Lukas Wagner
2026-04-24 8:29 ` [PATCH pve-storage v2 9/9] api: add /nodes/<node>/storage/<storage>/identity route Lukas Wagner
2026-04-24 21:24 ` partially-applied: [PATCH common/proxmox{,-backup}/storage v2 0/9] establish unique instance-id for PBS nodes Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260424082943.89614-8-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.