Documentation ¶
Index ¶
- type FactoryResetOp
- type InstallOp
- func (i *InstallOp) Operate(t testing.TB)
- func (i *InstallOp) String() string
- func (i *InstallOp) WithPackageFile(path string) *InstallOp
- func (i *InstallOp) WithPackageReader(reader io.Reader) *InstallOp
- func (i *InstallOp) WithStandbySupervisor(standby bool) *InstallOp
- func (i *InstallOp) WithVersion(version string) *InstallOp
- type KillProcessOp
- func (r *KillProcessOp) Operate(t testing.TB)
- func (r *KillProcessOp) String() string
- func (r *KillProcessOp) WithName(name string) *KillProcessOp
- func (r *KillProcessOp) WithPID(pid uint32) *KillProcessOp
- func (r *KillProcessOp) WithRestart(restart bool) *KillProcessOp
- func (r *KillProcessOp) WithSIGHUP() *KillProcessOp
- func (r *KillProcessOp) WithSIGKILL() *KillProcessOp
- func (r *KillProcessOp) WithSIGTERM() *KillProcessOp
- type Operations
- func (o *Operations) NewFactoryReset() *FactoryResetOp
- func (o *Operations) NewInstall() *InstallOp
- func (o *Operations) NewKillProcess() *KillProcessOp
- func (o *Operations) NewPing() *PingOp
- func (o *Operations) NewReboot() *RebootOp
- func (o *Operations) NewSwitchControlProcessor() *SwitchControlProcessorOp
- func (o *Operations) Time(t testing.TB) time.Time
- type PingOp
- type RebootOp
- type SwitchControlProcessorOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryResetOp ¶
type FactoryResetOp struct {
// contains filtered or unexported fields
}
FactoryResetOp is a factory reset operation.
func (*FactoryResetOp) Operate ¶
func (s *FactoryResetOp) Operate(t testing.TB)
Operate performs the FactoryReset operation.
func (*FactoryResetOp) String ¶
func (s *FactoryResetOp) String() string
String representation of the method.
func (*FactoryResetOp) WithFactoryOS ¶
func (s *FactoryResetOp) WithFactoryOS(factoryOS bool) *FactoryResetOp
WithFactoryOS instructs the device to rollback to its original OS version.
func (*FactoryResetOp) WithZeroFill ¶
func (s *FactoryResetOp) WithZeroFill(zeroFill bool) *FactoryResetOp
WithZeroFill instructs the device to zero fill persistent storage state data.
type InstallOp ¶
type InstallOp struct {
// contains filtered or unexported fields
}
InstallOp is an OS install operation.
func (*InstallOp) WithPackageFile ¶
WithPackageFile specifies the content of the OS package to be installed, in the form of path to an image file. It may be omitted if the device already has the package.
func (*InstallOp) WithPackageReader ¶
WithPackageReader specifies the content of the OS package to be installed, in the form of a reader of its bytes. It may be omitted if the device already has the package. The specified function must return io.EOF when all the content has been read.
func (*InstallOp) WithStandbySupervisor ¶
WithStandbySupervisor specifies whether the installation applies to the Standby Supervisor instead of the Active Supervisor.
func (*InstallOp) WithVersion ¶
WithVersion specifies the version of the install operation.
type KillProcessOp ¶
type KillProcessOp struct {
// contains filtered or unexported fields
}
KillProcessOp is an operation that kills a process on a device.
func (*KillProcessOp) Operate ¶
func (r *KillProcessOp) Operate(t testing.TB)
Operate performs the kill process operation.
func (*KillProcessOp) String ¶
func (r *KillProcessOp) String() string
func (*KillProcessOp) WithName ¶
func (r *KillProcessOp) WithName(name string) *KillProcessOp
WithName sets the name of the process to be killed.
func (*KillProcessOp) WithPID ¶
func (r *KillProcessOp) WithPID(pid uint32) *KillProcessOp
WithPID sets the PID to be killed.
func (*KillProcessOp) WithRestart ¶
func (r *KillProcessOp) WithRestart(restart bool) *KillProcessOp
WithRestart sets whether the process should restart after being killed.
func (*KillProcessOp) WithSIGHUP ¶
func (r *KillProcessOp) WithSIGHUP() *KillProcessOp
WithSIGHUP sets the kill signal to SIGHUP.
func (*KillProcessOp) WithSIGKILL ¶
func (r *KillProcessOp) WithSIGKILL() *KillProcessOp
WithSIGKILL sets the kill signal to SIGKILL.
func (*KillProcessOp) WithSIGTERM ¶
func (r *KillProcessOp) WithSIGTERM() *KillProcessOp
WithSIGTERM sets the kill signal to SIGTERM.
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
Operations is the device operations API.
func New ¶
func New(dut binding.DUT) *Operations
New constructs a new instance of the operations API. Tests must not call this directly
func (*Operations) NewFactoryReset ¶
func (o *Operations) NewFactoryReset() *FactoryResetOp
NewFactoryReset creates a new Factory Reset Operation. By default the FactoryReset is performed without zero_fill and factory_os.
func (*Operations) NewInstall ¶
func (o *Operations) NewInstall() *InstallOp
NewInstall creates a new install operation.
func (*Operations) NewKillProcess ¶
func (o *Operations) NewKillProcess() *KillProcessOp
NewKillProcess creates a new kill process operation. By default the process is killed with a SIGTERM signal.
func (*Operations) NewPing ¶
func (o *Operations) NewPing() *PingOp
NewPing creates a new ping operation.
func (*Operations) NewReboot ¶
func (o *Operations) NewReboot() *RebootOp
NewReboot creates a new reboot operation.
func (*Operations) NewSwitchControlProcessor ¶
func (o *Operations) NewSwitchControlProcessor() *SwitchControlProcessorOp
NewSwitchControlProcessor creates a new switch control processor operation.
type PingOp ¶
type PingOp struct {
// contains filtered or unexported fields
}
PingOp is a ping operation.
func (*PingOp) WithDestination ¶
WithDestination specifies the destination address of the Ping operation.
func (*PingOp) WithPacketSize ¶
WithPacketSize specifies the size of each packet (in bytes) used by a Ping operation.
type RebootOp ¶
type RebootOp struct {
// contains filtered or unexported fields
}
RebootOp is a reboot operation.
type SwitchControlProcessorOp ¶
type SwitchControlProcessorOp struct {
// contains filtered or unexported fields
}
SwitchControlProcessorOp is an operation that switches from the current route procesor to a provided destination route processor.
func (*SwitchControlProcessorOp) Operate ¶
func (s *SwitchControlProcessorOp) Operate(t testing.TB)
Operate performs the SwitchControlProcessor operation.
func (*SwitchControlProcessorOp) String ¶
func (s *SwitchControlProcessorOp) String() string
func (*SwitchControlProcessorOp) WithDestination ¶
func (s *SwitchControlProcessorOp) WithDestination(dest string) *SwitchControlProcessorOp
WithDestination sets the destination route processor.