Documentation ¶
Index ¶
- func Init(l log.Logger)
- func IsSpecialOS(i *packet.Instance) bool
- func MakeHardwareWithInstance() (*packet.Discovery, []packet.MACAddr, string)
- func RegisterDefaultInstaller(bootScript BootScript)
- func RegisterDistro(name string, builder BootScript)
- func RegisterSlug(name string, builder BootScript)
- func ServePublicKey(w http.ResponseWriter, req *http.Request)
- func SetClient(c *packet.Client)
- type BootScript
- type Component
- type ComponentsResponse
- type Job
- func (j Job) AddHardware(w http.ResponseWriter, req *http.Request)
- func (j Job) Arch() string
- func (j Job) BondingMode() packet.BondingMode
- func (j Job) CryptedPassword() string
- func (j Job) CustomPXEDone()
- func (j Job) DisablePXE()
- func (j Job) Error(err error, args ...interface{})
- func (j Job) FacilityCode() string
- func (j Job) Fatal(err error, args ...interface{})
- func (j Job) HardwareID() string
- func (j Job) HardwareState() string
- func (j Job) ID() string
- func (j Job) IPXEScriptURL() string
- func (j Job) InstanceID() string
- func (j Job) InstanceIPs() []packet.IP
- func (j Job) InterfaceMAC(i int) net.HardwareAddr
- func (j Job) InterfaceName(i int) string
- func (j Job) Interfaces() []packet.Port
- func (j Job) IsARM() bool
- func (j Job) IsUEFI() bool
- func (j Job) Manufacturer() string
- func (j Job) MarkDeviceActive()
- func (j Job) OperatingSystem() *packet.OperatingSystem
- func (j Job) PArch() string
- func (j Job) PlanSlug() string
- func (j Job) PlanVersionSlug() string
- func (j Job) PostHardwareProblem(slug string) bool
- func (j Job) PrimaryNIC() net.HardwareAddr
- func (j Job) PrivateSubnets() []string
- func (j Job) ServeDHCP(w dhcp4.ReplyWriter, req *dhcp4.Packet)
- func (j Job) ServeFile(w http.ResponseWriter, req *http.Request)
- func (j Job) ServePhoneHomeEndpoint(w http.ResponseWriter, req *http.Request)
- func (j Job) ServeProblemEndpoint(w http.ResponseWriter, req *http.Request)
- func (j Job) ServeTFTP(filename, client string) (tftpgo.ReadCloser, error)
- func (j Job) ServicesVersion() packet.ServicesVersion
- func (j Job) UserData() string
- type Mock
- func (m Mock) DropInstance()
- func (m Mock) Job() Job
- func (m *Mock) SetIP(ip net.IP)
- func (m *Mock) SetIPXEScriptURL(url string)
- func (m *Mock) SetMAC(mac string)
- func (m *Mock) SetManufacturer(slug string)
- func (m *Mock) SetOSDistro(distro string)
- func (m *Mock) SetOSSlug(slug string)
- func (m *Mock) SetOSVersion(version string)
- func (m *Mock) SetPassword(password string)
- func (m *Mock) SetState(state string)
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSpecialOS ¶
func RegisterDefaultInstaller ¶
func RegisterDefaultInstaller(bootScript BootScript)
func RegisterDistro ¶
func RegisterDistro(name string, builder BootScript)
func RegisterSlug ¶
func RegisterSlug(name string, builder BootScript)
func ServePublicKey ¶
func ServePublicKey(w http.ResponseWriter, req *http.Request)
Types ¶
type BootScript ¶
type Component ¶
type Component struct { Type string `json:"type"` Name string `json:"name"` Vendor string `json:"vendor"` Model string `json:"model"` Serial string `json:"serial"` FirmwareVersion string `json:"firmware_version"` Data interface{} `json:"data"` }
Component models a single hardware component
type ComponentsResponse ¶
type ComponentsResponse struct {
Components []Component `json:"components"`
}
type Job ¶
Job this comment is useless
func CreateFromDHCP ¶
CreateFromDHCP looks up hardware using the MAC from cacher to create a job
func CreateFromIP ¶
CreateFromIP looksup hardware using the IP from cacher to create a job
func CreateFromRemoteAddr ¶
CreateFromRemoteAddr looks up hardware using the IP from cacher to create a job
func (Job) AddHardware ¶
func (j Job) AddHardware(w http.ResponseWriter, req *http.Request)
AddHardware - Add hardware component(s)
func (Job) BondingMode ¶
func (j Job) BondingMode() packet.BondingMode
func (Job) CryptedPassword ¶
func (Job) CustomPXEDone ¶
func (j Job) CustomPXEDone()
func (Job) DisablePXE ¶
func (j Job) DisablePXE()
func (Job) FacilityCode ¶
func (Job) HardwareID ¶
func (Job) HardwareState ¶
HardwareState will return (enrolled burn_in preinstallable preinstalling failed_preinstall provisionable provisioning deprovisioning in_use)
func (Job) IPXEScriptURL ¶
IPXEScriptURL returns the value of instance.IPXEScriptURL
func (Job) InstanceID ¶
func (Job) InstanceIPs ¶
func (Job) InterfaceMAC ¶
func (j Job) InterfaceMAC(i int) net.HardwareAddr
func (Job) InterfaceName ¶
func (Job) Interfaces ¶
func (Job) Manufacturer ¶
func (Job) MarkDeviceActive ¶
func (j Job) MarkDeviceActive()
func (Job) OperatingSystem ¶
func (j Job) OperatingSystem() *packet.OperatingSystem
func (Job) PlanVersionSlug ¶
func (Job) PostHardwareProblem ¶
func (Job) PrimaryNIC ¶
func (j Job) PrimaryNIC() net.HardwareAddr
PrimaryNIC returns the mac address of the NIC we expect to be dhcp/pxe'ing
func (Job) PrivateSubnets ¶
func (Job) ServeDHCP ¶
func (j Job) ServeDHCP(w dhcp4.ReplyWriter, req *dhcp4.Packet)
ServeDHCP responds to DHCP packets
func (Job) ServePhoneHomeEndpoint ¶
func (j Job) ServePhoneHomeEndpoint(w http.ResponseWriter, req *http.Request)
func (Job) ServeProblemEndpoint ¶
func (j Job) ServeProblemEndpoint(w http.ResponseWriter, req *http.Request)
func (Job) ServicesVersion ¶
func (j Job) ServicesVersion() packet.ServicesVersion
type Mock ¶
type Mock Job
func NewMockFromDiscovery ¶
func NewMockFromDiscovery(d *packet.Discovery, mac net.HardwareAddr) Mock
func (Mock) DropInstance ¶
func (m Mock) DropInstance()
func (*Mock) SetIPXEScriptURL ¶
func (*Mock) SetManufacturer ¶
func (*Mock) SetOSDistro ¶
func (*Mock) SetOSVersion ¶
func (*Mock) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.