Documentation
¶
Overview ¶
Package isisscale provides helper functions for the ISIS scale tests.
Index ¶
- func CalculateRoutesCount(isisBlocks *otgconfighelpers.ISISOTGBlock, afi string) int
- func CheckIntsOpState(t *testing.T, dut *ondatra.DUTDevice, waitTime time.Duration) (int, bool)
- func CheckTraffic(t *testing.T, ate *ondatra.ATEDevice, trafficFlows []gosnappi.Flow) []error
- func ClearTestingConfig(t *testing.T, dut *ondatra.DUTDevice, defaultNetworkInstance string)
- func CreateATEData(lagToErouterMap map[int][]*otgconfighelpers.AteEmulatedRouterData) *otgconfighelpers.ATEData
- func CreateATEEmulatedRouterData(t *testing.T, dutAggregateInterfacesData []*cfgplugins.DUTAggData) []*otgconfighelpers.AteEmulatedRouterData
- func CreateDUTAggregateInterfacesData(t *testing.T, aggregatesCount int, subInterfacesCountPerAggregate int, ...) []*cfgplugins.DUTAggData
- func FindISISActiveLSPCount(t *testing.T, dut *ondatra.DUTDevice, waitTime time.Duration, nominalCount int) (int, bool)
- func FindISISAdjCount(t *testing.T, dut *ondatra.DUTDevice, timeout time.Duration, nominalCount int) (int, bool)
- func FindISISAdjCountNonStream(t *testing.T, dut *ondatra.DUTDevice, timeout time.Duration, nominalCount int) (int, bool)
- func FindISISLSPCount(t *testing.T, dut *ondatra.DUTDevice, waitTime time.Duration, nominalCount int) (int, bool)
- func FindProtocolRouteCount(t *testing.T, dut *ondatra.DUTDevice, afi oc.E_Types_ADDRESS_FAMILY, ...) (int, bool)
- func FindProtocolSummaryRouteCount(t *testing.T, dut *ondatra.DUTDevice, afi oc.E_Types_ADDRESS_FAMILY, ...) int
- func SetupTest(t *testing.T, testInfo *TestData) *ondatra.DUTDevice
- type DutData
- type TestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateRoutesCount ¶
func CalculateRoutesCount(isisBlocks *otgconfighelpers.ISISOTGBlock, afi string) int
CalculateRoutesCount calculates the number of routes in the block.
func CheckIntsOpState ¶
CheckIntsOpState checks the operational state of the interfaces participating in ISIS. It returns the number of interfaces that are operationally up and a boolean indicating whether the check was successful.
func CheckTraffic ¶
CheckTraffic checks the traffic loss for the given traffic flows. It checks the outOctets for each flow and makes sure it is not zero. It also checks the loss percent for each flow and makes sure it is 0.
func ClearTestingConfig ¶
ClearTestingConfig clears the testing config from the DUT. It removes the ISIS protocol config, LACP config, interface config, and aggregate id config from the DUT.
func CreateATEData ¶
func CreateATEData(lagToErouterMap map[int][]*otgconfighelpers.AteEmulatedRouterData) *otgconfighelpers.ATEData
CreateATEData creates the ATE data for the ISIS scale test.
func CreateATEEmulatedRouterData ¶
func CreateATEEmulatedRouterData(t *testing.T, dutAggregateInterfacesData []*cfgplugins.DUTAggData) []*otgconfighelpers.AteEmulatedRouterData
CreateATEEmulatedRouterData creates the ATE emulated router data for the test. The function takes the following parameters:
- dutAggregateInterfacesData: The DUT aggregate interfaces data.
The function returns a slice of AteEmulatedRouterData objects, each representing a single ATE emulated router.
func CreateDUTAggregateInterfacesData ¶
func CreateDUTAggregateInterfacesData(t *testing.T, aggregatesCount int, subInterfacesCountPerAggregate int, initialVlanID int, initialIPv4Address net.IP, initialIPv6Address net.IP) []*cfgplugins.DUTAggData
CreateDUTAggregateInterfacesData creates the DUT aggregate interfaces data for the test. The function takes the following parameters:
- aggregatesCount: The number of aggregates to create.
- subInterfacesCountPerAggregate: The number of sub-interfaces to create per aggregate.
- initialVlanID: The initial VLAN ID to use for the sub-interfaces.
- initialIPv4Address: The initial IPv4 address to use for the sub-interfaces.
- initialIPv6Address: The initial IPv6 address to use for the sub-interfaces.
The function returns a slice of DUTAggData objects, each representing a single aggregate interface.
func FindISISActiveLSPCount ¶
func FindISISActiveLSPCount(t *testing.T, dut *ondatra.DUTDevice, waitTime time.Duration, nominalCount int) (int, bool)
FindISISActiveLSPCount finds the number of ISIS active LSPs that are up. It does this by watching the ISIS LSP lifetime periodically in a STREAM telemetry call and counting the number of LSPs that are up that has a lifetime greater than 1 second. It returns the number of active LSPs and a boolean indicating whether the count reached the nominal count or not.
func FindISISAdjCount ¶
func FindISISAdjCount(t *testing.T, dut *ondatra.DUTDevice, timeout time.Duration, nominalCount int) (int, bool)
FindISISAdjCount finds the number of ISIS adjacencies that are up. It does this by watching the ISIS interface state periodically in a STREAM telemetry call and counting the number of adjacencies that are up. It returns the number of adjacencies that are up and a boolean indicating whether the count reached the nominal count or not.
func FindISISAdjCountNonStream ¶
func FindISISAdjCountNonStream(t *testing.T, dut *ondatra.DUTDevice, timeout time.Duration, nominalCount int) (int, bool)
FindISISAdjCountNonStream finds the number of ISIS adjacencies that are up. It does this by polling the ISIS interface state periodically in a ONCE telemetry call and counting the number of adjacencies that are up. It returns the number of adjacencies that are up and a boolean indicating whether the count reached the nominal count or not.
func FindISISLSPCount ¶
func FindISISLSPCount(t *testing.T, dut *ondatra.DUTDevice, waitTime time.Duration, nominalCount int) (int, bool)
FindISISLSPCount finds the number of ISIS LSPs. It does this by watching the ISIS LSP count periodically in a STREAM telemetry call and counting the number of LSPs. It returns the number of LSPs and a boolean indicating whether the count reached the nominal count or not.
func FindProtocolRouteCount ¶
func FindProtocolRouteCount(t *testing.T, dut *ondatra.DUTDevice, afi oc.E_Types_ADDRESS_FAMILY, protocol oc.E_PolicyTypes_INSTALL_PROTOCOL_TYPE, waitTime time.Duration, nominalCount int) (int, bool)
FindProtocolRouteCount finds the number of routes for the given protocol and address family. It does this by watching the AFT entry state periodically in a STREAM telemetry call and counting the number of routes. It returns the number of routes and a boolean indicating whether the count reached the nominal count or not.
func FindProtocolSummaryRouteCount ¶
func FindProtocolSummaryRouteCount(t *testing.T, dut *ondatra.DUTDevice, afi oc.E_Types_ADDRESS_FAMILY, protocol oc.E_PolicyTypes_INSTALL_PROTOCOL_TYPE, waitTime time.Duration, nominalCount int) int
FindProtocolSummaryRouteCount finds the number of routes for the given protocol and address family. It does this by watching the AFT summary periodically in a STREAM telemetry call and counting the number of routes. It returns the number of routes and a boolean indicating whether the count reached the nominal count or not.
Types ¶
type DutData ¶
type DutData struct {
IsisData *cfgplugins.ISISGlobalParams
Lags []*cfgplugins.DUTAggData
}
DutData contains the DUT data for the ISIS scale test.