Documentation
¶
Overview ¶
Package hostname provides a hostname discovery test utilizing the `hostname` Unix command.
Index ¶
- Constants
- type Hostname
- func (h *Hostname) Args() []string
- func (h *Hostname) GetHostname() string
- func (h *Hostname) GetIdentifier() identifier.Identifier
- func (h *Hostname) ReelEOF()
- func (h *Hostname) ReelFirst() *reel.Step
- func (h *Hostname) ReelMatch(_, _, match string) *reel.Step
- func (h *Hostname) ReelTimeout() *reel.Step
- func (h *Hostname) Result() int
- func (h *Hostname) Timeout() time.Duration
Constants ¶
const ( // Command is the command name for the unix "hostname" command. Command = dependencies.HostnameBinaryName // SuccessfulOutputRegex is the regular expression match for hostname output. SuccessfulOutputRegex = `.+` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hostname ¶
type Hostname struct {
// contains filtered or unexported fields
}
Hostname provides a hostname test implemented using command line tool "hostname".
func NewHostname ¶
NewHostname creates a new `Hostname` test which runs the "hostname" command.
func (*Hostname) GetHostname ¶
GetHostname returns the extracted hostname, if one is extracted.
func (*Hostname) GetIdentifier ¶
func (h *Hostname) GetIdentifier() identifier.Identifier
GetIdentifier returns the tnf.Test specific identifier.
func (*Hostname) ReelEOF ¶
func (h *Hostname) ReelEOF()
ReelEOF does nothing; hostname requires no explicit intervention for EOF.
func (*Hostname) ReelFirst ¶
ReelFirst returns a step which expects an hostname summary for the given device.
func (*Hostname) ReelMatch ¶
ReelMatch parses the hostname output and set the test result on match. Returns no step; the test is complete.
func (*Hostname) ReelTimeout ¶
ReelTimeout does nothing; hostname requires no explicit intervention for a timeout.