Files
pkg/localconfig/host.go

41 lines
602 B
Go
Raw Normal View History

2018-12-10 18:28:24 +11:00
package localconfig
import (
"io"
yaml "gopkg.in/yaml.v2"
)
type Host struct {
Name string
2019-12-11 13:08:16 +01:00
2019-12-11 17:19:50 +01:00
ClusterName string
Labels map[string]string
Annotations map[string]string
2019-12-11 13:08:16 +01:00
2018-12-10 18:28:24 +11:00
MACs []string
IPs []string
2018-12-10 21:52:14 +11:00
IPXE string
2018-12-10 18:28:24 +11:00
2018-12-10 21:52:14 +11:00
Kernel string
Initrd string
Versions map[string]string
2022-03-28 11:21:27 +02:00
BootstrapConfig string
Config string
2018-12-10 18:28:24 +11:00
}
func (h *Host) WriteHashDataTo(w io.Writer) error {
return yaml.NewEncoder(w).Encode(Host{
2018-12-10 21:52:14 +11:00
Kernel: h.Kernel,
Initrd: h.Initrd,
Versions: h.Versions,
Config: h.Config,
Labels: map[string]string{},
Annotations: map[string]string{},
2018-12-10 18:28:24 +11:00
})
}