Skip to content

Commit

Permalink
Stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Sep 9, 2024
1 parent 4809775 commit b49d4fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pixiecore/booters.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type grpcbooter struct {

// BootSpec implements Booter
func (g *grpcbooter) BootSpec(m Machine) (*Spec, error) {
g.log.Info("bootspec", "machine", m)
g.log.Info("bootspec", "machine", m.String())
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

Expand Down
2 changes: 1 addition & 1 deletion pixiecore/dhcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *Server) serveDHCP(conn *dhcp4.Conn) error {
continue
}

s.Log.Info("Offering to boot", "mac", pkt.HardwareAddr)
s.Log.Info("Offering to boot", "mac", pkt.HardwareAddr.String())
if fwtype == FirmwarePixiecoreIpxe {
s.machineEvent(pkt.HardwareAddr, machineStateProxyDHCPIpxe, "Offering to boot iPXE")
} else {
Expand Down
4 changes: 4 additions & 0 deletions pixiecore/pixiecore.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ type Machine struct {
GUID string
}

func (m Machine) String() string {
return fmt.Sprintf("mac:%s arch:%s guid:%s", m.MAC.String(), m.Arch.String(), m.GUID)
}

// A Spec describes a kernel and associated configuration.
type Spec struct {
// The kernel to boot
Expand Down

0 comments on commit b49d4fd

Please sign in to comment.