Documentation ¶
Overview ¶
Package amt provides Intel AMT interaction methods.
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CliCommand(cmd string, hosts []string, options Optionset)
- func LoadCaCertFile(filename string) []byte
- func MustAsset(name string) []byte
- func ProbeHostPorts(host string, ports []int) (openPort int)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func SequentialCommand(cmd string, hosts []string, opt Optionset, delay float64)
- type Laststate
- type Laststates
- type Optionset
- type Optionsets
Constants ¶
const ( CmdBootcfgPxe = "BOOTCFGPXE" // https://github.com/golang/lint/issues/274 CmdBootcfgHdd = "BOOTCFGHDD" CmdInfo = "INFO" CmdUp = "UP" CmdDown = "DOWN" CmdReset = "RESET" CmdReboot = "REBOOT" CmdShutdown = "SHUTDOWN" CmdPingEnable = "PINGENABLE" CmdPingDisable = "PINGDISABLE" CmdWebEnable = "WEBENABLE" CmdWebDisable = "WEBDISABLE" CmdSolEnable = "SOLENABLE" CmdSolDisable = "SOLDISABLE" )
Variables ¶
var ShortCommandMap = map[string]string{ "X": CmdBootcfgPxe, "H": CmdBootcfgHdd, "U": CmdUp, "D": CmdDown, "R": CmdReset, "B": CmdReboot, "S": CmdShutdown, }
ShortCommandMap as used by jobs / scheduled jobs via GUI / in DB
var Verbose bool
Verbose bool controls verbosity
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func CliCommand ¶
CliCommand executes a single AMT command on a list of hosts.
func LoadCaCertFile ¶
LoadCaCertFile loads a certificate from file and returns it as []byte
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func ProbeHostPorts ¶
ProbeHostPorts probes for given host ports. If none are open, 0 is returned.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Laststate ¶
type Laststate struct { ID int `json:"id"` HostID int `json:"host_id"` Hostname string `json:"hostname"` StateBegin int `json:"state_begin"` OpenPort int `json:"open_port"` StateAMT int `json:"state_amt"` StateHTTP int `json:"state_http"` Usermessage string `json:"usermessage"` // amtgo only }
Laststate represents state reported by AMT, plus open TCP port
type Laststates ¶
type Laststates struct {
Laststates []Laststate `json:"laststates"`
}
Laststates is array of Laststate -- for ember
type Optionset ¶
type Optionset struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` SwV5 int `json:"sw_v5" db:"sw_v5"` SwDash int `json:"sw_dash" db:"sw_dash"` SwScan22 int `json:"sw_scan22" db:"sw_scan22"` SwScan3389 int `json:"sw_scan3389" db:"sw_scan3389"` SwUseTLS int `json:"sw_usetls" db:"sw_usetls"` SwSkipcertchk int `json:"sw_skipcertchk" db:"sw_skipcertchk"` OptTimeout int `json:"opt_timeout" db:"opt_timeout"` OptPassfile string `json:"opt_passfile" db:"opt_passfile"` OptCacertfile string `json:"opt_cacertfile" db:"opt_cacertfile"` Username string `json:"username"` // amtgo only Password string `json:"-"` // amtgo only CliDelay int `json:"-" db:"-"` CliUseTLS bool `json:"-" db:"-"` // amtgo cli (bool) vs db (int) hack CliSkipcertchk bool `json:"-" db:"-"` // amtgo cli (bool) vs db (int) hack CaCertData []byte `json:"-" db:"-"` // loaded contents of OptCacertfile }
Optionset for AMT queries (TLS yes/no, CertCheck, timeout...)
type Optionsets ¶
type Optionsets struct {
Optionsets []Optionset `json:"optionsets"`
}
Optionsets is ember array of Optionset
Directories ¶
Path | Synopsis |
---|---|
Package digestAuthClient implements HTTP digest auth for AMT.
|
Package digestAuthClient implements HTTP digest auth for AMT. |