ondatra

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 28 Imported by: 12

README

Actions Status Go Report Card GoDoc

Ondatra: Open Network Device Automated Test Runner and API

Ondatra is a framework for writing and running tests against both real and containerized network devices.

For an introduction to Ondatra, take the Ondatra Tour.

Building Ondatra

To build and execute Ondatra's unit tests, run the following:

go generate ./...
go build ./...
go test $(go list ./... | grep -v /integration)

Providing a Binding

The Ondatra binding is the API layer through which Ondatra connects to and controls the devices in your test environment. For an Ondatra test to run in your environment, you must provide an implementation of the Binding interface. For testing on KNE, Ondatra comes bundled with a binding implementation for accessing KNE on your local machine. For testing on your physical devices, read how to author your own Binding implementation.

Testbed File

To run an Ondatra test, the user must specify the testbed of resources that the Ondatra test runner should reserve in advance. The testbed is specified in an external text file in protobuf text format. The protobuf Testbed message is defined in proto/testbed.proto, and an example testbed can be found in knebind/integration/testbed.textproto. As the proto definition and example show, testbed consists of the DUTs (devices under test), ATEs (automated test equipment), the links between them, as well as properties of the DUTs, ATEs, and links. It is the job of the Reserve method in the binding implementation to locate available resources that match the abstract topology and criteria specified in the testbed file.

Writing an Ondatra Test

Ondatra provides a set of fluent interfaces for configuring and interacting with network devices. See the full API reference documentation.

The Ondatra gNMI API plays a particularly central role in Ondatra tests. It provide a set of test helpers for querying telemetry and setting the state of the device via gNMI. Read more about the Ondatra gNMI API.

Running an Ondatra Test

An Ondatra test is a Go test, and so is run with go test, albeit with some additional flags to control the execution of the test:

  • -testbed (required): Path to the testbed text proto file.
  • -wait_time (optional): Maximum amount of time the test should wait until the testbed is ready. If not specified, the binding chooses the amount of time to wait.
  • -run_time (optional): Timeout of the test run, excluding the wait time for the testbed to be ready. If not specified, no limit is imposed.
  • -xml (optional): File path to write JUnit XML test results; disables normal Go test logging.
  • -debug (optional): Whether the test is run in debug mode.
  • -reserve (optional): Reservation id or a mapping of device and port IDs to names; allowed only in debug mode

To run a subset of the test cases of an Ondatra test, use the Go test -run flag. While the -run flag accepts an arbitrary Go regexp, to match a single test case it is usually sufficient to just pass the name of the test function:

$ go test -testbed=testbed.textproto -config=config.yaml -run=$RUN_THIS_TEST_CASE

Read the Go doc on subtests for more details on matching subtests with the -run flag.

Debugging an Ondatra Test

To run an Ondatra test in debug mode, pass the -debug flag to go test. Debug mode allows you to insert breakpoints in your code with one simple line:

ondatra.Debug().Breakpoint(t)

The Breakpoint and Breakpointf functions allow you to include custom text in the breakpoint message, too. For example:

ondatra.Debug().Breakpoint(t, "this should be unreachable")
ondatra.Debug().Breakpointf(t, "myVar has value %v", myVar)

Debug mode also offers a menu option to pause the test immediately after the testbed is reserved. This is useful if you want to manually inspect the testbed before the test cases run, or to run a separate test execution against with the same reservation.

To debug a test against a pre-allocated reservation, set the -reserve flag to the reservation ID:

$ go test -testbed=testbed.textproto -config=config.yaml -debug -reserve=123abc

To debug the test against specifically-named devices, set the -reserve flag to a comma-separated list of id=name strings at the command line, where ports are named with the syntax deviceID:portID=portName:

$ go test -testbed=testbed.textproto -config=config.yaml -debug \
    -reserve=dut=mydevice,dut:port1=Ethernet1/1,ate=myixia,ate:port2=2/3

Logging Verbosity

Ondatra always sets the Go test -v flag to true for verbose test output, so there is no need to set this flag explicitly in your test invocations.

Ondatra uses glog for its own logging. By default, glog logs to a temporary dir, but setting the -alsologtostderr flag will output those logs to stderr. You can increase the verbosity glog by setting its -v flag to a positive integer. Increasing the value of v produces increasingly verbose and granular details in the logs, as outlined in this table:

Log Level Example Information
1 SetRequest/SubscribeRequest dumps
2 Each Update/Delete received in a SubscribeResponse
3 Ixia gNMI translation details

Because go test has its own -v flag, setting glog's -v value must be preceded by -args to avoid it being interpreted by go test itself. For example:

go test -alsologtostderr -args -v=1

See the glog package documentation for more information on all the glog flags.

XML Test Report

Ondatra has the ability to output test results in JUnit XML format. If you pass -xml=[path] to your go test invocation, Ondatra will use go-junit-report to translate the Go test log to an XML file at the provided path.

To attach properties to the test or individual test cases in the XML report, use the ondatra.Report() API. For example, ondatra.Report().AddTestProperty() attaches a key-value property to the currently running test case.

The help with the development of external tooling that makes use of the XML output, the report package also provides the utility functions ReadXML and ExtractProperties for decoding the XML and extracting a properties map, respectively.

Testing on KNE

You don't have to code your own binding implementation before getting started with Ondatra, because Ondatra comes packaged with a binding for KNE, and an example Ondatra test that uses that binding. See the knebind README for more on how to use the KNE binding and run the example test.

Documentation

Overview

Package ondatra represents the public Ondatra testing API.

Index

Constants

View Source
const (
	// ARISTA vendor.
	ARISTA = Vendor(opb.Device_ARISTA)
	// CISCO vendor.
	CISCO = Vendor(opb.Device_CISCO)
	// DELL vendor.
	DELL = Vendor(opb.Device_DELL)
	// JUNIPER vendor.
	JUNIPER = Vendor(opb.Device_JUNIPER)
	// IXIA vendor.
	IXIA = Vendor(opb.Device_IXIA)
	// CIENA vendor.
	CIENA = Vendor(opb.Device_CIENA)
	// OPENCONFIG vendor.
	OPENCONFIG = Vendor(opb.Device_OPENCONFIG)
	// PALOALTO vendor.
	PALOALTO = Vendor(opb.Device_PALOALTO)
	// ZPE vendor.
	ZPE = Vendor(opb.Device_ZPE)
	// NOKIA vendor.
	NOKIA = Vendor(opb.Device_NOKIA)
)
View Source
const (
	// Speed1Gb is a port speed of 1Gbps.
	Speed1Gb = Speed(opb.Port_S_1GB)
	// Speed5Gb is a port speed of 5Gbps.
	Speed5Gb = Speed(opb.Port_S_5GB)
	// Speed10Gb is a port speed of 10Gbps.
	Speed10Gb = Speed(opb.Port_S_10GB)
	// Speed100Gb is a port speed of 100Gbps.
	Speed100Gb = Speed(opb.Port_S_100GB)
	// Speed400Gb is a port speed of 400Gbps.
	Speed400Gb = Speed(opb.Port_S_400GB)
)
View Source
const (
	// PMD10GBASELRM is the PMD 10GBASE-LRM
	PMD10GBASELRM = PMD(opb.Port_PMD_10GBASE_LRM)
	// PMD10GBASELR is the PMD 10GBASE-LR.
	PMD10GBASELR = PMD(opb.Port_PMD_10GBASE_LR)
	// PMD10GBASEZR is the PMD 10GBASE-ZR.
	PMD10GBASEZR = PMD(opb.Port_PMD_10GBASE_ZR)
	// PMD10GBASEER is the PMD 10GBASE-ER.
	PMD10GBASEER = PMD(opb.Port_PMD_10GBASE_ER)
	// PMD10GBASESR is the PMD 10GBASE-SR.
	PMD10GBASESR = PMD(opb.Port_PMD_10GBASE_SR)
	// PMD40GBASECR4 is the PMD 40GBASE-CR4.
	PMD40GBASECR4 = PMD(opb.Port_PMD_40GBASE_CR4)
	// PMD40GBASESR4 is the PMD 40GBASE-SR4.
	PMD40GBASESR4 = PMD(opb.Port_PMD_40GBASE_SR4)
	// PMD40GBASELR4 is the PMD 40GBASE-LR4.
	PMD40GBASELR4 = PMD(opb.Port_PMD_40GBASE_LR4)
	// PMD40GBASEER4 is the PMD 40GBASE-ER4.
	PMD40GBASEER4 = PMD(opb.Port_PMD_40GBASE_ER4)
	// PMD40GBASEPSM4 is the PMD 40GBASE-PSM4.
	PMD40GBASEPSM4 = PMD(opb.Port_PMD_40GBASE_PSM4)
	// PMD4X10GBASELR is the PMD 4X10GBASE-LR.
	PMD4X10GBASELR = PMD(opb.Port_PMD_4X10GBASE_LR)
	// PMD4X10GBASESR is the PMD 4X10GBASE-SR.
	PMD4X10GBASESR = PMD(opb.Port_PMD_4X10GBASE_SR)
	// PMD100GAOC is the PMD 100G-AOC.
	PMD100GAOC = PMD(opb.Port_PMD_100G_AOC)
	// PMD100GACC is the PMD 100G-ACC.
	PMD100GACC = PMD(opb.Port_PMD_100G_ACC)
	// PMD100GBASESR10 is the PMD 100GBASE-SR10.
	PMD100GBASESR10 = PMD(opb.Port_PMD_100GBASE_SR10)
	// PMD100GBASESR4 is the PMD 100GBASE-SR4.
	PMD100GBASESR4 = PMD(opb.Port_PMD_100GBASE_SR4)
	// PMD100GBASELR4 is the PMD 100GBASE-LR4.
	PMD100GBASELR4 = PMD(opb.Port_PMD_100GBASE_LR4)
	// PMD100GBASEER4 is the PMD 100GBASE-ER4.
	PMD100GBASEER4 = PMD(opb.Port_PMD_100GBASE_ER4)
	// PMD100GBASECWDM4 is the PMD 100GBASE-CWDM4.
	PMD100GBASECWDM4 = PMD(opb.Port_PMD_100GBASE_CWDM4)
	// PMD100GBASECLR4 is the PMD 100GBASE-CLR4.
	PMD100GBASECLR4 = PMD(opb.Port_PMD_100GBASE_CLR4)
	// PMD100GBASEPSM4 is the PMD 100GBASE-PSM4.
	PMD100GBASEPSM4 = PMD(opb.Port_PMD_100GBASE_PSM4)
	// PMD100GBASECR4 is the PMD 100GBASE-CR4.
	PMD100GBASECR4 = PMD(opb.Port_PMD_100GBASE_CR4)
	// PMD100GBASEFR is the PMD 100GBASE-FR.
	PMD100GBASEFR = PMD(opb.Port_PMD_100GBASE_FR)
	// PMD400GBASEZR is the PMD 400GBASE-ZR.
	PMD400GBASEZR = PMD(opb.Port_PMD_400GBASE_ZR)
	// PMD400GBASELR4 is the PMD 400GBASE-LR4.
	PMD400GBASELR4 = PMD(opb.Port_PMD_400GBASE_LR4)
	// PMD400GBASEFR4 is the PMD 400GBASE-FR4.
	PMD400GBASEFR4 = PMD(opb.Port_PMD_400GBASE_FR4)
	// PMD400GBASELR8 is the PMD 400GBASE-LR8.
	PMD400GBASELR8 = PMD(opb.Port_PMD_400GBASE_LR8)
	// PMD400GBASEDR4 is the PMD 400GBASE-DR4.
	PMD400GBASEDR4 = PMD(opb.Port_PMD_400GBASE_DR4)
)

