MCPcopy Create free account
hub / github.com/danderson/netboot / String

Method String

pixiecore/logging.go:28–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26type machineState int
27
28func (m machineState) String() string {
29 switch m {
30 case machineStateProxyDHCP:
31 return "Made boot offer (ProxyDHCP)"
32 case machineStatePXE:
33 return "Made boot offer (PXE)"
34 case machineStateTFTP:
35 return "Sent iPXE binary (TFTP)"
36 case machineStateProxyDHCPIpxe:
37 return "Made iPXE boot offer (ProxyDHCP)"
38 case machineStateIpxeScript:
39 return "Sent iPXE script (HTTP)"
40 case machineStateKernel:
41 return "Sent kernel (HTTP)"
42 case machineStateInitrd:
43 return "Sent initrd(s) (HTTP)"
44 case machineStateBooted:
45 return "Booted machine"
46 default:
47 return "Unknown"
48 }
49}
50
51func (m machineState) Progress() string {
52 return fmt.Sprintf("%.0f%%", float32(m)/float32(machineStateBooted)*100)

Callers 15

validateDHCPMethod · 0.45
offerDHCPMethod · 0.45
ipxeScriptFunction · 0.45
machineEventMethod · 0.45
GetBootURLMethod · 0.45
makeURLAbsoluteMethod · 0.45
offerPXEMethod · 0.45
makeURLAbsoluteMethod · 0.45
TestIpxeFunction · 0.45
TestFileFunction · 0.45
debianRecipeFunction · 0.45
ubuntuRecipeFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestIpxeFunction · 0.36
TestFileFunction · 0.36
sprintPacketsFunction · 0.36
TestReadbackFunction · 0.36