Skip to content

Commit

Permalink
DP-1.9: Adding test support for Nokia (#2004)
Browse files Browse the repository at this point in the history
1. Updating ConfigureQoS for QoS OC configuration for Nokia2. Adding function (SetForwardingGroupWithFabricPriority) to configure ForwardingGroup with Fabric-priority in qoscfg.go
  • Loading branch information
trathod1 authored Sep 22, 2023
1 parent 3978816 commit e11885a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion feature/qos/otg_tests/wrr_traffic_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,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
17 changes: 17 additions & 0 deletions feature/qos/otg_tests/wrr_traffic_test/wrr_traffic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,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 @@ -983,6 +991,15 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
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))
}
}
t.Logf("Create qos forwarding groups config")
forwardingGroups := []struct {
desc string
Expand Down

0 comments on commit e11885a

Please sign in to comment.