From 3f33e87e70e55463bac42bcb8f2d53e80343de06 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 25 Mar 2025 09:28:19 +0100 Subject: [PATCH] rbd: improve the description for GetID() and GetName() interfaces The `GetID()` and `GetName()` functions can be confusing, as names and ID's are not always distinctive enough. The name is used to reference an object that exists in a pool. The ID the CSI-handle formatted and can be used to locate the entry for the object in the journal. Signed-off-by: Niels de Vos --- internal/rbd/types/group.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/rbd/types/group.go b/internal/rbd/types/group.go index dbf22c746..a85b5e15b 100644 --- a/internal/rbd/types/group.go +++ b/internal/rbd/types/group.go @@ -26,10 +26,15 @@ import ( ) type journalledObject interface { - // GetID returns the ID in the backend storage for the object. + // GetID returns the CSI-handle formatted ID of the object. The handle + // can be parsed to locate an entry in the journal, which points to the + // object in the backend storage (see `GetClusterID`, `GetPool`, and + // `GetName`). GetID(ctx context.Context) (string, error) - // GetName returns the name of the object in the backend storage. + // GetName returns the name in the backend storage for the object. The + // name is used for accessing the object though the Ceph APIs. + // RBD-images and RBD-groups exist in the backend with the given name. GetName(ctx context.Context) (string, error) // GetPool returns the name of the pool that holds the object.