|
|
|
@ -125,6 +125,19 @@ func (z *Zone) SetGateway(gatewayID int, enabled bool) error {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GatewayIDs returns the list of IDs of machines that act as ring0 gateways
|
|
|
|
|
func (z *Zone) GatewayIDs() ([]int, int) { |
|
|
|
|
var out []int |
|
|
|
|
z.ForEachMachine(func(p *Machine) bool { |
|
|
|
|
if p.IsGateway() { |
|
|
|
|
out = append(out, p.ID) |
|
|
|
|
} |
|
|
|
|
return false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return out, len(out) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Zones represents all zones in a cluster
|
|
|
|
|
type Zones struct { |
|
|
|
|
dir fs.FS |
|
|
|
|