Skip to content

Commit

Permalink
Merge branch 'openconfig:main' into certz1
Browse files Browse the repository at this point in the history
  • Loading branch information
priyacj authored Jan 23, 2025
2 parents dedd685 + 0b5b11e commit b00f918
Show file tree
Hide file tree
Showing 69 changed files with 2,863 additions and 363 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestDeployAndStartContainer(t *testing.T) {
t.Fatalf("unable to dial containerz: %v", err)
}

progCh, err := cli.PushImage(ctx, "cntrsrv", "latest", *containerTar)
progCh, err := cli.PushImage(ctx, "cntrsrv", "latest", *containerTar, false)
if err != nil {
t.Fatalf("unable to push image: %v", err)
}
Expand Down
80 changes: 2 additions & 78 deletions feature/gribi/otg_tests/mpls_in_udp/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# TE-18.1 gRIBI MPLS in UDP Encapsulation and Decapsulation
# TE-18.1 gRIBI MPLS in UDP Encapsulation

Create AFT entries using gRIBI to match on next hop group in a
network-instance and encapsulate the matching packets in MPLS in UDP.

Create a policy routing configuration using gNMI to decapsulate MPLS
in UDP packets which are sent to a loopback address and apply to
the DUT.
network-instance and encapsulate the matching packets in MPLS in UDP with outer header as IPv6 Header.

The MPLS in UDP encapsulation is expected to follow
[rfc7510](https://datatracker.ietf.org/doc/html/rfc7510#section-3),
Expand Down Expand Up @@ -186,72 +182,6 @@ encapsulate in GRE.
* Generate traffic from ATE port 1 to ATE port 2
* Validate ATE port 2 receives GRE traffic with correct inner and outer IPs

### TE-18.1.3 - MPLS in GRE decapsulation set by gNMI

Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate in GRE. # TODO: Move to dedicated README

```yaml
openconfig-network-instance:
network-instances:
- network-instance: "DEFAULT"
afts:
policy-forwarding:
policies:
policy: "default decap rule"
config:
policy-id: "default decap rule"
type: PBR_POLICY
rules:
rule: 1
config:
sequence-id: 1
ipv6:
config:
destination-address: "decap_loopback_ipv6"
action:
decapsulate-mpls-in-gre: TRUE # TODO: add to OC model/PR in progress
```
* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow which matches the decap loopback IP address
* Generate traffic from ATE port 1
* Validate ATE port 2 receives packets with correct VLAN and the inner inner_decap_ipv6
### TE-18.1.4 - MPLS in UDP decapsulation set by gNMI
Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate MPLS in UDP. # TODO: Move to dedicated README
```yaml
openconfig-network-instance:
network-instances:
- network-instance: "DEFAULT"
afts:
policy-forwarding:
policies:
policy: "default decap rule"
config:
policy-id: "default decap rule"
type: PBR_POLICY
rules:
rule: 1
config:
sequence-id: 1
ipv6:
config:
destination-address: "decap_loopback_ipv6"
action:
decapsulate-mpls-in-udp: TRUE
```
* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow
* Flow should have a packet encap format : outer_decap_udp_ipv6 <- MPLS label <- inner_decap_ipv6
* Generate traffic from ATE port 1
* Validate ATE port 2 receives the innermost IPv4 traffic with correct VLAN and inner_decap_ipv6

## OpenConfig Path and RPC Coverage

Expand Down Expand Up @@ -294,12 +224,6 @@ paths:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encap-headers/encap-header/gre/config/ip-ttl:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encap-headers/encap-header/gre/config/source-ip:

# Paths added for TE-18.1.3 - MPLS in GRE decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/destination-address:
# TODO: /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-gre:

# Paths added for TE-18.1.4 - MPLS in UDP decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-udp:

rpcs:
gnmi:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
// Level configs.
level := isis.GetOrCreateLevel(2)
level.LevelNumber = ygot.Uint8(2)
level.MetricStyle = oc.Isis_MetricStyle_WIDE_METRIC

// Authentication configs.
auth := level.GetOrCreateAuthentication()
Expand All @@ -89,6 +88,7 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
intfName += ".0"
}
intf := isis.GetOrCreateInterface(intfName)
intf.HelloPadding = oc.Isis_HelloPaddingType_ADAPTIVE

