Documentation ¶
Index ¶
- type CapturedPacket
- type CapturedPackets
- func (c *CapturedPackets) CheckField(sequence int, startOffSet int, field []byte) error
- func (c *CapturedPackets) CheckSize(sequence int, size int) error
- func (c *CapturedPackets) HasField(t *testing.T, name string, sequence int, startOffSet int, field []byte) bool
- func (c *CapturedPackets) ValidateField(t *testing.T, name string, sequence int, startOffSet int, field []byte)
- func (c *CapturedPackets) ValidateSize(t *testing.T, sequence int, size int)
- type OtgApi
- func (o *OtgApi) Api() gosnappi.Api
- func (o *OtgApi) CleanupConfig()
- func (o *OtgApi) ConfigToJson(config gosnappi.Config) string
- func (o *OtgApi) ConfigToPbText(config gosnappi.Config) string
- func (o *OtgApi) ConfigToYaml(config gosnappi.Config) string
- func (o *OtgApi) GetBgpPrefixes() []gosnappi.BgpPrefixesState
- func (o *OtgApi) GetBgpv4Metrics() []gosnappi.Bgpv4Metric
- func (o *OtgApi) GetCapture(portName string) *CapturedPackets
- func (o *OtgApi) GetConfig() gosnappi.Config
- func (o *OtgApi) GetFlowMetrics() []gosnappi.FlowMetric
- func (o *OtgApi) GetIpv4Neighbors() []gosnappi.Neighborsv4State
- func (o *OtgApi) GetIsIsMetrics() []gosnappi.IsisMetric
- func (o *OtgApi) GetIsisLsps() []gosnappi.IsisLspsState
- func (o *OtgApi) GetLacpMetrics() []gosnappi.LacpMetric
- func (o *OtgApi) GetLagMetrics() []gosnappi.LagMetric
- func (o *OtgApi) GetLldpMetrics() []gosnappi.LldpMetric
- func (o *OtgApi) GetLldpNeighbors() []gosnappi.LldpNeighborsState
- func (o *OtgApi) Ipv4AddrToBytes(ip string) []byte
- func (o *OtgApi) Ipv6AddrToBytes(ip string) []byte
- func (o *OtgApi) Layer1SpeedToMpbs(speed string) int
- func (o *OtgApi) LogPlot(name string)
- func (o *OtgApi) LogWrnErr(wrn gosnappi.Warning, err error, exitOnErr bool)
- func (o *OtgApi) MacAddrToBytes(mac string) []byte
- func (o *OtgApi) NewConfigFromJson(jsonStr string) gosnappi.Config
- func (o *OtgApi) NewConfigFromPbText(pbStr string) gosnappi.Config
- func (o *OtgApi) NewConfigFromYaml(yamlStr string) gosnappi.Config
- func (o *OtgApi) Plot() *plot.Plot
- func (o *OtgApi) SetConfig(config gosnappi.Config)
- func (o *OtgApi) StartCapture()
- func (o *OtgApi) StartProtocols()
- func (o *OtgApi) StartTransmit()
- func (o *OtgApi) StopCapture()
- func (o *OtgApi) StopProtocols()
- func (o *OtgApi) StopTransmit()
- func (o *OtgApi) TestConfig() *testconfig.TestConfig
- func (o *OtgApi) Testing() *testing.T
- func (o *OtgApi) Timer(start time.Time, fnName string)
- func (o *OtgApi) Uint64ToBytes(num uint64, size int) []byte
- func (o *OtgApi) WaitFor(fn func() bool, opts *WaitForOpts)
- type ThroughputMetric
- type ThroughputMetrics
- type WaitForOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturedPacket ¶
type CapturedPackets ¶
type CapturedPackets struct {
Packets []CapturedPacket
}
func (*CapturedPackets) CheckField ¶
func (c *CapturedPackets) CheckField(sequence int, startOffSet int, field []byte) error
func (*CapturedPackets) CheckSize ¶
func (c *CapturedPackets) CheckSize(sequence int, size int) error
func (*CapturedPackets) ValidateField ¶
func (*CapturedPackets) ValidateSize ¶
func (c *CapturedPackets) ValidateSize(t *testing.T, sequence int, size int)
type OtgApi ¶
type OtgApi struct {
// contains filtered or unexported fields
}
func (*OtgApi) CleanupConfig ¶
func (o *OtgApi) CleanupConfig()
func (*OtgApi) GetBgpPrefixes ¶
func (o *OtgApi) GetBgpPrefixes() []gosnappi.BgpPrefixesState
func (*OtgApi) GetBgpv4Metrics ¶
func (o *OtgApi) GetBgpv4Metrics() []gosnappi.Bgpv4Metric
func (*OtgApi) GetCapture ¶
func (o *OtgApi) GetCapture(portName string) *CapturedPackets
func (*OtgApi) GetFlowMetrics ¶
func (o *OtgApi) GetFlowMetrics() []gosnappi.FlowMetric
func (*OtgApi) GetIpv4Neighbors ¶
func (o *OtgApi) GetIpv4Neighbors() []gosnappi.Neighborsv4State
func (*OtgApi) GetIsIsMetrics ¶
func (o *OtgApi) GetIsIsMetrics() []gosnappi.IsisMetric
func (*OtgApi) GetIsisLsps ¶
func (o *OtgApi) GetIsisLsps() []gosnappi.IsisLspsState
func (*OtgApi) GetLacpMetrics ¶
func (o *OtgApi) GetLacpMetrics() []gosnappi.LacpMetric
func (*OtgApi) GetLagMetrics ¶
func (*OtgApi) GetLldpMetrics ¶
func (o *OtgApi) GetLldpMetrics() []gosnappi.LldpMetric
func (*OtgApi) GetLldpNeighbors ¶
func (o *OtgApi) GetLldpNeighbors() []gosnappi.LldpNeighborsState
func (*OtgApi) Ipv4AddrToBytes ¶
func (*OtgApi) Ipv6AddrToBytes ¶
func (*OtgApi) Layer1SpeedToMpbs ¶
func (*OtgApi) MacAddrToBytes ¶
func (*OtgApi) NewConfigFromJson ¶
func (*OtgApi) NewConfigFromPbText ¶
func (*OtgApi) NewConfigFromYaml ¶
func (*OtgApi) StartCapture ¶
func (o *OtgApi) StartCapture()
func (*OtgApi) StartProtocols ¶
func (o *OtgApi) StartProtocols()
func (*OtgApi) StartTransmit ¶
func (o *OtgApi) StartTransmit()
func (*OtgApi) StopCapture ¶
func (o *OtgApi) StopCapture()
func (*OtgApi) StopProtocols ¶
func (o *OtgApi) StopProtocols()
func (*OtgApi) StopTransmit ¶
func (o *OtgApi) StopTransmit()
func (*OtgApi) TestConfig ¶
func (o *OtgApi) TestConfig() *testconfig.TestConfig
func (*OtgApi) WaitFor ¶
func (o *OtgApi) WaitFor(fn func() bool, opts *WaitForOpts)
type ThroughputMetric ¶
type ThroughputMetric struct { ConfiguredLineSpeedMbps int ConfiguredLineRate float32 ConfiguredPps int ConfiguredFrames uint64 ConfiguredSize int ConfiguredDuration time.Duration TxFrames uint64 MinTxPps int MaxTxPps int AvgTxPps int TxThroughput float32 TransmitDuration time.Duration Ok bool // contains filtered or unexported fields }
func NewThroughputMetric ¶
func NewThroughputMetric(lineSpeedMbps int, lineRate float32, frames uint64, size int) *ThroughputMetric
func (*ThroughputMetric) AddPpsSnapshot ¶
func (m *ThroughputMetric) AddPpsSnapshot(txFrames uint64, txPps int)
func (*ThroughputMetric) StartCollecting ¶
func (m *ThroughputMetric) StartCollecting()
func (*ThroughputMetric) StopCollecting ¶
func (m *ThroughputMetric) StopCollecting()
type ThroughputMetrics ¶
type ThroughputMetrics struct {
Metrics []ThroughputMetric
}
func (*ThroughputMetrics) ToTable ¶
func (m *ThroughputMetrics) ToTable() (string, error)
Click to show internal directories.
Click to hide internal directories.