Documentation ¶
Overview ¶
Package otgvalidationhelpers provides helper functions to validate OTG attributes for OTG tests.
Index ¶
- type FlowParams
- type InterfaceParams
- type OTGValidation
- func (v *OTGValidation) IsIPv4Interfaceresolved(t *testing.T, ate *ondatra.ATEDevice) error
- func (v *OTGValidation) IsIPv6Interfaceresolved(t *testing.T, ate *ondatra.ATEDevice) error
- func (v *OTGValidation) ValidateLossOnFlows(t *testing.T, ate *ondatra.ATEDevice) error
- func (v *OTGValidation) ValidatePortIsActive(t *testing.T, ate *ondatra.ATEDevice) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlowParams ¶
FlowParams is a struct to hold OTG flow parameters.
type InterfaceParams ¶
InterfaceParams is a struct to hold OTG interface parameters.
type OTGValidation ¶
type OTGValidation struct { Interface *InterfaceParams Flow *FlowParams }
OTGValidation is a struct to hold OTG validation parameters.
params := &OTGValidation{ Interface: &InterfaceParams{Names: []string{"Interface1", "Interface2"}, Ports: []string{"Port1", "Port2"}}, Flow: &FlowParams{Name: "flow1", TolerancePct: 0.5}, } if err := params.ValidatePortIsActive(t, ate); err != nil { t.Errorf("ValidatePortIsActive(): got err: %q, want nil", err) } if err := params.IsIPv4Interfaceresolved(t, ate); err != nil { t.Errorf("IsIPv4Interfaceresolved(): got err: %q, want nil", err) } if err := params.ValidateLossOnFlows(t, ate); err != nil { t.Errorf("ValidateLossOnFlows(): got err: %q, want nil", err) }
func (*OTGValidation) IsIPv4Interfaceresolved ¶
IsIPv4Interfaceresolved validates that the IPv4 interface is resolved based on the interface configured using otgconfighelpers.
func (*OTGValidation) IsIPv6Interfaceresolved ¶
IsIPv6Interfaceresolved validates that the IPv6 interface is resolved based on the interface configured using otgconfighelpers.
func (*OTGValidation) ValidateLossOnFlows ¶
ValidateLossOnFlows validates the percentage of traffic loss on the flows.
func (*OTGValidation) ValidatePortIsActive ¶
ValidatePortIsActive validates the OTG port status.