// Interface timers.
isisIntfTimers := intf.GetOrCreateTimers()
Expand All @@ -112,14 +112,16 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
isisIntfLevelTimers.HelloInterval = ygot.Uint32(5)
isisIntfLevelTimers.HelloMultiplier = ygot.Uint8(3)

isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true)
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Metric = ygot.Uint32(v4Metric)
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true)
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Metric = ygot.Uint32(v6Metric)
if deviations.MissingIsisInterfaceAfiSafiEnable(ts.DUT) {
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = nil
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = nil
}
if !deviations.ISISInterfaceAfiUnsupported(ts.DUT) {
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true)
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true)
}
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Metric = ygot.Uint32(v4Metric)
isisIntfLevel.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Metric = ygot.Uint32(v6Metric)
}

// configureOTG configures isis and traffic on OTG.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ platform_exceptions: {
deviations: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_interface_level_passive_unsupported: true
isis_dis_sysid_unsupported: true
isis_database_overloads_unsupported: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ func VerifyISISTelemetry(t *testing.T, dut *ondatra.DUTDevice, dutIntfs []string
batch := gnmi.OCBatch()
statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut))
id := formatID(loopBack.ateISISSysID)
iPv4Query := statePath.Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Level(uint8(isisLevel)).Lsp(id).Tlv(oc.IsisLsdbTypes_ISIS_TLV_TYPE_EXTENDED_IPV4_REACHABILITY).ExtendedIpv4Reachability().Prefix(fmt.Sprintf(loopBack.ateLoopbackV4 + "/32"))
iPv6Query := statePath.Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Level(uint8(isisLevel)).Lsp(id).Tlv(oc.IsisLsdbTypes_ISIS_TLV_TYPE_IPV6_REACHABILITY).ExtendedIpv4Reachability().Prefix(fmt.Sprintf(loopBack.ateLoopbackV6 + "/128"))
iPv4Query := statePath.Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Level(uint8(isisLevel)).Lsp(id).Tlv(oc.IsisLsdbTypes_ISIS_TLV_TYPE_EXTENDED_IPV4_REACHABILITY).ExtendedIpv4Reachability().Prefix(loopBack.ateLoopbackV4 + "/32")
iPv6Query := statePath.Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Level(uint8(isisLevel)).Lsp(id).Tlv(oc.IsisLsdbTypes_ISIS_TLV_TYPE_IPV6_REACHABILITY).ExtendedIpv4Reachability().Prefix(loopBack.ateLoopbackV6 + "/128")
batch.AddPaths(iPv4Query, iPv6Query)
_, ok := gnmi.Watch(t, dut, batch.State(), 5*time.Minute, func(val *ygnmi.Value[*oc.Root]) bool {
_, present := val.Val()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# TRANSCEIVER-1: Telemetry: 400ZR_PLUS Chromatic Dispersion(CD) telemetry values streaming

## Summary

Validate 400ZR_PLUS optics module reports accurate CD telemetry values.

Chromatic Dispersion is frequency dependent change in signal phase velocity due
to fiber measured in ps/nm

The test must be repeated for each supported operational-mode or as agreed between the vendor and customer.

## Procedure

* Connect two ZR_PLUS interfaces using a duplex LC fiber jumper such that TX
output power of one is the RX input power of the other module. Connection
between the modules should pass through an optical switch that can be
controlled through automation to simulate a fiber cut.
* To establish a point to point ZR_PLUS link ensure the following:
* Both transceivers states are enabled
* Both transceivers are set to a valid target TX output power
example -3 dBm
* Both transceivers are tuned to a valid centre frequency
example 193.1 THz
* With the ZR_PLUS link is established as explained above, verify that the
following ZR_PLUS transceiver telemetry paths exist and are streamed for both
the ZR_PLUS optics
* /platform/components/component/optical-channel/state/chromatic-dispersion/instant
* /platform/components/component/optical-channel/state/chromatic-dispersion/avg
* /platform/components/component/optical-channel/state/chromatic-dispersion/min
* /platform/components/component/optical-channel/state/chromatic-dispersion/max

* When the modules or the devices are still in a boot stage, they must not
stream any invalid string values like "nil" or "-inf" until valid values
are available for streaming.

* CD streamed values must always be of type Decimal64.
When link interfaces are in down state 0 must be reported as a valid
value.

**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 CD is updated after the interface flaps.

* Enable a pair of ZR_PLUS interfaces on the DUT as explained above.
* Verify the ZR_PLUS optics CD telemetry values are in the normal range.
* Disable or shut down the interface on the DUT.
* Verify with interfaces in down state both optics are streaming Decimal64 0
value for CD.
* Re-enable the interfaces on the DUT.
* Verify the ZR_PLUS optics CD telemetry values are updated to the
value in the normal range again.
* Typical CD expected value range is 0 to 2400 ps/nm.

* Verify that the optics CD is updated after a fiber cut.

* Enable a pair of ZR_PLUS interfaces on the DUT as explained above.
* Verify the ZR_PLUS optics CD telemetry values are in the normal
range.
* Simulate a fiber cut using the optical switch that sits in-between the
DUT ports.
* Verify with link in down state due to fiber cut both optics are streaming
Decimal64 0 value for CD.
* Re-enable the optical switch connection to clear the fiber cut fault.
* Verify the ZR_PLUS optics CD telemetry values are updated to the value in the normal
range again.
* Typical CD expected value range is 0 to 2400 ps/nm.

## Config Parameter coverage

* /components/component/transceiver/config/enabled

## Telemetry Parameter coverage

* /platform/components/component/optical-channel/state/chromatic-dispersion/instant
* /platform/components/component/optical-channel/state/chromatic-dispersion/avg
* /platform/components/component/optical-channel/state/chromatic-dispersion/min
* /platform/components/component/optical-channel/state/chromatic-dispersion/max

## OpenConfig Path and RPC Coverage
```yaml
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# TRANSCEIVER-10: Telemetry: 400ZR_PLUS Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.

## Summary

Validate 400ZR_PLUS optics module reports uncorrectable FEC frames count.

This observable represents the number of uncorrectable FEC frames,
measured as RS(544,514) equivalent frames, in a short interval.
This is a post-FEC decoder error metric.

## Procedure

* Connect two ZR_PLUS 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_PLUS link ensure the following:
* Both transceivers state is enabled
* Both transceivers are set to a valid target TX output power
example -3 dBm
* Both transceivers are tuned to a valid centre frequency
example 193.1 THz
* With the ZR_PLUS link established as explained above, verify that the
following ZR_PLUS transceiver telemetry path exist and is streamed for both
the ZR_PLUS optics.
* /terminal-device/logical-channels/channel/otn/state/fec-uncorrectable-blocks
* Verify that the reported data should be of type yang:counter64.
* When the modules or the devices are still in a boot stage, they must not
stream any invalid string values like "nil" or "-inf".
* Toggle the interface state using /interfaces/interface/config/enabled and
verify relevant FEC uncorrectable frame count is streamed. If there are no
errors a value of 0 should be streamed for no FEC uncorrectable frames.

## OpenConfig Path and RPC Coverage

```yaml
paths:
# Config Parameter coverage
/interfaces/interface/config/enabled:
/components/component/transceiver/config/enabled:
platform_type: ["OPTICAL_CHANNEL"]
# Telemetry Parameter coverage
/terminal-device/logical-channels/channel/otn/state/fec-uncorrectable-blocks:

rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# TRANSCEIVER-3: Telemetry: 400ZR_PLUS Optics firmware version streaming

## Summary

Validate 400ZR_PLUS optics module reports correct firmware version.

## Procedure

* Plug in the ZR_PLUS module in the host port and make sure the transceiver
state is enabled and host is able to detect the module.
* With the module correctly recognized verify it reports correct firmware
version through the following telemetry path
* /platform/components/component/state/firmware-version

* Verify that the modules firmware version is reported correctly after a
optic software reset.

* With ZR_PLUS module plugged in the host and properly recognized
* Verify the ZR_PLUS optics firmware version is correctly reported via the
streaming telemetry path above.
* Reset the optic through software
* Verify the ZR_PLUS optics still reports correct firmware version.

## Config Parameter coverage

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

## Telemetry Parameter coverage

* /platform/components/component/state/firmware-version

## OpenConfig Path and RPC Coverage
```yaml
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
```
Loading

0 comments on commit b00f918

Please sign in to comment.