cluster: sort regions, for jpictl dump' sake

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-10-29 19:19:40 +00:00
parent 5bbe15ef24
commit 884b11d1f9
2 changed files with 26 additions and 12 deletions
+2
View File
@@ -56,6 +56,7 @@ func (m *Cluster) initRegions(_ *ScanOptions) error {
// first regions defined by zones
m.ForEachZone(func(z *Zone) bool {
SortRegions(z.Regions)
for _, region := range z.Regions {
regions[region] = append(regions[region], z)
}
@@ -74,6 +75,7 @@ func (m *Cluster) initRegions(_ *ScanOptions) error {
m.finishRegion(r)
}
m.sortRegions()
return nil
}