cluster: make domain, basedir and cluster name public fields
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
+10
-7
@@ -28,16 +28,19 @@ func (m *Machine) String() string {
|
||||
|
||||
// FullName returns the Name of the machine including domain name
|
||||
func (m *Machine) FullName() string {
|
||||
if domain := m.zone.zones.domain; domain != "" {
|
||||
var s = []string{
|
||||
m.Name,
|
||||
domain,
|
||||
}
|
||||
var name []string
|
||||
|
||||
return strings.Join(s, ".")
|
||||
for _, s := range []string{
|
||||
m.Name,
|
||||
m.zone.zones.Name,
|
||||
m.zone.zones.Domain,
|
||||
} {
|
||||
if s != "" {
|
||||
name = append(name, s)
|
||||
}
|
||||
}
|
||||
|
||||
return m.Name
|
||||
return strings.Join(name, ".")
|
||||
}
|
||||
|
||||
// IsGateway tells if the Machine is a ring0 gateway
|
||||
|
||||
Reference in New Issue
Block a user