|
|
|
@ -15,6 +15,7 @@ type Machine struct {
|
|
|
|
|
ID int |
|
|
|
|
Name string `json:"-" yaml:"-"` |
|
|
|
|
|
|
|
|
|
Inactive bool `json:"inactive,omitempty" yaml:"inactive,omitempty"` |
|
|
|
|
CephMonitor bool `json:"ceph_monitor,omitempty" yaml:"ceph_monitor,omitempty"` |
|
|
|
|
PublicAddresses []netip.Addr `json:"public,omitempty" yaml:"public,omitempty"` |
|
|
|
|
Rings []*RingInfo `json:"rings,omitempty" yaml:"rings,omitempty"` |
|
|
|
@ -43,6 +44,11 @@ func (m *Machine) FullName() string {
|
|
|
|
|
return strings.Join(name, ".") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// IsActive indicates the machine is to be included in regions' DNS entries
|
|
|
|
|
func (m *Machine) IsActive() bool { |
|
|
|
|
return !m.Inactive |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// IsGateway tells if the Machine is a ring0 gateway
|
|
|
|
|
func (m *Machine) IsGateway() bool { |
|
|
|
|
_, ok := m.getRingInfo(0) |
|
|
|
|