|
|
|
@ -94,6 +94,9 @@ func (m *Env) writeEnvZone(w io.Writer, z *Zone) {
|
|
|
|
|
gateways, _ := z.GatewayIDs() |
|
|
|
|
m.writeEnvVarInts(w, gateways, "ZONE%v_%s", zoneID, "GW") |
|
|
|
|
|
|
|
|
|
// ZONE{zoneID}_REGION
|
|
|
|
|
m.writeEnvVar(w, genEnvZoneRegion(z), "ZONE%v_%s", zoneID, "REGION") |
|
|
|
|
|
|
|
|
|
// Ceph
|
|
|
|
|
monitors := z.GetCephMonitors() |
|
|
|
|
// MON{zoneID}_NAME
|
|
|
|
@ -166,6 +169,21 @@ func genEnvZoneNodes(z *Zone) string {
|
|
|
|
|
return "" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func genEnvZoneRegion(z *Zone) string { |
|
|
|
|
var region string |
|
|
|
|
|
|
|
|
|
z.ForEachRegion(func(r *Region) bool { |
|
|
|
|
if r.Cluster != nil { |
|
|
|
|
region = r.Name |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return region |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func genEnvZoneCephMonNames(m Machines) string { |
|
|
|
|
var buf strings.Builder |
|
|
|
|
m.ForEachMachine(func(p *Machine) bool { |
|
|
|
|