pkg/localconfig/host.go

41 lines
602 B
Go
Raw Normal View History

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