Documentation
¶
Overview ¶
Package otg provides an API to Open Traffic Generator.
Index ¶
- type OTG
- func (o *OTG) AdvertiseRoutes(t testing.TB, routes []string)
- func (o *OTG) DisableLACPMembers(t testing.TB, ports ...string)
- func (o *OTG) EnableLACPMembers(t testing.TB, ports ...string)
- func (o *OTG) FetchCapture(t testing.TB, portName string) []byte
- func (o *OTG) FetchConfig(t testing.TB) gosnappi.Config
- func (o *OTG) GNMIOpts() *gnmi.Opts
- func (o *OTG) NewConfig(t testing.TB) gosnappi.Config
- func (o *OTG) PushConfig(t testing.TB, cfg gosnappi.Config)
- func (o *OTG) SetControlAction(t testing.TB, action gosnappi.ControlAction)
- func (o *OTG) SetControlState(t testing.TB, state gosnappi.ControlState)
- func (o *OTG) StartCapture(t testing.TB, portNames ...string)
- func (o *OTG) StartProtocols(t testing.TB)
- func (o *OTG) StartTraffic(t testing.TB)
- func (o *OTG) StopCapture(t testing.TB, portNames ...string)
- func (o *OTG) StopProtocols(t testing.TB)
- func (o *OTG) StopTraffic(t testing.TB)
- func (o *OTG) String() string
- func (o *OTG) WithdrawRoutes(t testing.TB, routes []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTG ¶
type OTG struct {
// contains filtered or unexported fields
}
OTG provides the Open Traffic Generator API to an ATE. Tests should not construct this directly; call ate.OTG() instead.
func New ¶
New constructs a new OTG instance. Tests should not call this directly; call ate.OTG() instead.
func (*OTG) AdvertiseRoutes ¶
AdvertiseRoutes advertises routes on the ATE.
func (*OTG) DisableLACPMembers ¶
DisableLACPMembers disables lacp member ports on the ATE.
func (*OTG) EnableLACPMembers ¶
EnableLACPMembers enables lacp member ports on the ATE.
func (*OTG) FetchCapture ¶
FetchCapture fetches the captured bytes on the specified port.
func (*OTG) FetchConfig ¶
FetchConfig fetches config from the ATE.
func (*OTG) PushConfig ¶
PushConfig pushes config to the ATE.
func (*OTG) SetControlAction ¶ added in v0.1.11
func (o *OTG) SetControlAction(t testing.TB, action gosnappi.ControlAction)
SetControlAction triggers actions against configured resources.
func (*OTG) SetControlState ¶ added in v0.1.11
func (o *OTG) SetControlState(t testing.TB, state gosnappi.ControlState)
SetControlState sets the operational state of configured resources.
func (*OTG) StartCapture ¶
StartCapture starts capturing bytes on the specified ports.
func (*OTG) StartProtocols ¶
StartProtocols starts protocols on the ATE.
func (*OTG) StartTraffic ¶
StartTraffic starts traffic on the ATE.
func (*OTG) StopCapture ¶
StopCapture starts capturing bytes on the specified ports.
func (*OTG) StopProtocols ¶
StopProtocols stops protocols on the ATE.
func (*OTG) StopTraffic ¶
StopTraffic stops traffic on the ATE.