Variables

This section is empty.

Functions

func ATEs

func ATEs(t testing.TB) map[string]*ATEDevice

ATEs returns a map of ATE id to ATE in the testbed.

func DUTs

func DUTs(t testing.TB) map[string]*DUTDevice

DUTs returns a map of DUT id to DUT in the testbed.

func Debug

func Debug() *debug.Debug

Debug returns the Ondatra Debug API.

func EventListener added in v0.1.2

func EventListener() *eventlis.EventListener

EventListener returns the Ondatra Event Listener API.

func Report

func Report() *report.Report

Report returns the Ondatra Report API.

func ReservationID

func ReservationID(t testing.TB) string

ReservationID returns the reservation ID for the testbed.

func RunTests

func RunTests(m *testing.M, newBindFn func() (binding.Binding, error))

RunTests acquires the testbed of devices and runs the tests. Every device is initialized with a baseline configuration that allows it to be managed.

Types

type ATEDevice

type ATEDevice struct {
	*Device
	// contains filtered or unexported fields
}

ATEDevice is an automated test equipment.

func ATE

func ATE(t testing.TB, id string) *ATEDevice

ATE returns the ATE in the testbed with a given id.

func (*ATEDevice) Actions

func (a *ATEDevice) Actions() *Actions

Actions returns a handle to the IxNetwork Actions API.

func (*ATEDevice) OTG

func (a *ATEDevice) OTG() *otg.OTG

OTG returns a handle to the OTG API.

func (*ATEDevice) RawAPIs

func (a *ATEDevice) RawAPIs() *raw.ATEAPIs

RawAPIs returns a handle to raw protocol APIs on the ATE.

func (*ATEDevice) Topology

func (a *ATEDevice) Topology() *Topology

Topology returns a handle to the IxNetwork Topology API.

func (*ATEDevice) Traffic

func (a *ATEDevice) Traffic() *Traffic

Traffic returns a handle to the IxNetwork Traffic API.

type ATETopology

type ATETopology struct {
	// contains filtered or unexported fields
}

ATETopology is an ATE topology.

func (*ATETopology) AddInterface

func (at *ATETopology) AddInterface(name string) *Interface

AddInterface adds and returns an interface with the specified name. The returned interface has an Ethernet configuration with the following defaults: MTU: 1500 FEC: enabled

func (*ATETopology) AddLAG

func (at *ATETopology) AddLAG(name string) *LAG

AddLAG adds and returns a new LAG. By default the LAG has LACP enabled.

func (*ATETopology) ClearInterfaces

func (at *ATETopology) ClearInterfaces() *ATETopology

ClearInterfaces clear interfaces from the ATE topology.

func (*ATETopology) Interfaces

func (at *ATETopology) Interfaces() map[string]*Interface

Interfaces returns a map of interface names to interfaces.

func (*ATETopology) Push

func (at *ATETopology) Push(t testing.TB) *ATETopology

Push replaces the topology to the ATE with this one. Currently running protocols will stop.

func (*ATETopology) StartProtocols

func (at *ATETopology) StartProtocols(t testing.TB) *ATETopology

StartProtocols starts the control plane protocols on the ATE.

func (*ATETopology) StopProtocols

func (at *ATETopology) StopProtocols(t testing.TB) *ATETopology

StopProtocols stops the control plane protocols on the ATE.

func (*ATETopology) String

func (at *ATETopology) String() string

func (*ATETopology) Update

func (at *ATETopology) Update(t testing.TB)

Update updates the topology on the ATE to this one. Currently running protocols will continue running.

func (*ATETopology) UpdateBGPPeerStates

func (at *ATETopology) UpdateBGPPeerStates(t testing.TB)

UpdateBGPPeerStates is equivalent to Update() but only updates the BGP peer state. This is provided as a temporary workaround for the high overhead of Update(). TODO(team): Remove this method once new Ixia config binding is used.

func (*ATETopology) UpdateNetworks

func (at *ATETopology) UpdateNetworks(t testing.TB)

UpdateNetworks is equivalent to Update() but only updates the Network config on the fly.

type Actions

type Actions struct {
	// contains filtered or unexported fields
}

Actions is the ATE Actions API.

func (*Actions) NewBGPGracefulRestart

func (a *Actions) NewBGPGracefulRestart() *BGPGracefulRestart

NewBGPGracefulRestart returns a new BGPGracefulRestart action.

func (*Actions) NewBGPPeerNotification

func (a *Actions) NewBGPPeerNotification() *BGPPeerNotification

NewBGPPeerNotification returns a new BGPPeerNotification action. The action is configured by default with a code and sub code of 1.

func (*Actions) NewSetLACPState

func (a *Actions) NewSetLACPState() *SetLACPState

NewSetLACPState returns a new SetLACPState action.

func (*Actions) NewSetPortState

func (a *Actions) NewSetPortState() *SetPortState

NewSetPortState returns a new SetPortState action.

func (*Actions) String

func (a *Actions) String() string

type BGPGracefulRestart

type BGPGracefulRestart struct {
	// contains filtered or unexported fields
}

BGPGracefulRestart is an action to trigger a BGP graceful restart event.

func (*BGPGracefulRestart) Send

func (r *BGPGracefulRestart) Send(t testing.TB)

Send executes the operation to start the graceful restart event.

func (*BGPGracefulRestart) String

func (r *BGPGracefulRestart) String() string

func (*BGPGracefulRestart) WithPeers

func (r *BGPGracefulRestart) WithPeers(bgpPeers ...*ixnet.BGPPeer) *BGPGracefulRestart

WithPeers sets the BGP peers from which the graceful restart is to be sent.

func (*BGPGracefulRestart) WithRestartTime

func (r *BGPGracefulRestart) WithRestartTime(delay time.Duration) *BGPGracefulRestart

WithRestartTime sets the delay for the BGP sessions to remain down before restarting.

type BGPPeerNotification

type BGPPeerNotification struct {
	// contains filtered or unexported fields
}

BGPPeerNotification is an action to send BGP notification and error codes.

func (*BGPPeerNotification) Send

func (n *BGPPeerNotification) Send(t testing.TB)

Send executes the operation to send notification/error codes.

func (*BGPPeerNotification) String

func (n *BGPPeerNotification) String() string

func (*BGPPeerNotification) WithCode

func (n *BGPPeerNotification) WithCode(code int) *BGPPeerNotification

WithCode sets the code of the notification to be sent from the BGP peers.

func (*BGPPeerNotification) WithPeers

func (n *BGPPeerNotification) WithPeers(bgpPeers ...*ixnet.BGPPeer) *BGPPeerNotification

WithPeers sets the BGP peers from which the notification is to be sent.

func (*BGPPeerNotification) WithSubCode

func (n *BGPPeerNotification) WithSubCode(subCode int) *BGPPeerNotification

WithSubCode sets the sub code of the notification to be sent from the BGP peers.

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is the DUT configuration API.

func (*Config) New

func (c *Config) New() *config.VendorConfig

New returns an empty DUT configuration.

type DUTDevice

type DUTDevice struct {
	*Device
}

DUTDevice is a device under test.

func DUT

func DUT(t testing.TB, id string) *DUTDevice

DUT returns the DUT in the testbed with a given id.

func (*DUTDevice) Config

func (d *DUTDevice) Config() *Config

