Files
jpictl/pkg/zones/ceph.go
T
amery 0fb8c1d44b zones: introduce Zones.CephFSID and Zones.GetCephFSID()
the accessor doesn't generate one if needed yet

Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 12:24:55 +00:00

16 lines
271 B
Go

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
}