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

Struct Spec

pixiecore/pixiecore.go:74–96  ·  view source on GitHub ↗

A Spec describes a kernel and associated configuration.

Source from the content-addressed store, hash-verified

72
73// A Spec describes a kernel and associated configuration.
74type Spec struct {
75 // The kernel to boot
76 Kernel ID
77 // Optional init ramdisks for linux kernels
78 Initrd []ID
79 // Optional kernel commandline. This string is evaluated as a
80 // text/template template, in which "ID(x)" function is
81 // available. Invoking ID(x) returns a URL that will call
82 // Booter.ReadBootFile(x) when fetched.
83 Cmdline string
84 // Message to print on the client machine before booting.
85 Message string
86
87 // A raw iPXE script to run. Overrides all of the above.
88 //
89 // THIS IS NOT A STABLE INTERFACE. This will only work for
90 // machines that get booted via iPXE. Currently, that is all of
91 // them, but there is no guarantee that this will remain
92 // true. When passing a custom iPXE script, it is your
93 // responsibility to make the boot succeed, Pixiecore's
94 // involvement ends when it serves your script.
95 IpxeScript string
96}
97
98func expandCmdline(tpl string, funcs template.FuncMap) (string, error) {
99 tmpl, err := template.New("cmdline").Option("missingkey=error").Funcs(funcs).Parse(tpl)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected