Skip to content

Commit

Permalink
Merge branch 'main' into ANCX_QOS13
Browse files Browse the repository at this point in the history
  • Loading branch information
charantejag504 authored Sep 11, 2023
2 parents 80ff10b + 981ca56 commit 2604010
Show file tree
Hide file tree
Showing 18 changed files with 571 additions and 51 deletions.
48 changes: 6 additions & 42 deletions .github/ISSUE_TEMPLATE/new_test_requirement.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
---
name: New featureprofiles test requirement
about: Use this template to document the requirements for a new test to be implemented.
about: Use this template to create an issue to assign and track implemenation of the code for a test.
title: ''
labels: enhancement
assignees: ''

---

# TestID-x.y: Short name of test here

## Summary

Write a few sentences or paragraphs describing the purpose and scope of the test.

## Procedure

* Test #1 - Name of test
* Step 1
* Step 2
* Step 3

* Test #2 - New of test
* Step 1
* Step 2
* Step 3


## Config Parameter Coverage

Add list of OpenConfig 'config' paths used in this test, if any.

## Telemetry Parameter Coverage

Add list of OpenConfig 'state' paths used in this test, if any.

## Protocol/RPC Parameter Coverage
# Request for New Test Code Implementation Instructions

Add list of OpenConfig RPC's (gNMI, gNOI, gNSI, gRIBI) used in the list
* The label 'enhancement' is automatically set by this template.
* Add a label for the test priority according to the test requirements. (p0, p1, p2)
* Add a link in this issue description to the README.md for the test requirements. For example:

For example:
* gNMI
* Set
* Subscribe
* gNOI
* System
* KillProcess
* Healthz
* Get
* Check
* Artifact
Implement code for [Test name here](https://github.com/openconfig/featureprofiles/blob/main/feature/example/tests/topology_test/README.md)
1 change: 1 addition & 0 deletions cloudbuild/virtual.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function metadata_kne_topology() {
kne_topology_file["TESTBED_DUT_ATE_2LINKS"]="${topo_prefix}/dutate.textproto"
kne_topology_file["TESTBED_DUT_ATE_4LINKS"]="${topo_prefix}/dutate.textproto"
kne_topology_file["TESTBED_DUT_ATE_9LINKS_LAG"]="${topo_prefix}/dutate_lag.textproto"
kne_topology_file["TESTBED_DUT_DUT_ATE_2LINKS"]="${topo_prefix}/dutdutate.textproto"
for p in "${!kne_topology_file[@]}"; do
if grep -q "testbed.*${p}$" "${metadata_test_path}"/metadata.textproto; then
echo "${kne_topology_file[${p}]}"
Expand Down
71 changes: 71 additions & 0 deletions doc/test-requirements-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: New featureprofiles test requirement
about: Use this template to document the requirements for a new test to be implemented.
title: ''
labels: enhancement
assignees: ''

---

# Instructions for this template

Below is the required template for writing test requirements. Good examples of test
requirements include:

* [TE-3.7: Base Hierarchical NHG Update](/feature/gribi/otg_tests/base_hierarchical_nhg_update/README.md)
* [gNMI-1.13: Telemetry: Optics Power and Bias Current](https://github.com/openconfig/featureprofiles/blob/main/feature/platform/tests/optics_power_and_bias_current_test/README.md)
* [RT-5.1: Singleton Interface](https://github.com/openconfig/featureprofiles/blob/main/feature/interface/singleton/otg_tests/singleton_test/README.md)

# TestID-x.y: Short name of test here

## Summary

Write a few sentences or paragraphs describing the purpose and scope of the test.

## Testbed type

* Specify the .testbed topology file from the [topologies](https://github.com/openconfig/featureprofiles/tree/main/topologies) folder to be used with this test

## Procedure

* Sub Test #1 - Name of test
* Step 1
* Step 2
* Validation and pass fail criteria

* Sub Test #2 - New of test
* Step 1
* Step 2
* Validation and pass fail criteria

## Config Parameter Coverage

Add list of OpenConfig 'config' paths used in this test, if any.

## Telemetry Parameter Coverage

Add list of OpenConfig 'state' paths used in this test, if any.

## Protocol/RPC Parameter Coverage

Add list of OpenConfig RPC's (gNMI, gNOI, gNSI, gRIBI) used in the list, if any.

For example:

* gNMI
* Set
* Subscribe
* gNOI
* System
* KillProcess
* Healthz
* Get
* Check
* Artifact

## Required DUT platform

* Specify the minimum DUT-type:
* MFF - A modular form factor device containing LINECARDs, FABRIC and redundant CONTROLLER_CARD components
* FFF - fixed form factor
* vRX - virtual router device
48 changes: 48 additions & 0 deletions feature/platform/transceiver/ZR_pre-fec_ber_test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# gNMI-1.20: Telemetry: 400ZR Optics Pre-FEC(Forward Error Correction) BER(Bit Error Rate)

## Summary

Validate 400ZR optics module reports pre-FEC bit error rate performance data.

## Procedure

* Connect two ZR interfaces using a duplex LC fiber jumper such that TX
output power of one is the RX input power of the other module.
* To establish a point to point ZR link ensure the following:
* Both transceivers state is enabled
* Both transceivers are set to a valid target TX output power
example -10 dBm
* Both transceivers are tuned to a valid centre frequency
example 193.1 THz
* With the link ZR link established as explained above, verify that the
following ZR transceiver telemetry paths exist and are streamed for both
the ZR optics
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/instant
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/avg
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/min
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/max

**Note:** For min, max, and avg values, 10 second sampling is preferred. If
10 seconds is not supported, the sampling interval used must be
communicated.


* Verify that the optics pre-FEC BER is updated after the interface flaps.

* Enable a pair of ZR interfaces on the DUT as explained above.
* Verify the ZR optics pre FEC BER PMs are in the normal range.
* Disable or shut down the interface on the DUT.
* Re-enable the interfaces on the DUT.
* Verify the ZR optics pre FEC PM is updated to the value in the normal
range again. Typical expected value should be less than 1.2E-2

## Config Parameter coverage

* /components/component/oc-transceiver:transceiver/oc-transceiver/config/enabled

## Telemetry Parameter coverage

* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/instant
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/avg
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/min
* /terminal-device/logical-channels/channel/otn/state/pre-fec-ber/max
4 changes: 3 additions & 1 deletion feature/qos/ate_tests/qos_basic_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,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_octets: true
}
}
platform_exceptions: {
Expand Down
26 changes: 26 additions & 0 deletions feature/qos/ate_tests/qos_basic_test/qos_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,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 @@ -525,6 +533,15 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
q := d.GetOrCreateQos()
queues := netutil.CommonTrafficQueues(t, dut)

if dut.Vendor() == ondatra.NOKIA {
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 and queue name config")
forwardingGroups := []struct {
desc string
Expand Down Expand Up @@ -893,19 +910,28 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
ecnProfile: "ECNProfile",
}}

maxBurstSize := uint32(268435456)
t.Logf("qos output interface config: %v", schedulerIntfs)
for _, tc := range schedulerIntfs {
i := q.GetOrCreateInterface(dp3.Name())
i.SetInterfaceId(dp3.Name())
i.GetOrCreateInterfaceRef().Interface = ygot.String(dp3.Name())
output := i.GetOrCreateOutput()
schedulerPolicy := output.GetOrCreateSchedulerPolicy()
schedulerPolicy.SetName(tc.scheduler)
queue := output.GetOrCreateQueue(tc.queueName)
queue.SetName(tc.queueName)
queue.SetQueueManagementProfile(tc.ecnProfile)
if dut.Vendor() == ondatra.NOKIA {
bufferAllocation := q.GetOrCreateBufferAllocationProfile("ballocprofile")
bq := bufferAllocation.GetOrCreateQueue(tc.queueName)
bq.SetStaticSharedBufferLimit(maxBurstSize)
output.SetBufferAllocationProfile("ballocprofile")
}
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
4 changes: 3 additions & 1 deletion feature/qos/otg_tests/qos_basic_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,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_octets: true
}
}
platform_exceptions: {
Expand Down
29 changes: 25 additions & 4 deletions feature/qos/otg_tests/qos_basic_test/qos_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,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 @@ -587,6 +595,15 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
q := d.GetOrCreateQos()
queues := netutil.CommonTrafficQueues(t, dut)

if dut.Vendor() == ondatra.NOKIA {
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 and queue name config")
forwardingGroups := []struct {
desc string
Expand All @@ -596,10 +613,6 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
desc: "forwarding-group-BE1",
queueName: queues.BE1,
targetGroup: "target-group-BE1",
}, {
desc: "forwarding-group-BE0",
queueName: queues.BE0,
targetGroup: "target-group-BE0",
}, {
desc: "forwarding-group-AF1",
queueName: queues.AF1,
Expand Down Expand Up @@ -955,16 +968,24 @@ func ConfigureQoS(t *testing.T, dut *ondatra.DUTDevice) {
ecnProfile: "ECNProfile",
}}

maxBurstSize := uint32(268435456)
t.Logf("qos output interface config: %v", schedulerIntfs)
for _, tc := range schedulerIntfs {
i := q.GetOrCreateInterface(dp3.Name())
i.SetInterfaceId(dp3.Name())
i.GetOrCreateInterfaceRef().Interface = ygot.String(dp3.Name())
output := i.GetOrCreateOutput()
schedulerPolicy := output.GetOrCreateSchedulerPolicy()
schedulerPolicy.SetName(tc.scheduler)
queue := output.GetOrCreateQueue(tc.queueName)
queue.SetName(tc.queueName)
queue.SetQueueManagementProfile(tc.ecnProfile)
if dut.Vendor() == ondatra.NOKIA {
bufferAllocation := q.GetOrCreateBufferAllocationProfile("ballocprofile")
bq := bufferAllocation.GetOrCreateQueue(tc.queueName)
bq.SetStaticSharedBufferLimit(maxBurstSize)
output.SetBufferAllocationProfile("ballocprofile")
}
gnmi.Replace(t, dut, gnmi.OC().Qos().Config(), q)
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/fptest/runtests.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func testbedPathFromMetadata() (string, error) {
mpb.Metadata_TESTBED_DUT_ATE_2LINKS: "atedut_2.testbed",
mpb.Metadata_TESTBED_DUT_ATE_4LINKS: "atedut_4.testbed",
mpb.Metadata_TESTBED_DUT_ATE_9LINKS_LAG: "atedut_9_lag.testbed",
mpb.Metadata_TESTBED_DUT_DUT_ATE_2LINKS: "dutdutate.testbed",
}
testbedFile, ok := testbedToFile[testbed]
if !ok {
Expand Down
1 change: 1 addition & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message Metadata {
TESTBED_DUT_ATE_2LINKS = 3;
TESTBED_DUT_ATE_4LINKS = 4;
TESTBED_DUT_ATE_9LINKS_LAG = 5;
TESTBED_DUT_DUT_ATE_2LINKS = 6;
}
// Testbed on which the test is intended to run.
Testbed testbed = 4;
Expand Down
Loading

0 comments on commit 2604010

Please sign in to comment.