cluster: rename Zones to Cluster

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-10 19:16:36 +00:00
parent c38dd19a92
commit b4975ae5c5
12 changed files with 123 additions and 115 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import (
)
// GetCephFSID returns our Ceph's FSID
func (m *Zones) GetCephFSID() (uuid.UUID, error) {
func (m *Cluster) GetCephFSID() (uuid.UUID, error) {
if core.IsZero(m.CephFSID) {
// generate one
v, err := uuid.NewV4()
@@ -25,7 +25,7 @@ func (m *Zones) GetCephFSID() (uuid.UUID, error) {
}
// GetCephConfig reads the ceph.conf file
func (m *Zones) GetCephConfig() (*ceph.Config, error) {
func (m *Cluster) GetCephConfig() (*ceph.Config, error) {
data, err := m.ReadFile("ceph.conf")
if err != nil {
return nil, err
@@ -36,7 +36,7 @@ func (m *Zones) GetCephConfig() (*ceph.Config, error) {
}
// WriteCephConfig writes the ceph.conf file
func (m *Zones) WriteCephConfig(cfg *ceph.Config) error {
func (m *Cluster) WriteCephConfig(cfg *ceph.Config) error {
f, err := m.CreateTruncFile("ceph.conf")
if err != nil {
return err
@@ -48,7 +48,7 @@ func (m *Zones) WriteCephConfig(cfg *ceph.Config) error {
}
// GenCephConfig prepares a ceph.Config using the cluster information
func (m *Zones) GenCephConfig() (*ceph.Config, error) {
func (m *Cluster) GenCephConfig() (*ceph.Config, error) {
fsid, err := m.GetCephFSID()
if err != nil {
return nil, err