zones: introduce Zones.CephFSID and Zones.GetCephFSID()

the accessor doesn't generate one if needed yet

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-05 12:04:22 +00:00
parent 655dacac42
commit 9d3a9627e3
4 changed files with 25 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package zones
import (
"darvaza.org/core"
"github.com/gofrs/uuid/v5"
)
// GetCephFSID returns our Ceph's FSID
func (m *Zones) GetCephFSID() (uuid.UUID, error) {
if core.IsZero(m.CephFSID) {
// TODO: generate one
return uuid.Nil, nil
}
return m.CephFSID, nil
}