Config returns a handle to the DUT configuration API.

func (*DUTDevice) Operations

func (d *DUTDevice) Operations() *operations.Operations

Operations returns a handle to the DUT operations API.

func (*DUTDevice) RawAPIs

func (d *DUTDevice) RawAPIs() *raw.DUTAPIs

RawAPIs returns a handle to raw protocol APIs on the DUT.

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device represents a network device.

func (*Device) CustomData added in v0.1.1

func (d *Device) CustomData(key string) any

CustomData returns custom data for the specified key.

func (*Device) GNMIOpts

func (d *Device) GNMIOpts() *gnmi.Opts

GNMIOpts returns a new set of options to customize gNMI queries.

func (*Device) ID

func (d *Device) ID() string

ID returns the device id.

func (*Device) Model

func (d *Device) Model() string

Model returns the device hardware model.

func (*Device) Name

func (d *Device) Name() string

Name returns the device name.

func (*Device) Port

func (d *Device) Port(t testing.TB, ID string) *Port

Port returns a port with a given id.

func (*Device) Ports

func (d *Device) Ports() []*Port

Ports returns a slice of all ports configured on the device.

func (*Device) String

func (d *Device) String() string

String returns a string repesentation of the device.

func (*Device) Vendor

func (d *Device) Vendor() Vendor

Vendor returns the device vendor.

func (*Device) Version

func (d *Device) Version() string

Version returns the device software version.

type EgressTracking

type EgressTracking struct {
	// contains filtered or unexported fields
}

EgressTracking represents the egress tracking configuration of a flow.

func (*EgressTracking) WithCount

func (et *EgressTracking) WithCount(count uint32) *EgressTracking

WithCount sets the number of unique values to egress track.

func (*EgressTracking) WithEnabled

func (et *EgressTracking) WithEnabled(enabled bool) *EgressTracking

WithEnabled sets whether egress tracking is enabled.

func (*EgressTracking) WithOffset

func (et *EgressTracking) WithOffset(offset uint32) *EgressTracking

WithOffset sets the egress tracking bit offset.

func (*EgressTracking) WithWidth

func (et *EgressTracking) WithWidth(width uint32) *EgressTracking

WithWidth sets the egress tracking bit width.

type Endpoint

type Endpoint interface {
	EndpointPB() *opb.Flow_Endpoint
}

Endpoint is a potential source or destination of a flow. There are two types of endpoints: Interfaces and Networks.

type EthernetHeader

type EthernetHeader struct {
	// contains filtered or unexported fields
}

EthernetHeader is an Ethernet packet header.

func NewEthernetHeader

func NewEthernetHeader() *EthernetHeader

NewEthernetHeader returns a new Ethernet header. The header is initialized with none of its properties specified. Unless specified, a best effort will be made to infer the VLAN ID and src and dst addresses from the topology.

func (*EthernetHeader) DstAddressRange

func (h *EthernetHeader) DstAddressRange() *ixnet.AddressRange

DstAddressRange returns the range of destination addresses of the Ethernet header for further configuration. By default, the range will be nonrandom values in the interval ["00:00:00:00:00:01", "FF:FF:FF:FF:FF:FF"). The count of values in the range is not set by default; the user must set it explicitly.

func (*EthernetHeader) SrcAddressRange

func (h *EthernetHeader) SrcAddressRange() *ixnet.AddressRange

SrcAddressRange returns the range of source addresses of the Ethernet header for further configuration. By default, the range will be nonrandom values in the interval ["00:00:00:00:00:01", "FF:FF:FF:FF:FF:FF"). The count of values in the range is not set by default; the user must set it explicitly.

func (*EthernetHeader) WithBadCRC

func (h *EthernetHeader) WithBadCRC(bad bool) *EthernetHeader

WithBadCRC set whether the Ethernet header has an incorrect CRC in the frame check sequence.

func (*EthernetHeader) WithDstAddress

func (h *EthernetHeader) WithDstAddress(addr string) *EthernetHeader

WithDstAddress sets the destination MAC address of the Ethernet header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.

func (*EthernetHeader) WithEtherType

func (h *EthernetHeader) WithEtherType(etherType uint32) *EthernetHeader

WithEtherType sets the EtherType of the Ethernet header to the specified value.

func (*EthernetHeader) WithSrcAddress

func (h *EthernetHeader) WithSrcAddress(addr string) *EthernetHeader

WithSrcAddress sets the source MAC address of the Ethernet header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.

func (*EthernetHeader) WithVLANID

func (h *EthernetHeader) WithVLANID(vid uint16) *EthernetHeader

WithVLANID sets the 12-bit VLAN ID of the Ethernet header to the specified value.

type Flow

type Flow struct {
	// contains filtered or unexported fields
}

Flow is an representation of a flow that is to be configured on the ATE.

func (*Flow) EgressTracking

func (f *Flow) EgressTracking() *EgressTracking

EgressTracking returns the egress tracking configuration of the flow. By default the configuration has the following properties: enabled: true offset: 32 width: 3 count: 8

func (*Flow) FrameSizeIMIXCustom

func (f *Flow) FrameSizeIMIXCustom() *IMIXCustom

FrameSizeIMIXCustom configures this IMIX to use custom size and weight pairs.

func (*Flow) Headers

func (f *Flow) Headers() []Header

Headers returns the headers of the flow.

func (*Flow) Name

func (f *Flow) Name() string

Name returns the name of the flow.

func (*Flow) String

func (f *Flow) String() string

func (*Flow) Transmission

func (f *Flow) Transmission() *Transmission

Transmission returns the transmission configuration for this flow. By default the transmission will have the following properties: pattern: continuous min packet gap: 12 bytes.

func (*Flow) WithConvergenceTracking

func (f *Flow) WithConvergenceTracking(enable bool) *Flow

WithConvergenceTracking enables convergence tracking for the flow.

func (*Flow) WithDstEndpoints

func (f *Flow) WithDstEndpoints(eps ...Endpoint) *Flow

WithDstEndpoints sets the flow's destination to the specified endpoints.

func (*Flow) WithFrameRateBPS

func (f *Flow) WithFrameRateBPS(n uint64) *Flow

WithFrameRateBPS sets the flow's rate to be n bits per second.

func (*Flow) WithFrameRateFPS

func (f *Flow) WithFrameRateFPS(n uint64) *Flow

WithFrameRateFPS sets the flow's rate to be n frames per second.

func (*Flow) WithFrameRatePct

func (f *Flow) WithFrameRatePct(pct float64) *Flow

WithFrameRatePct sets the flow's rate to be pct% of the line rate.

func (*Flow) WithFrameSize

func (f *Flow) WithFrameSize(n uint32) *Flow

WithFrameSize sets the frame size for this flow to a fixed value. To generate a range of frame sizes, use FrameSizeRange() instead.

func (*Flow) WithFrameSizeIMIXCisco

func (f *Flow) WithFrameSizeIMIXCisco() *Flow

WithFrameSizeIMIXCisco configures this IMIX to use the Cisco preset (64:7, 594:4 and 1518:1).

func (*Flow) WithFrameSizeIMIXDefault

func (f *Flow) WithFrameSizeIMIXDefault() *Flow

WithFrameSizeIMIXDefault configures this IMIX to use the default preset (64:7, 570:4, and 1518:1).

func (*Flow) WithFrameSizeIMIXIPSec

func (f *Flow) WithFrameSizeIMIXIPSec() *Flow

WithFrameSizeIMIXIPSec configures this IMIX to use the IPSec preset (90:58.67, 92:2, 594:23.66 and 1418:15.67).

func (*Flow) WithFrameSizeIMIXIPv6

func (f *Flow) WithFrameSizeIMIXIPv6() *Flow

WithFrameSizeIMIXIPv6 configures this IMIX to use the IPv6 IMIX preset (60:58.67, 496:2, 594:23.66 and 1518:15.67).

func (*Flow) WithFrameSizeIMIXRPRQuadmodal

func (f *Flow) WithFrameSizeIMIXRPRQuadmodal() *Flow

WithFrameSizeIMIXRPRQuadmodal configures this IMIX to use the RPR Quadmodal preset (64:50, 512:15, 1518:15 and 9216:20).

func (*Flow) WithFrameSizeIMIXRPRTrimodal

func (f *Flow) WithFrameSizeIMIXRPRTrimodal() *Flow

WithFrameSizeIMIXRPRTrimodal configures this IMIX to use the RPR Trimodal preset (64:60, 512:20 and 1518:20).

func (*Flow) WithFrameSizeIMIXStandard

func (f *Flow) WithFrameSizeIMIXStandard() *Flow

WithFrameSizeIMIXStandard configures this IMIX to use the Standard preset (58:58.67, 62:2, 594:23.66 and 1518:15.67).

func (*Flow) WithFrameSizeIMIXTCP

func (f *Flow) WithFrameSizeIMIXTCP() *Flow

WithFrameSizeIMIXTCP configures this IMIX to use the TCP preset (90:58.67, 92:2, 594:23.66 and 1518:15.67).

func (*Flow) WithFrameSizeIMIXTolly

func (f *Flow) WithFrameSizeIMIXTolly() *Flow

WithFrameSizeIMIXTolly configures this IMIX to use the Tolly preset (64:55, 78:5, 576:17 and 1518:23).

func (*Flow) WithFrameSizeRandom

func (f *Flow) WithFrameSizeRandom(min, max uint32) *Flow

WithFrameSizeRandom sets the frame size for this flow to a random value in the given range.

func (*Flow) WithHeaders

