Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DP-1.7: Adding test support for Nokia #2002

Merged
merged 15 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ platform_exceptions: {
vendor: NOKIA
}
deviations: {
explicit_interface_ref_definition: true
interface_enabled: true
explicit_port_speed: true
explicit_interface_in_default_vrf: true
qos_queue_requires_id: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func TestOneSPQueueTraffic(t *testing.T) {
var tolerance float32 = 2.0

queues := netutil.CommonTrafficQueues(t, dut)

if dut.Vendor() == ondatra.JUNIPER {
queues.AF4 = "5"
}
Expand Down Expand Up @@ -787,6 +788,14 @@ func ConfigureDUTIntf(t *testing.T, dut *ondatra.DUTDevice) {
a := s.GetOrCreateAddress(intf.ipAddr)
a.PrefixLength = ygot.Uint8(intf.prefixLen)
gnmi.Replace(t, dut, gnmi.OC().Interface(intf.intfName).Config(), i)
if deviations.ExplicitInterfaceInDefaultVRF(dut) {
fptest.AssignToNetworkInstance(t, dut, intf.intfName, deviations.DefaultNetworkInstance(dut), 0)
}
}
if deviations.ExplicitPortSpeed(dut) {
fptest.SetPortSpeed(t, dp1)
fptest.SetPortSpeed(t, dp2)
fptest.SetPortSpeed(t, dp3)
}
}

Expand All @@ -798,6 +807,16 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
d := &oc.Root{}
q := d.GetOrCreateQos()
queues := netutil.CommonTrafficQueues(t, dut)

if deviations.QOSQueueRequiresID(dut) {
queueNames := []string{queues.NC1, queues.AF4, queues.AF3, queues.AF2, queues.AF1, queues.BE0, queues.BE1}
for i, queue := range queueNames {
q1 := q.GetOrCreateQueue(queue)
q1.Name = ygot.String(queue)
queueid := len(queueNames) - i
q1.QueueId = ygot.Uint8(uint8(queueid))
}
}
if dut.Vendor() == ondatra.JUNIPER {
queues.AF4 = "5"
}
Expand Down Expand Up @@ -1146,6 +1165,7 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
gnmi.Replace(t, dut, gnmi.OC().Qos().Config(), q)
}
}

func ConfigureCiscoQos(t *testing.T, dut *ondatra.DUTDevice) {
t.Helper()
dp1 := dut.Port(t, "port1")
Expand Down
7 changes: 6 additions & 1 deletion internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func ISISCounterPartChangesUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIsisCounterPartChangesUnsupported()
}

// SkipTCPNegotiatedMssCheck returns true for devices that do not
// SkipTCPNegotiatedMSSCheck returns true for devices that do not
// support telemetry to check negotiated tcp mss value.
func SkipTCPNegotiatedMSSCheck(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSkipTcpNegotiatedMssCheck()
Expand All @@ -620,3 +620,8 @@ func InterfaceLoopbackModeRawGnmi(dut *ondatra.DUTDevice) bool {
func ISISLspMetadataLeafsUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIsisLspMetadataLeafsUnsupported()
}

// QOSQueueRequiresID returns if device should configure QOS queue along with queue-id
func QOSQueueRequiresID(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetQosQueueRequiresId()
}
2 changes: 2 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ message Metadata {
// Devices don't support ISIS-Lsp metadata paths: checksum, sequence-number,
// remaining-lifetime.
bool isis_lsp_metadata_leafs_unsupported = 111;
// QOS queue requires configuration with queue-id
bool qos_queue_requires_id = 112;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 90;
Expand Down
86 changes: 49 additions & 37 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading