From 7dd3ea8f96d367c57dc8b175e8a6809831bd9adb Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 26 Aug 2023 01:00:31 +0000 Subject: [PATCH] zones: Machine.Zone() Signed-off-by: Alejandro Mery --- pkg/zones/machine.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/zones/machine.go b/pkg/zones/machine.go index 4f0c736..0a49ad3 100644 --- a/pkg/zones/machine.go +++ b/pkg/zones/machine.go @@ -43,6 +43,11 @@ func (m *Machine) IsGateway() bool { return ok } +// Zone indicates the [Zone] this machine belongs to +func (m *Machine) Zone() int { + return m.zone.ID +} + func (m *Machine) getPeerByName(name string) (*Machine, bool) { return m.zone.zones.GetMachineByName(name) }