func (f *Flow) WithHeaders(headers ...Header) *Flow

WithHeaders sets the flow's packet headers.

func (*Flow) WithIngressTrackingByDstEndpoint

func (f *Flow) WithIngressTrackingByDstEndpoint(enable bool) *Flow

WithIngressTrackingByDstEndpoint enables ingress tracking by destination endpoint.

func (*Flow) WithIngressTrackingByDstIPV4

func (f *Flow) WithIngressTrackingByDstIPV4(enable bool) *Flow

WithIngressTrackingByDstIPV4 enables ingress tracking by dst ipv4.

func (*Flow) WithIngressTrackingByDstIPV6

func (f *Flow) WithIngressTrackingByDstIPV6(enable bool) *Flow

WithIngressTrackingByDstIPV6 enables ingress tracking by dst ipv6.

func (*Flow) WithIngressTrackingByMplsLabel

func (f *Flow) WithIngressTrackingByMplsLabel(enable bool) *Flow

WithIngressTrackingByMplsLabel enables ingress tracking by mpls label.

func (*Flow) WithIngressTrackingByPorts

func (f *Flow) WithIngressTrackingByPorts(enable bool) *Flow

WithIngressTrackingByPorts enables ingress tracking by rx/tx ports.

func (*Flow) WithIngressTrackingBySrcEndpoint

func (f *Flow) WithIngressTrackingBySrcEndpoint(enable bool) *Flow

WithIngressTrackingBySrcEndpoint enables ingress tracking by source endpoint.

func (*Flow) WithIngressTrackingBySrcIPV4

func (f *Flow) WithIngressTrackingBySrcIPV4(enable bool) *Flow

WithIngressTrackingBySrcIPV4 enables ingress tracking by src ipv4.

func (*Flow) WithIngressTrackingBySrcIPV6

func (f *Flow) WithIngressTrackingBySrcIPV6(enable bool) *Flow

WithIngressTrackingBySrcIPV6 enables ingress tracking by src ipv6.

func (*Flow) WithIngressTrackingByVLANID

func (f *Flow) WithIngressTrackingByVLANID(enable bool) *Flow

WithIngressTrackingByVLANID enables ingress tracking by VLAN ID.

func (*Flow) WithSrcEndpoints

func (f *Flow) WithSrcEndpoints(eps ...Endpoint) *Flow

WithSrcEndpoints sets the flow's source to the specified endpoints.

type GREHeader

type GREHeader struct {
	// contains filtered or unexported fields
}

GREHeader is a Generic Route Encapsulation packet header.

func NewGREHeader

func NewGREHeader() *GREHeader

NewGREHeader returns a new GRE header. The header is initialized with none of its properties specified.

func (*GREHeader) WithKey

func (h *GREHeader) WithKey(key uint32) *GREHeader

WithKey sets the key of the GRE header.

func (*GREHeader) WithSequenceNumber

func (h *GREHeader) WithSequenceNumber(seq uint32) *GREHeader

WithSequenceNumber sets sequence number of the GRE header.

type HTTPHeader

type HTTPHeader struct {
	// contains filtered or unexported fields
}

HTTPHeader is an HTTP packet header.

func NewHTTPHeader

func NewHTTPHeader() *HTTPHeader

NewHTTPHeader returns a new HTTP header. The header is initialized with none of its properties specified.

type Header interface {
	// contains filtered or unexported methods
}

Header is a packet header.

type ICMPDestinationUnreachable

type ICMPDestinationUnreachable struct {
	// contains filtered or unexported fields
}

ICMPDestinationUnreachable is an ICMP destination unreachable message.

func (*ICMPDestinationUnreachable) WithFragmentationRequired

func (h *ICMPDestinationUnreachable) WithFragmentationRequired() *ICMPDestinationUnreachable

WithFragmentationRequired sets the destination unreachable code to fragmentation required.

func (*ICMPDestinationUnreachable) WithHostUnreachable

func (h *ICMPDestinationUnreachable) WithHostUnreachable() *ICMPDestinationUnreachable

WithHostUnreachable sets the destination unreachable code to host unreachable.

func (*ICMPDestinationUnreachable) WithNetworkUnreachable

func (h *ICMPDestinationUnreachable) WithNetworkUnreachable() *ICMPDestinationUnreachable

WithNetworkUnreachable sets the destination unreachable code to network unreachable.

func (*ICMPDestinationUnreachable) WithPortUnreachable

func (h *ICMPDestinationUnreachable) WithPortUnreachable() *ICMPDestinationUnreachable

WithPortUnreachable sets the destination unreachable code to port unreachable.

func (*ICMPDestinationUnreachable) WithProtocolUnreachable

func (h *ICMPDestinationUnreachable) WithProtocolUnreachable() *ICMPDestinationUnreachable

WithProtocolUnreachable sets the destination unreachable code to protocol unreachable.

func (*ICMPDestinationUnreachable) WithSourceRouteFailed

func (h *ICMPDestinationUnreachable) WithSourceRouteFailed() *ICMPDestinationUnreachable

WithSourceRouteFailed sets the destination unreachable code to source route failed.

type ICMPEchoReply

type ICMPEchoReply struct {
	// contains filtered or unexported fields
}

ICMPEchoReply is an ICMP echo reply message.

type ICMPEchoRequest

type ICMPEchoRequest struct {
	// contains filtered or unexported fields
}

ICMPEchoRequest is an ICMP echo request message.

type ICMPHeader

type ICMPHeader struct {
	// contains filtered or unexported fields
}

ICMPHeader is an ICMP packet header.

func NewICMPHeader

func NewICMPHeader() *ICMPHeader

NewICMPHeader returns a new ICMP header. The header is initialized as an Echo Reply.

func (*ICMPHeader) DestinationUnreachable

func (h *ICMPHeader) DestinationUnreachable() *ICMPDestinationUnreachable

DestinationUnreachable sets the ICMPHeader message type to destination unreachable.

func (*ICMPHeader) EchoReply

func (h *ICMPHeader) EchoReply() *ICMPEchoReply

EchoReply sets the ICMPHeader message type to echo reply.

func (*ICMPHeader) EchoRequest

func (h *ICMPHeader) EchoRequest() *ICMPEchoRequest

EchoRequest sets the ICMPHeader message type to echo request.

func (*ICMPHeader) ParameterProblem

func (h *ICMPHeader) ParameterProblem() *ICMPParameterProblem

ParameterProblem sets the ICMPHeader message type to parameter problem.

func (*ICMPHeader) RedirectMessage

func (h *ICMPHeader) RedirectMessage() *ICMPRedirectMessage

RedirectMessage sets the ICMPHeader message type to redirect message.

func (*ICMPHeader) TimeExceeded

func (h *ICMPHeader) TimeExceeded() *ICMPTimeExceeded

TimeExceeded sets the ICMPHeader message type to time exceeded.

func (*ICMPHeader) Timestamp

func (h *ICMPHeader) Timestamp() *ICMPTimestamp

Timestamp sets the ICMPHeader message type to timestamp message.

func (*ICMPHeader) TimestampReply

func (h *ICMPHeader) TimestampReply() *ICMPTimestampReply

TimestampReply sets the ICMPHeader message type to timestamp reply.

type ICMPParameterProblem

type ICMPParameterProblem struct {
	// contains filtered or unexported fields
}

ICMPParameterProblem is an ICMP parameter problem message.

func (*ICMPParameterProblem) WithPointer

func (h *ICMPParameterProblem) WithPointer(pointer uint32) *ICMPParameterProblem

WithPointer sets the pointer for the parameter problem message.

type ICMPRedirectMessage

type ICMPRedirectMessage struct {
	// contains filtered or unexported fields
}

ICMPRedirectMessage is an ICMP redirect message.

func (*ICMPRedirectMessage) WithForHost

func (h *ICMPRedirectMessage) WithForHost() *ICMPRedirectMessage

WithForHost sets the redirect message code to redirect for host.

func (*ICMPRedirectMessage) WithForNetwork

func (h *ICMPRedirectMessage) WithForNetwork() *ICMPRedirectMessage

WithForNetwork sets the redirect message code to redirect for network.

func (*ICMPRedirectMessage) WithForToSAndHost

func (h *ICMPRedirectMessage) WithForToSAndHost() *ICMPRedirectMessage

WithForToSAndHost sets the redirect message code to redirect for ToS and host.

func (*ICMPRedirectMessage) WithForToSAndNetwork

func (h *ICMPRedirectMessage) WithForToSAndNetwork() *ICMPRedirectMessage

WithForToSAndNetwork sets the redirect message code to redirect for ToS and network.

func (*ICMPRedirectMessage) WithIP

WithIP sets the redirect gateway IP address.

type ICMPTimeExceeded

type ICMPTimeExceeded struct {
	// contains filtered or unexported fields
}

ICMPTimeExceeded is an ICMP time exceeded message.

func (*ICMPTimeExceeded) WithFragmentReassembly

func (h *ICMPTimeExceeded) WithFragmentReassembly() *ICMPTimeExceeded

WithFragmentReassembly sets the time exceeded message code to time exceeded in fragment reassembly.

func (*ICMPTimeExceeded) WithTransit

func (h *ICMPTimeExceeded) WithTransit() *ICMPTimeExceeded

WithTransit sets the time exceeded message code to time exceeded in transit.

type ICMPTimestamp

type ICMPTimestamp struct {
	// contains filtered or unexported fields
}

ICMPTimestamp is an ICMP timestamp message.

func (*ICMPTimestamp) WithID

