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

RT-14.2: gRIBI route test changes incorporated. #3813

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 12 additions & 13 deletions feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,19 @@ func TestGRIBIFailover(t *testing.T) {
})

t.Run("RT-14.2.4: Traffic Match to Transit_Vrf, noMatch Tunnel Prefix Egress to Port3", func(t *testing.T) {
flow := createFlow(&flowArgs{flowName: "flow4in4",
outHdrSrcIP: ipv4OuterSrc111, outHdrDstIP: ipv4OuterDst222,
InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4InnerDst, isIPInIP: true}, dstMac)
sendTraffic(t, args, top, ate, flow, 30, []string{"port3"})
if ok := verifyTrafficFlow(t, ate, flow); !ok {
t.Fatal("Packet Dropped, LossPct for flow ")
if !deviations.NoFallbackRouteInTransitVrf(dut) {
flow := createFlow(&flowArgs{flowName: "flow4in4",
outHdrSrcIP: ipv4OuterSrc111, outHdrDstIP: ipv4OuterDst222,
InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4InnerDst, isIPInIP: true}, dstMac)
sendTraffic(t, args, top, ate, flow, 30, []string{"port3"})
if ok := verifyTrafficFlow(t, ate, flow); !ok {
t.Fatal("Packet Dropped, LossPct for flow ")
}
captureAndValidatePackets(t, args, &packetValidation{portName: atePort3.Name,
outDstIP: []string{ipv4OuterDst222}, inHdrIP: ipv4InnerDst, validateDecap: true})
} else {
t.Skip("Fallback route not supported in Transit network instances.,Hence skipping the test")
}
captureAndValidatePackets(t, args, &packetValidation{portName: atePort3.Name,
outDstIP: []string{ipv4OuterDst222}, inHdrIP: ipv4InnerDst, validateDecap: true})
})
}

Expand All @@ -256,11 +260,6 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) {
gnmi.Replace(t, dut, gnmi.OC().Interface(p2.Name()).Config(), dutPort2.NewOCInterface(p2.Name(), dut))
gnmi.Replace(t, dut, gnmi.OC().Interface(p3.Name()).Config(), dutPort3.NewOCInterface(p3.Name(), dut))

if deviations.ExplicitPortSpeed(dut) {
fptest.SetPortSpeed(t, p1)
fptest.SetPortSpeed(t, p2)
fptest.SetPortSpeed(t, p3)
}
if deviations.ExplicitInterfaceInDefaultVRF(dut) {
fptest.AssignToNetworkInstance(t, dut, p1.Name(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, p2.Name(), deviations.DefaultNetworkInstance(dut), 0)
Expand Down
2 changes: 1 addition & 1 deletion feature/gribi/otg_tests/gribi_route_test/metadata.textproto
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ platform_exceptions: {
vendor: NOKIA
}
deviations: {
explicit_port_speed: true
explicit_interface_in_default_vrf: true
aggregate_atomic_update: true
interface_enabled: true
missing_value_for_defaults: true
missing_isis_interface_afi_safi_enable: true
no_fallback_route_in_transit_vrf: true
}
}

Expand Down
5 changes: 5 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1331,3 +1331,8 @@ func BgpPrefixsetReqRoutepolRef(dut *ondatra.DUTDevice) bool {
func OperStatusForIcUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetOperStatusForIcUnsupported()
}

// NoFallbackRouteInTransitVrf returns true if fallback route (0/0 or 0::0/) not supported in transit network instances.
func NoFallbackRouteInTransitVrf(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetNoFallbackRouteInTransitVrf()
}
4 changes: 4 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ message Metadata {
// Juniper b/395551640
bool oper_status_for_ic_unsupported = 256;

// Nokia; b/
//NoFallbackRouteInTransitVrf returns true if fallback route (0/0 or 0::0/) not supported in transit network instances.
bool no_fallback_route_in_transit_vrf = 257;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173;
}
Expand Down
Loading