pkg/localconfig/host.go
2019-12-11 17:19:50 +01:00

40 lines
569 B
Go

package localconfig
import (
"io"
yaml "gopkg.in/yaml.v2"
)
type Host struct {
Name string
ClusterName string
Labels map[string]string
Annotations map[string]string
MACs []string
IPs []string
IPXE string
Kernel string
Initrd string
Versions map[string]string
Config string
}
func (h *Host) WriteHashDataTo(w io.Writer) error {
return yaml.NewEncoder(w).Encode(Host{
Kernel: h.Kernel,
Initrd: h.Initrd,
Versions: h.Versions,
Config: h.Config,
Labels: map[string]string{},
Annotations: map[string]string{},
})
}