func (h *ICMPTimestamp) WithID(id uint32) *ICMPTimestamp

WithID sets the ID for the timestamp message.

func (*ICMPTimestamp) WithOriginateTimestamp

func (h *ICMPTimestamp) WithOriginateTimestamp(ts uint32) *ICMPTimestamp

WithOriginateTimestamp sets the originate timestamp for the timestamp message.

func (*ICMPTimestamp) WithSeq

func (h *ICMPTimestamp) WithSeq(seq uint32) *ICMPTimestamp

WithSeq sets the sequence number for the timestamp message.

type ICMPTimestampReply

type ICMPTimestampReply struct {
	// contains filtered or unexported fields
}

ICMPTimestampReply is an ICMP timestamp reply message.

func (*ICMPTimestampReply) WithID

WithID sets the ID for the timestamp reply message.

func (*ICMPTimestampReply) WithOriginateTimestamp

func (h *ICMPTimestampReply) WithOriginateTimestamp(ts uint32) *ICMPTimestampReply

WithOriginateTimestamp sets the originate timestamp for the timestamp reply message.

func (*ICMPTimestampReply) WithReceiveTimestamp

func (h *ICMPTimestampReply) WithReceiveTimestamp(ts uint32) *ICMPTimestampReply

WithReceiveTimestamp sets the receive timestamp for the timestamp reply message.

func (*ICMPTimestampReply) WithSeq

func (h *ICMPTimestampReply) WithSeq(seq uint32) *ICMPTimestampReply

WithSeq sets the sequence number for the timestamp reply message.

func (*ICMPTimestampReply) WithTransmitTimestamp

func (h *ICMPTimestampReply) WithTransmitTimestamp(ts uint32) *ICMPTimestampReply

WithTransmitTimestamp sets the transmit timestamp for the timestamp reply message.

type IMIXCustom

type IMIXCustom struct {
	// contains filtered or unexported fields
}

IMIXCustom is an representation of custom IMIX entries to be configured for a flow on the ATE.

func (*IMIXCustom) AddEntry

func (ic *IMIXCustom) AddEntry(size, weight uint32) *IMIXCustom

AddEntry adds a custom IMIX entry.

type IPv4Header

type IPv4Header struct {
	// contains filtered or unexported fields
}

IPv4Header is an IPv4 packet header.

func NewIPv4Header

func NewIPv4Header() *IPv4Header

NewIPv4Header returns a new IPv4 header. The header is initialized with a hop limit of 64, DSCP of 0 (best effort), and ECN of 0 (not ECN capable). Unless specified, a best effort will be made to infer the src and dst addresses from the topology.

func (*IPv4Header) DstAddressRange

func (h *IPv4Header) DstAddressRange() *ixnet.AddressRange

DstAddressRange returns the range of destination addresses of the IPv4 header for further configuration. By default, the range will be nonrandom values in the interval ["0.0.0.1", "255.255.255.255"). The count of values in the range is not set by default; the user must set it explicitly.

func (*IPv4Header) SrcAddressRange

func (h *IPv4Header) SrcAddressRange() *ixnet.AddressRange

SrcAddressRange returns the range of source addresses of the IPv4 header for further configuration. By default, the range will be nonrandom values in the interval ["0.0.0.1", "255.255.255.255"). The count of values in the range is not set by default; the user must set it explicitly.

func (*IPv4Header) WithDSCP

func (h *IPv4Header) WithDSCP(dscp uint8) *IPv4Header

WithDSCP sets the DSCP field of the IPv4 header.

func (*IPv4Header) WithDontFragment

func (h *IPv4Header) WithDontFragment(dontFragment bool) *IPv4Header

WithDontFragment sets the "don't fragment" bit of the IPv4 header.

func (*IPv4Header) WithDstAddress

func (h *IPv4Header) WithDstAddress(addr string) *IPv4Header

WithDstAddress sets the destination IP addresses of the IPv4 header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.

func (*IPv4Header) WithECN

func (h *IPv4Header) WithECN(ecn uint8) *IPv4Header

WithECN sets the ECN field of the IPv4 header.

func (*IPv4Header) WithFragmentOffset

func (h *IPv4Header) WithFragmentOffset(fragmentOffset int) *IPv4Header

WithFragmentOffset sets the fragment offset field of the IPv4 header.

func (*IPv4Header) WithHeaderChecksum

func (h *IPv4Header) WithHeaderChecksum(checksum uint16) *IPv4Header

WithHeaderChecksum sets the header checksum field of the IPv4 header.

func (*IPv4Header) WithIdentification

func (h *IPv4Header) WithIdentification(identification int) *IPv4Header

WithIdentification set identification field of IPv4 Header

func (*IPv4Header) WithMoreFragments

func (h *IPv4Header) WithMoreFragments(moreFragments bool) *IPv4Header

WithMoreFragments sets the "more fragments" bit of the IPv4 Header

func (*IPv4Header) WithProtocol

func (h *IPv4Header) WithProtocol(protocol int) *IPv4Header

WithProtocol sets the protocol field of the IPv4 header. If left unspecified, it will be inferred from the next header in the flow.

func (*IPv4Header) WithSrcAddress

func (h *IPv4Header) WithSrcAddress(addr string) *IPv4Header

WithSrcAddress sets the source IP address of the IPv4 header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.

func (*IPv4Header) WithTTL

func (h *IPv4Header) WithTTL(ttl uint8) *IPv4Header

WithTTL sets the TTL of the IPv4 header.

type IPv6Header

type IPv6Header struct {
	// contains filtered or unexported fields
}

IPv6Header is an IPv6 packet header.

func NewIPv6Header

func NewIPv6Header() *IPv6Header

NewIPv6Header returns a new IPv6 header. The header is initialized with a hop limit of 64, DSCP of 0 (best effort), and ECN of 0 (not ECN capable). Unless specified, a best effort will be made to infer the src and dst addresses from the topology.

func (*IPv6Header) DstAddressRange

func (h *IPv6Header) DstAddressRange() *ixnet.AddressRange

