Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-04 19:47:14 +00:00
parent 9e8a19d00d
commit 9e85891dea
+16
View File
@@ -2,6 +2,8 @@ package zones
import (
"io/fs"
"log"
"os"
"sort"
)
@@ -12,6 +14,7 @@ func (m *Zones) scan(opts *ScanOptions) error {
m.scanZoneIDs,
m.scanSort,
m.scanGateways,
m.scanCephMonitors,
} {
if err := fn(opts); err != nil {
return err
@@ -121,6 +124,19 @@ func (m *Zones) scanGateways(_ *ScanOptions) error {
return err
}
func (m *Zones) scanCephMonitors(_ *ScanOptions) error {
cfg, err := m.GetCephConfig()
switch {
case os.IsNotExist(err):
err = nil
case err != nil:
return err
}
log.Print(cfg)
return nil
}
func (z *Zone) scan() error {
// each directory is a machine
entries, err := fs.ReadDir(z.zones.dir, z.Name)