DstAddressRange returns the range of destination addresses of the IPv6 header for further configuration. By default, the range will be nonrandom values in the interval ["::1", "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]. The count of values in the range is not set by default; the user must set it explicitly.

func (*IPv6Header) FlowLabelRange

func (h *IPv6Header) FlowLabelRange() *ixnet.UIntRange

FlowLabelRange sets the flow label of the IPv6 header to a range of values and returns the range. By default, the range will be nonrandom values in the interval [0, 2^20). The count of values in the range is not set by default; the user must set it explicitly.

func (*IPv6Header) SrcAddressRange

func (h *IPv6Header) SrcAddressRange() *ixnet.AddressRange

SrcAddressRange returns the range of source addresses of the IPv6 header for further configuration. By default, the range will be nonrandom values in the interval ["::1", "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]. The count of values in the range is not set by default; the user must set it explicitly.

func (*IPv6Header) WithDSCP

func (h *IPv6Header) WithDSCP(dscp uint8) *IPv6Header

WithDSCP sets the DSCP value of the IPv6 header.

func (*IPv6Header) WithDstAddress

func (h *IPv6Header) WithDstAddress(addr string) *IPv6Header

WithDstAddress sets the destination IP addresses of the IPv6 header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.

func (*IPv6Header) WithECN

func (h *IPv6Header) WithECN(ecn uint8) *IPv6Header

WithECN sets the ECN value of the IPv6 header.

func (*IPv6Header) WithFlowLabel

func (h *IPv6Header) WithFlowLabel(flowLabel uint32) *IPv6Header

WithFlowLabel sets the flow label of the IPv6 header.

func (*IPv6Header) WithHopLimit

func (h *IPv6Header) WithHopLimit(hopLimit uint8) *IPv6Header

WithHopLimit sets the hop limit of the IPv6 header.

func (*IPv6Header) WithSrcAddress

func (h *IPv6Header) WithSrcAddress(addr string) *IPv6Header

WithSrcAddress sets the source IP addresses of the IPv6 header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

Interface represents an ATE interface configuration.

func (*Interface) AddNetwork

func (i *Interface) AddNetwork(name string) *ixnet.Network

AddNetwork adds and returns a network with the specified name.

func (*Interface) AddRSVP

func (i *Interface) AddRSVP(name string) *ixnet.RSVP

AddRSVP adds an RSVP config to the interface.

func (*Interface) BGP

func (i *Interface) BGP() *ixnet.BGP

BGP creates a BGP config for the interface or returns the existing config.

func (*Interface) ClearNetworks

func (i *Interface) ClearNetworks() *Interface

ClearNetworks clears networks from the interface.

func (*Interface) DHCPV6Client added in v0.1.1

func (i *Interface) DHCPV6Client() *ixnet.DHCPV6Client

DHCPV6Client creates a DHCP v6 Client or returns the existing config.

func (*Interface) DHCPV6Server added in v0.1.1

func (i *Interface) DHCPV6Server() *ixnet.DHCPV6Server

DHCPV6Server creates a DHCP v6 Server or returns the existing config.

func (*Interface) EndpointPB

func (i *Interface) EndpointPB() *opb.Flow_Endpoint

EndpointPB returns the Interface config as an endpoint proto message.

func (*Interface) Ethernet

func (i *Interface) Ethernet() *ixnet.Ethernet

Ethernet returns the existing Ethernet config.

func (*Interface) IPv4

func (i *Interface) IPv4() *ixnet.IP

IPv4 creates an IPv4 config for the interface or returns the existing config.

func (*Interface) IPv6

func (i *Interface) IPv6() *ixnet.IP

IPv6 creates an IPv6 config for the interface or returns the existing config.

func (*Interface) ISIS

func (i *Interface) ISIS() *ixnet.ISIS

ISIS creates an ISIS config for the interface or returns the existing config. The default config paramas are: Area Id: 490001 Router Id: 0.0.0.0 Hello Interval: 10 seconds Dead Interval: 30 seconds

func (*Interface) IsLACPEnabled

func (i *Interface) IsLACPEnabled() bool

IsLACPEnabled returns whether the interface has LACP enabled.

func (*Interface) Networks

func (i *Interface) Networks() map[string]*ixnet.Network

Networks returns a map of network names to networks.

func (*Interface) WithIPv4Loopback

func (i *Interface) WithIPv4Loopback(ipv4LoopbackCIDR string) *Interface

WithIPv4Loopback configures the IPv4 loopback address for the interface.

func (*Interface) WithIPv6Loopback

func (i *Interface) WithIPv6Loopback(ipv6LoopbackCIDR string) *Interface

WithIPv6Loopback configures the IPv6 loopback address for the interface.

func (*Interface) WithLACPEnabled

func (i *Interface) WithLACPEnabled(enabled bool) *Interface

WithLACPEnabled specifies whether the interface has LACP enabled.

func (*Interface) WithLAG

func (i *Interface) WithLAG(l *LAG) *Interface

WithLAG specifies that the interface will be configured on the given LAG. TODO(team): Add Ondatra test for this feature.

func (*Interface) WithPort

func (i *Interface) WithPort(p *Port) *Interface

WithPort specifies that the interface will be configured on the given port.

type LACP

type LACP struct {
	// contains filtered or unexported fields
}

LACP is a LACP configuration on a LAG.

func (*LACP) WithEnabled

func (l *LACP) WithEnabled(enabled bool) *LACP

WithEnabled sets whether LACP is enabled on the LAG.

type LAG

type LAG struct {
	// contains filtered or unexported fields
}

LAG is a link aggregation group.

func (*LAG) LACP

func (l *LAG) LACP() *LACP

LACP returns the LACP configuration of the LAG.

func (*LAG) WithPorts

func (l *LAG) WithPorts(ports ...*Port) *LAG

WithPorts sets the LAG ports to the specified ports.

type LDPHeader

type LDPHeader struct {
	// contains filtered or unexported fields
}

LDPHeader is an LDP packet header.

func NewLDPHeader

func NewLDPHeader() *LDPHeader

NewLDPHeader returns a new LDP header. The header is initialized as a default Hello message.

func (*LDPHeader) Hello

func (h *LDPHeader) Hello() *LDPHello

Hello sets the LDPHeader message type to a hello message with the following default values: - Hold time: 15 - Targeted: false - Request Targeted: false

func (*LDPHeader) WithLSRID

func (h *LDPHeader) WithLSRID(id string) *LDPHeader

WithLSRID sets the LSR ID.

func (*LDPHeader) WithLabelSpace

func (h *LDPHeader) WithLabelSpace(label uint16) *LDPHeader

WithLabelSpace sets the label space.

type LDPHello

type LDPHello struct {
	// contains filtered or unexported fields
}

LDPHello is an LDP hello message.

func (*LDPHello) WithHoldTimeSec

func (h *LDPHello) WithHoldTimeSec(secs uint16) *LDPHello

WithHoldTimeSec sets the hold time in the Hello message.

func (*LDPHello) WithRequestTargeted

func (h *LDPHello) WithRequestTargeted(targeted bool) *LDPHello

WithRequestTargeted specifies if the message is requesting targeted Hello replies.

func (*LDPHello) WithTargeted

func (h *LDPHello) WithTargeted(targeted bool) *LDPHello

WithTargeted specifies if the message is a targeted hello.

type MACsecHeader

type MACsecHeader struct {
	// contains filtered or unexported fields
}

MACsecHeader is a MACsec packet header.

func NewMACsecHeader

func NewMACsecHeader() *MACsecHeader

NewMACsecHeader returns a new MACsec header.

type MPLSHeader

type MPLSHeader struct {
	// contains filtered or unexported fields
}

MPLSHeader is a Multiprotocol Label Switching packet header.

func NewMPLSHeader

func NewMPLSHeader() *MPLSHeader

NewMPLSHeader returns a new MPLS header. The header is initialized with a traffic class of 0 (best effort) and TTL of 255.

func (*MPLSHeader) LabelRange

func (h *MPLSHeader) LabelRange() *ixnet.UIntRange

LabelRange sets the label of the MPLS header to a range of values and returns the range. By default, the range will be nonrandom values in the interval [0, 2^20). The count of values in the range is not set by default; the user must set it explicitly.

func (*MPLSHeader) WithEXP

func (h *MPLSHeader) WithEXP(exp uint8) *MPLSHeader

WithEXP sets the EXP (aka traffic class) of the MPLS header.

func (*MPLSHeader) WithLabel

func (h *MPLSHeader) WithLabel(label uint32) *MPLSHeader

WithLabel sets the label of the MPLS header to the specified value. To generate a range of labels, use LabelRange() instead.

func (*MPLSHeader) WithTTL

func (h *MPLSHeader) WithTTL(ttl uint8) *MPLSHeader

WithTTL sets the TTL of the MPLS header.

type OSPFAdvertisement

type OSPFAdvertisement struct {
	// contains filtered or unexported fields
}

OSPFAdvertisement respresents an OSPF link state update advertisement.

func (*OSPFAdvertisement) AdvertisementHeader

func (h *OSPFAdvertisement) AdvertisementHeader() *OSPFLinkStateAdvertisementHeader

AdvertisementHeader returns the advertisement header for the link state advertisement.

type OSPFDatabaseDescription

type OSPFDatabaseDescription struct {
	// contains filtered or unexported fields
}

OSPFDatabaseDescription is an OSPF database description message.

func (*OSPFDatabaseDescription) WithInitial

func (h *OSPFDatabaseDescription) WithInitial(initial bool) *OSPFDatabaseDescription

WithInitial sets the 'initial' bit of the database description message.

func (*OSPFDatabaseDescription) WithMTU

WithMTU sets the MTU field of the database description message.

func (*OSPFDatabaseDescription) WithMaster

func (h *OSPFDatabaseDescription) WithMaster(master bool) *OSPFDatabaseDescription

WithMaster sets the 'master' bit of the database description message.

func (*OSPFDatabaseDescription) WithMore

WithMore sets the 'more' bit of the database description message.

func (*OSPFDatabaseDescription) WithSeq

WithSeq sets the sequence number of the database description message.

type OSPFHeader

type OSPFHeader struct {
	// contains filtered or unexported fields
}

OSPFHeader is an OSPF packet header.

func NewOSPFHeader

func NewOSPFHeader() *OSPFHeader

NewOSPFHeader returns a new OSPF header. The header is initialized as a default Hello packet.

func (*OSPFHeader) DatabaseDescription

func (h *OSPFHeader) DatabaseDescription() *OSPFDatabaseDescription

DatabaseDescription sets the OSPFHeader message type to a DBD message with MTU set to 1500.

func (*OSPFHeader) Hello

func (h *OSPFHeader) Hello() *OSPFHello

Hello sets the OSPFHeader message type to a hello message with the following default values: - Network Mask: 24 - Hello Interval: 10 - Router Dead Interval: 40

func (*OSPFHeader) LinkStateAck

func (h *OSPFHeader) LinkStateAck() *OSPFLinkStateAck

LinkStateAck sets the OSPFHeader message type to a link state ack.

func (*OSPFHeader) LinkStateRequest

func (h *OSPFHeader) LinkStateRequest() *OSPFLinkStateRequest

LinkStateRequest sets the OSPFHeader message type to a link state request, defaulting to asking for a Router link.

func (*OSPFHeader) LinkStateUpdate

func (h *OSPFHeader) LinkStateUpdate() *OSPFLinkStateUpdate

LinkStateUpdate sets the OSPFHeader message type to a link state update.

type OSPFHello

type OSPFHello struct {
	// contains filtered or unexported fields
}

OSPFHello is an OSPF hello message.

func (*OSPFHello) WithBackupDesignatedRouter

func (h *OSPFHello) WithBackupDesignatedRouter(ip string) *OSPFHello

WithBackupDesignatedRouter sets the backup designated router for the hello message.

func (*OSPFHello) WithDesignatedRouter

func (h *OSPFHello) WithDesignatedRouter(ip string) *OSPFHello

WithDesignatedRouter sets the designated router for the hello message.

func (*OSPFHello) WithHelloIntervalSec

func (h *OSPFHello) WithHelloIntervalSec(secs uint32) *OSPFHello

WithHelloIntervalSec sets the interval for the hello message.

func (*OSPFHello) WithNeighbors

func (h *OSPFHello) WithNeighbors(ips ...string) *OSPFHello

WithNeighbors sets the neighbor routers for the hello message.

func (*OSPFHello) WithNetworkMaskLength

func (h *OSPFHello) WithNetworkMaskLength(length uint32) *OSPFHello

WithNetworkMaskLength sets the network mask length for the hello message.

func (*OSPFHello) WithRouterDeadIntervalSec

func (h *OSPFHello) WithRouterDeadIntervalSec(secs uint32) *OSPFHello

WithRouterDeadIntervalSec sets the dead interval for the hello message.

func (*OSPFHello) WithRouterPriority

func (h *OSPFHello) WithRouterPriority(prio uint32) *OSPFHello

WithRouterPriority sets the router priority for the hello message.

type OSPFLinkStateAck

type OSPFLinkStateAck struct {
	// contains filtered or unexported fields
}

OSPFLinkStateAck is an OSPF link state ack message.

func (*OSPFLinkStateAck) AddAdvertisementHeader

func (h *OSPFLinkStateAck) AddAdvertisementHeader() *OSPFLinkStateAdvertisementHeader

AddAdvertisementHeader adds a link state advertisement header to the link state ack message. Defaults to setting the link state type to 'router'.

type OSPFLinkStateAdvertisementHeader

type OSPFLinkStateAdvertisementHeader struct {
	// contains filtered or unexported fields
}

OSPFLinkStateAdvertisementHeader is an OSPF link state advertisement header.

func (*OSPFLinkStateAdvertisementHeader) WithAdvertisingRouter

WithAdvertisingRouter sets the advertising router ID of the link state advertisement.

func (*OSPFLinkStateAdvertisementHeader) WithAge

WithAge sets the age in seconds of the link state advertisement.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateID

WithLinkStateID sets the ID of the link state advertisement.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeASExternal

func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeASExternal() *OSPFLinkStateAdvertisementHeader

WithLinkStateTypeASExternal sets the link state type to AS external.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeNetwork

WithLinkStateTypeNetwork sets the link state type to network.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeRouter

WithLinkStateTypeRouter sets the link state type to router.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryASBR

func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryASBR() *OSPFLinkStateAdvertisementHeader

WithLinkStateTypeSummaryASBR sets the link state type to an AS boundary router summary.

func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryNetwork

func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateAdvertisementHeader

WithLinkStateTypeSummaryNetwork sets the link state type to a network summary.

func (*OSPFLinkStateAdvertisementHeader) WithSeq

WithSeq sets the sequence number of the link state advertisement.

type OSPFLinkStateRequest

type OSPFLinkStateRequest struct {
	// contains filtered or unexported fields
}

OSPFLinkStateRequest is an OSPF link state request message.

func (*OSPFLinkStateRequest) WithAdvertisingRouter

func (h *OSPFLinkStateRequest) WithAdvertisingRouter(id string) *OSPFLinkStateRequest

WithAdvertisingRouter sets the advertising router ID of the link state request.

func (*OSPFLinkStateRequest) WithLinkStateID

func (h *OSPFLinkStateRequest) WithLinkStateID(id string) *OSPFLinkStateRequest

WithLinkStateID sets the link state ID of the link state request.

func (*OSPFLinkStateRequest) WithLinkStateTypeASExternal

func (h *OSPFLinkStateRequest) WithLinkStateTypeASExternal() *OSPFLinkStateRequest

WithLinkStateTypeASExternal sets the link state request type to AS external.

func (*OSPFLinkStateRequest) WithLinkStateTypeNetwork

func (h *OSPFLinkStateRequest) WithLinkStateTypeNetwork() *OSPFLinkStateRequest

WithLinkStateTypeNetwork sets the link state request type to network.

func (*OSPFLinkStateRequest) WithLinkStateTypeRouter

func (h *OSPFLinkStateRequest) WithLinkStateTypeRouter() *OSPFLinkStateRequest

WithLinkStateTypeRouter sets the link state request type to router.

func (*OSPFLinkStateRequest) WithLinkStateTypeSummaryASBR

func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryASBR() *OSPFLinkStateRequest

WithLinkStateTypeSummaryASBR sets the link state request type to an AS boundary router summary.

func (*OSPFLinkStateRequest) WithLinkStateTypeSummaryNetwork

func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateRequest

WithLinkStateTypeSummaryNetwork sets the link state request type to a network summary.

type OSPFLinkStateUpdate

type OSPFLinkStateUpdate struct {
	// contains filtered or unexported fields
}

OSPFLinkStateUpdate is an OSPF link state update message.

func (*OSPFLinkStateUpdate) AddAdvertisement

func (h *OSPFLinkStateUpdate) AddAdvertisement() *OSPFAdvertisement

AddAdvertisement adds a link state advertisement to the link state update message. Defaults to setting the link state type to 'router'.

type PIMHeader

type PIMHeader struct {
	// contains filtered or unexported fields
}

PIMHeader is a PIM packet header.

func NewPIMHeader

func NewPIMHeader() *PIMHeader

NewPIMHeader returns a new PIM header. The header is initialized with a default message type of 'Hello'.

func (*PIMHeader) Hello

func (h *PIMHeader) Hello() *PIMHello

Hello sets the PIMHeader message type to a hello message.

type PIMHello

type PIMHello struct {
	// contains filtered or unexported fields
}

PIMHello is a PIM hello message.

type PMD

type PMD opb.Port_Pmd

PMD is a Physical Medium Dependent .

func (PMD) String

func (pmd PMD) String() string

type Port

type Port struct {
	// contains filtered or unexported fields
}

Port represents a port.

func (*Port) CardModel

func (p *Port) CardModel() string

CardModel returns the card model.

func (*Port) Device

func (p *Port) Device() *Device

Device returns the device that owns the port.

func (*Port) ID

func (p *Port) ID() string

ID returns the port ID.

func (*Port) Name

func (p *Port) Name() string

Name returns the port name.

func (*Port) PMD

func (p *Port) PMD() PMD

PMD returns the Physical Medium Dependent.

func (*Port) Speed

func (p *Port) Speed() Speed

Speed returns the port speed.

func (*Port) String

func (p *Port) String() string

type RSVPHeader

type RSVPHeader struct {
	// contains filtered or unexported fields
}

RSVPHeader is an RSVP packet header.

func NewRSVPHeader

func NewRSVPHeader() *RSVPHeader

NewRSVPHeader returns a new RSVP header. The header is initialized with a default message type of 'Path'.

func (*RSVPHeader) WithMessageTypePath

func (h *RSVPHeader) WithMessageTypePath() *RSVPHeader

WithMessageTypePath sets the message type of the RSVP header to 'Path'.

func (*RSVPHeader) WithMessageTypeResv

func (h *RSVPHeader) WithMessageTypeResv() *RSVPHeader

WithMessageTypeResv sets the message type of the RSVP header to 'Resv'.

func (*RSVPHeader) WithRefreshReductionCapable

func (h *RSVPHeader) WithRefreshReductionCapable(rr bool) *RSVPHeader

WithRefreshReductionCapable sets the refresh reduction bit of the RSVP header.

func (*RSVPHeader) WithTTL

func (h *RSVPHeader) WithTTL(ttl uint32) *RSVPHeader

WithTTL sets the TTL of the RSVP header.

func (*RSVPHeader) WithVersion

func (h *RSVPHeader) WithVersion(v uint32) *RSVPHeader

WithVersion sets the version for the RSVP header.

type SetLACPState

type SetLACPState struct {
	// contains filtered or unexported fields
}

SetLACPState is an action to set the state of LACP on an ATE.

func (*SetLACPState) Send

func (s *SetLACPState) Send(t testing.TB)

Send sends the SetLACPState action to the ATE.

func (*SetLACPState) String

func (s *SetLACPState) String() string

func (*SetLACPState) WithEnabled

func (s *SetLACPState) WithEnabled(enabled bool) *SetLACPState

WithEnabled sets the desired LACP state of the port.

func (*SetLACPState) WithPort

func (s *SetLACPState) WithPort(port *Port) *SetLACPState

WithPort sets the port whose LACP state will be changed.

type SetPortState

type SetPortState struct {
	// contains filtered or unexported fields
}

SetPortState is an action to set the state of a port on an ATE.

func (*SetPortState) Send

func (s *SetPortState) Send(t testing.TB)

Send sends the SetPortState action to the ATE.

func (*SetPortState) String

func (s *SetPortState) String() string

func (*SetPortState) WithEnabled

func (s *SetPortState) WithEnabled(enabled bool) *SetPortState

WithEnabled sets the desired state of the port.

func (*SetPortState) WithPort

func (s *SetPortState) WithPort(port *Port) *SetPortState

WithPort sets the port whose state will be changed.

type Speed

type Speed int

Speed is a port speed.

type TCPHeader

type TCPHeader struct {
	// contains filtered or unexported fields
}

TCPHeader is a Transmission Control Protocol packet header.

func NewTCPHeader

func NewTCPHeader() *TCPHeader

NewTCPHeader returns a new TCP header. The header is initialized with none of its properties specified.

func (*TCPHeader) DstPortRange

func (h *TCPHeader) DstPortRange() *ixnet.UIntRange

DstPortRange returns the range of destination ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.

func (*TCPHeader) SrcPortRange

func (h *TCPHeader) SrcPortRange() *ixnet.UIntRange

SrcPortRange returns the range of source ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.

func (*TCPHeader) WithDstPort

func (h *TCPHeader) WithDstPort(port uint16) *TCPHeader

WithDstPort sets the destination port of the TCP header to the specified value. To generate a range of destination ports, use DstPortRange() instead.

func (*TCPHeader) WithSequenceNumber

func (h *TCPHeader) WithSequenceNumber(seq uint32) *TCPHeader

WithSequenceNumber sets sequence number of the TCP header.

func (*TCPHeader) WithSrcPort

func (h *TCPHeader) WithSrcPort(port uint16) *TCPHeader

WithSrcPort sets the source port of the TCP header to the specified value. To generate a range of source ports, use SrcPortRange() instead.

type Topology

type Topology struct {
	// contains filtered or unexported fields
}

Topology is the ATE Topology API.

func (*Topology) New

func (tp *Topology) New() *ATETopology

New returns a new ATE topology.

func (*Topology) String

func (tp *Topology) String() string

type Traffic

type Traffic struct {
	// contains filtered or unexported fields
}

Traffic is the ATE Traffic API.

func (*Traffic) NewFlow

func (tr *Traffic) NewFlow(name string) *Flow

NewFlow returns a new Traffic flow. By default the flow will have the following properties:

frame size: max(64, sizeof(headers) + (4 * number of ethernet headers))
frame rate: 10% of the line rate
header addresses inferred: true

func (*Traffic) Start

func (tr *Traffic) Start(t testing.TB, flows ...*Flow)

Start pushes and starts provided traffic flows on the ATE. If no flows are provided, starts the previously pushed flows.

func (*Traffic) Stop

func (tr *Traffic) Stop(t testing.TB)

Stop stops all traffic flows on the ATE.

func (*Traffic) String

func (tr *Traffic) String() string

func (*Traffic) Update

func (tr *Traffic) Update(t testing.TB, flows ...*Flow)

Update modifies already-running traffic on the ATE. Only frame rate and frame size are updated while traffic is running. Frame size can only be updated to a frame size of the same type.

type Transmission

type Transmission struct {
	// contains filtered or unexported fields
}

Transmission represents the transmission pattern of a flow.

func (*Transmission) WithInterburstGapBytes

func (t *Transmission) WithInterburstGapBytes(bytes uint32) *Transmission

WithInterburstGapBytes sets the gap (in bytes) between transmission bursts. May only be set when the transmission pattern is burst.

func (*Transmission) WithInterburstGapNanoseconds

func (t *Transmission) WithInterburstGapNanoseconds(nanoseconds uint32) *Transmission

WithInterburstGapNanoseconds sets the gap (in nanoseconds) between transmission bursts. May only be set when the transmission pattern is burst.

func (*Transmission) WithMinGapBytes

func (t *Transmission) WithMinGapBytes(minPacketGapBytes uint32) *Transmission

WithMinGapBytes sets the minimum gap between transmitted packets.

func (*Transmission) WithPacketsPerBurst

func (t *Transmission) WithPacketsPerBurst(packetsPerBurst uint32) *Transmission

WithPacketsPerBurst sets the number of packets to transmit per burst. May only be set when the transmission pattern is burst.

func (*Transmission) WithPatternBurst

func (t *Transmission) WithPatternBurst() *Transmission

WithPatternBurst configures the transmission to send packets in bursts.

func (*Transmission) WithPatternContinuous

func (t *Transmission) WithPatternContinuous() *Transmission

WithPatternContinuous configures the transmission to send packets continuously.

func (*Transmission) WithPatternFixedDuration

func (t *Transmission) WithPatternFixedDuration(secs uint32) *Transmission

WithPatternFixedDuration configures the transmission to send a specified number of seconds.

func (*Transmission) WithPatternFixedPacketCount

func (t *Transmission) WithPatternFixedPacketCount(packetsCount uint32) *Transmission

WithPatternFixedPacketCount configures the transmission to send a specified number of packets.

type UDPHeader

type UDPHeader struct {
	// contains filtered or unexported fields
}

UDPHeader is a User Datagram Protocol packet header.

func NewUDPHeader

func NewUDPHeader() *UDPHeader

NewUDPHeader returns a new UDP header. The header is initialized with none of its properties specified.

func (*UDPHeader) DstPortRange

func (h *UDPHeader) DstPortRange() *ixnet.UIntRange

DstPortRange returns the range of destination ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.

func (*UDPHeader) SrcPortRange

func (h *UDPHeader) SrcPortRange() *ixnet.UIntRange

SrcPortRange returns the range of source ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.

func (*UDPHeader) WithDstPort

func (h *UDPHeader) WithDstPort(port uint16) *UDPHeader

WithDstPort sets the destination port of the TCP header to the specified value. To generate a range of destination ports, use DstPortRange() instead.

func (*UDPHeader) WithSrcPort

func (h *UDPHeader) WithSrcPort(port uint16) *UDPHeader

WithSrcPort sets the source port of the TCP header to the specified value. To generate a range of source ports, use SrcPortRange() instead.

type Vendor

type Vendor int

Vendor is a DUT vendor.

func (Vendor) String

func (v Vendor) String() string

String returns the name of the vendor.

Directories

Path Synopsis
Package binding holds the Ondatra binding interface.
Package binding holds the Ondatra binding interface.
grpcutil
Package grpcutil contains gRPC utilities useful to binding implementations.
Package grpcutil contains gRPC utilities useful to binding implementations.
grpcutil/testservice
Package testservice provides an interface for testing with the Test service.
Package testservice provides an interface for testing with the Test service.
ixweb
Package ixweb provides a connection to the Ixia Web Platform.
Package ixweb provides a connection to the Ixia Web Platform.
portgraph
Package portgraph searches for a graph that satisfies a set of constraints.
Package portgraph searches for a graph that satisfies a set of constraints.
Package config contains APIs for configuring DUTs.
Package config contains APIs for configuring DUTs.
Package debug contains the Ondatra debug API.
Package debug contains the Ondatra debug API.
Package eventlis provides an event listener API.
Package eventlis provides an event listener API.
Package fakebind implements a fake testbed binding, backed by a fake SSH server.
Package fakebind implements a fake testbed binding, backed by a fake SSH server.
Package gnmi contains test-friendly gNMI funcs.
Package gnmi contains test-friendly gNMI funcs.
migrator
The migrator command contains a runnable version of the analyzer.
The migrator command contains a runnable version of the analyzer.
migrator/gnmifix
Package gnmifix fixes deprecated Ondatra Telemetry code.
Package gnmifix fixes deprecated Ondatra Telemetry code.
oc
Package oc is a generated package which contains definitions of structs which represent a YANG schema.
Package oc is a generated package which contains definitions of structs which represent a YANG schema.
oc/acl
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/ateflow
Package ateflow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package ateflow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/definedsets
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/gnmicollectormetadata
Package gnmicollectormetadata is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package gnmicollectormetadata is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/interfaces
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/keychain
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/lacp
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/lldp
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/networkinstance
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/ocpath
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/platform
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/qos
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/routingpolicy
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/sampling
Package sampling is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package sampling is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/system
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
oc/terminaldevice
Package terminaldevice is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package terminaldevice is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg
Package otg is a generated package which contains definitions of structs which represent a YANG schema.
Package otg is a generated package which contains definitions of structs which represent a YANG schema.
otg/bgp
Package bgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package bgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/discovery
Package discovery is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package discovery is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/flow
Package flow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package flow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/isis
Package isis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package isis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/lacp
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/lag
Package lag is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package lag is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/lldp
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/otgpath
Package otgpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package otgpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/port
Package port is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package port is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
otg/rsvp
Package rsvp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package rsvp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
internal
ate
Package ate controls automated test equipment (ATE) for ONDATRA tests.
Package ate controls automated test equipment (ATE) for ONDATRA tests.
display
Package display prints and receives input from the console.
Package display prints and receives input from the console.
events
Package events prints and responds to test events.
Package events prints and responds to test events.
fakegnmi
Package fakegnmi implements a fake GNMI server with the ability to stub responses.
Package fakegnmi implements a fake GNMI server with the ability to stub responses.
flags
Package flags defines the flags accepted by Ondatra tests.
Package flags defines the flags accepted by Ondatra tests.
ixconfig
Package ixconfig contains generated IxNetwork structs (along with some hand-written helper code) and implements an Ixia JSON config client using those structs.
Package ixconfig contains generated IxNetwork structs (along with some hand-written helper code) and implements an Ixia JSON config client using those structs.
ixgnmi
Package ixgnmi provides a GNMI client for Ixia.
Package ixgnmi provides a GNMI client for Ixia.
junitxml
Package junitxml provides a mechanism to convert a streamed test log to JUnit XML.
Package junitxml provides a mechanism to convert a streamed test log to JUnit XML.
orderedmap
Package orderedmap provides a map that remembers the order keys were inserted.
Package orderedmap provides a map that remembers the order keys were inserted.
rawapis
Package rawapis centralizes the management of Ondatra raw APIs.
Package rawapis centralizes the management of Ondatra raw APIs.
testbed
Package testbed implements Testing API for a testbed.
Package testbed implements Testing API for a testbed.
Package ixnet provides an IxNetwork API.
Package ixnet provides an IxNetwork API.
Package knebind provides an Ondatra binding for KNE devices.
Package knebind provides an Ondatra binding for KNE devices.
init
Package init installs the Ondatra binding for testing with kne clusters.
Package init installs the Ondatra binding for testing with kne clusters.
solver
Package solver creates solutions from devices and topologies.
Package solver creates solutions from devices and topologies.
Package logging utilities for logging from Ondatra tests.
Package logging utilities for logging from Ondatra tests.
Package netutil provides network-related helper functions for testing.
Package netutil provides network-related helper functions for testing.
Package otg provides an API to Open Traffic Generator.
Package otg provides an API to Open Traffic Generator.
Package proxy provide a standard grpc proxy for use with Ondatra.
Package proxy provide a standard grpc proxy for use with Ondatra.
grpcproxy
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections.
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections.
httpovergrpc
Package httpovergrpc implements a http/https service over grpc transport.
Package httpovergrpc implements a http/https service over grpc transport.
Package raw provides raw client APIs.
Package raw provides raw client APIs.
Package report provides ways to customize the JUnit XML report.
Package report provides ways to customize the JUnit XML report.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL