Skip to content

Commit

Permalink
Merge branch 'openconfig:main' into certz1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
priyacj authored Dec 4, 2024
2 parents 31cfa68 + be17a31 commit c09063b
Show file tree
Hide file tree
Showing 14 changed files with 488 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ func TestBGPToISISRedistribution(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Logf("Description: %s", tc.desc)
tc.applyPolicyFunc(t, ts.DUT)
if tc.ipv4 {
bgpISISRedistribution(t, ts.DUT, "set")
defer bgpISISRedistribution(t, ts.DUT, "delete")
} else {
bgpISISRedistributionV6(t, ts.DUT, "set")
defer bgpISISRedistributionV6(t, ts.DUT, "delete")
}
tc.verifyTelemetryFunc(t, ts.DUT, ts.ATE)
if tc.testTraffic {
if tc.ipv4 {
Expand Down Expand Up @@ -316,8 +323,6 @@ func nonMatchingPrefixRoutePolicy(t *testing.T, dut *ondatra.DUTDevice) {
stmt.GetOrCreateConditions().GetOrCreateMatchPrefixSet().SetPrefixSet(v4PrefixSet)
gnmi.Update(t, dut, gnmi.OC().RoutingPolicy().Config(), rp)

// enable bgp isis redistribution
bgpISISRedistribution(t, dut)
}

func matchingPrefixRoutePolicy(t *testing.T, dut *ondatra.DUTDevice) {
Expand Down Expand Up @@ -357,6 +362,14 @@ func nonMatchingCommunityRoutePolicy(t *testing.T, dut *ondatra.DUTDevice) {
} else {
stmt.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetCommunitySet(v4CommunitySet)
}
// Configure ALLOWAll policy
pdef = rp.GetOrCreatePolicyDefinition(allowAllPolicy)
stmt, err = pdef.AppendNewStatement("id-1")
if err != nil {
t.Fatalf("AppendNewStatement(%s) failed: %v", "id-1", err)
}
stmt.GetOrCreateActions().PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE

gnmi.Replace(t, dut, gnmi.OC().RoutingPolicy().Config(), rp)
}
}
Expand Down Expand Up @@ -459,16 +472,11 @@ func verifyNonMatchingCommunityTelemetry(t *testing.T, dut *ondatra.DUTDevice, a
if commSet == nil {
t.Errorf("Community set is nil, want non-nil")
}
if deviations.BgpCommunityMemberIsAString(dut) {
cm := nonMatchingCommunityVal
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(cm))) {
t.Errorf("Community set member: %v, want: %s", commSetMember, cm)
}
} else {
cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", dummyAS, 200), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm))) {
t.Errorf("Community set member: %v, want: %d", commSetMember, cm)
}

cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", dummyAS, 200), 16, 0)

if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !(containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(nonMatchingCommunityVal))) || containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm)))) {
t.Errorf("Community set member: %v, want: %s or %d", commSetMember, nonMatchingCommunityVal, cm)
}

_, ok := gnmi.WatchAll(t, ate.OTG(), gnmi.OTG().IsisRouter("devIsis").LinkStateDatabase().LspsAny().Tlvs().ExtendedIpv4Reachability().Prefix(advertisedIPv4.address).State(), 30*time.Second, func(v *ygnmi.Value[*otgtelemetry.IsisRouter_LinkStateDatabase_Lsps_Tlvs_ExtendedIpv4Reachability_Prefix]) bool {
Expand All @@ -485,16 +493,10 @@ func verifyMatchingCommunityTelemetry(t *testing.T, dut *ondatra.DUTDevice, ate
if commSet == nil {
t.Errorf("Community set is nil, want non-nil")
}
if deviations.BgpCommunityMemberIsAString(dut) {
cm := matchingCommunityVal
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(cm))) {
t.Errorf("Community set member: %v, want: %v", commSetMember, cm)
}
} else {
cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", ateAS, 100), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm))) {
t.Errorf("Community set member: %v, want: %v", commSetMember, cm)
}

cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", ateAS, 100), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !(containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(matchingCommunityVal))) || containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm)))) {
t.Errorf("Community set member: %v, want: %s or %d", commSetMember, matchingCommunityVal, cm)
}

_, ok := gnmi.WatchAll(t, ate.OTG(), gnmi.OTG().IsisRouter("devIsis").LinkStateDatabase().LspsAny().Tlvs().ExtendedIpv4Reachability().Prefix(advertisedIPv4.address).State(), 30*time.Second, func(v *ygnmi.Value[*otgtelemetry.IsisRouter_LinkStateDatabase_Lsps_Tlvs_ExtendedIpv4Reachability_Prefix]) bool {
Expand Down Expand Up @@ -531,9 +533,6 @@ func nonMatchingPrefixRoutePolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
}
stmt.GetOrCreateConditions().GetOrCreateMatchPrefixSet().SetPrefixSet(v6PrefixSet)
gnmi.Update(t, dut, gnmi.OC().RoutingPolicy().Config(), rp)

// enable bgp isis redistribution
bgpISISRedistributionV6(t, dut)
}

func matchingPrefixRoutePolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
Expand Down Expand Up @@ -573,6 +572,13 @@ func nonMatchingCommunityRoutePolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
} else {
stmt.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetCommunitySet(v6CommunitySet)
}
// Configure ALLOWAll policy
pdef = rp.GetOrCreatePolicyDefinition(allowAllPolicy)
stmt, err = pdef.AppendNewStatement("id-1")
if err != nil {
t.Fatalf("AppendNewStatement(%s) failed: %v", "id-1", err)
}
stmt.GetOrCreateActions().PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE
gnmi.Replace(t, dut, gnmi.OC().RoutingPolicy().Config(), rp)
}
}
Expand Down Expand Up @@ -675,16 +681,9 @@ func verifyNonMatchingCommunityTelemetryV6(t *testing.T, dut *ondatra.DUTDevice,
if commSet == nil {
t.Errorf("Community set is nil, want non-nil")
}
if deviations.BgpCommunityMemberIsAString(dut) {
cm := nonMatchingCommunityVal
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(cm))) {
t.Errorf("Community set member: %v, want: %v", commSetMember, cm)
}
} else {
cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", dummyAS, 200), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm))) {
t.Errorf("Community set member: %v, want: %d", commSetMember, cm)
}
cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", dummyAS, 200), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !(containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(nonMatchingCommunityVal))) || containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm)))) {
t.Errorf("Community set member: %v, want: %s or %d", commSetMember, nonMatchingCommunityVal, cm)
}

_, ok := gnmi.WatchAll(t, ate.OTG(), gnmi.OTG().IsisRouter("devIsis").LinkStateDatabase().LspsAny().Tlvs().Ipv6Reachability().Prefix(advertisedIPv6.address).State(), 60*time.Second, func(v *ygnmi.Value[*otgtelemetry.IsisRouter_LinkStateDatabase_Lsps_Tlvs_Ipv6Reachability_Prefix]) bool {
Expand All @@ -701,16 +700,10 @@ func verifyMatchingCommunityTelemetryV6(t *testing.T, dut *ondatra.DUTDevice, at
if commSet == nil {
t.Errorf("Community set is nil, want non-nil")
}
if deviations.BgpCommunityMemberIsAString(dut) {
cm := matchingCommunityVal
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(cm))) {
t.Errorf("Community set member: %v, want: %v", commSetMember, cm)
}
} else {
cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", ateAS, 100), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm))) {
t.Errorf("Community set member: %v, want: %v", commSetMember, cm)
}

cm, _ := strconv.ParseInt(fmt.Sprintf("%04x%04x", ateAS, 100), 16, 0)
if commSetMember := commSet.GetCommunityMember(); len(commSetMember) == 0 || !(containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionString(matchingCommunityVal))) || containsValue(commSetMember, oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union(oc.UnionUint32(cm)))) {
t.Errorf("Community set member: %v, want: %s or %d", commSetMember, matchingCommunityVal, cm)
}

_, ok := gnmi.WatchAll(t, ate.OTG(), gnmi.OTG().IsisRouter("devIsis").LinkStateDatabase().LspsAny().Tlvs().Ipv6Reachability().Prefix(advertisedIPv6.address).State(), 60*time.Second, func(v *ygnmi.Value[*otgtelemetry.IsisRouter_LinkStateDatabase_Lsps_Tlvs_Ipv6Reachability_Prefix]) bool {
Expand All @@ -722,32 +715,40 @@ func verifyMatchingCommunityTelemetryV6(t *testing.T, dut *ondatra.DUTDevice, at
}
}

func bgpISISRedistribution(t *testing.T, dut *ondatra.DUTDevice) {
func bgpISISRedistribution(t *testing.T, dut *ondatra.DUTDevice, operation string) {
dni := deviations.DefaultNetworkInstance(dut)
root := &oc.Root{}
tableConn := root.GetOrCreateNetworkInstance(dni).GetOrCreateTableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV4)
if !deviations.SkipSettingDisableMetricPropagation(dut) {
tableConn.SetDisableMetricPropagation(false)
}
if !deviations.DefaultRoutePolicyUnsupported(dut) {
tableConn.SetDefaultImportPolicy(oc.RoutingPolicy_DefaultPolicyType_REJECT_ROUTE)
if operation == "set" {
if !deviations.SkipSettingDisableMetricPropagation(dut) {
tableConn.SetDisableMetricPropagation(false)
}
if !deviations.DefaultRoutePolicyUnsupported(dut) {
tableConn.SetDefaultImportPolicy(oc.RoutingPolicy_DefaultPolicyType_REJECT_ROUTE)
}
tableConn.SetImportPolicy([]string{v4RoutePolicy})
gnmi.Update(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV4).Config(), tableConn)
} else if operation == "delete" {
gnmi.Delete(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV4).Config())
}
tableConn.SetImportPolicy([]string{v4RoutePolicy})
gnmi.Update(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV4).Config(), tableConn)
}

func bgpISISRedistributionV6(t *testing.T, dut *ondatra.DUTDevice) {
func bgpISISRedistributionV6(t *testing.T, dut *ondatra.DUTDevice, operation string) {
dni := deviations.DefaultNetworkInstance(dut)
root := &oc.Root{}
tableConn := root.GetOrCreateNetworkInstance(dni).GetOrCreateTableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV6)
if !deviations.SkipSettingDisableMetricPropagation(dut) {
tableConn.SetDisableMetricPropagation(false)
}
if !deviations.DefaultRoutePolicyUnsupported(dut) {
tableConn.SetDefaultImportPolicy(oc.RoutingPolicy_DefaultPolicyType_REJECT_ROUTE)
if operation == "set" {
if !deviations.SkipSettingDisableMetricPropagation(dut) {
tableConn.SetDisableMetricPropagation(false)
}
if !deviations.DefaultRoutePolicyUnsupported(dut) {
tableConn.SetDefaultImportPolicy(oc.RoutingPolicy_DefaultPolicyType_REJECT_ROUTE)
}
tableConn.SetImportPolicy([]string{v6RoutePolicy})
gnmi.Update(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV6).Config(), tableConn)
} else if operation == "delete" {
gnmi.Delete(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV6).Config())
}
tableConn.SetImportPolicy([]string{v6RoutePolicy})
gnmi.Update(t, dut, gnmi.OC().NetworkInstance(dni).TableConnection(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, oc.Types_ADDRESS_FAMILY_IPV6).Config(), tableConn)
}
func bgpISISRedistributionWithRouteTagPolicy(t *testing.T, dut *ondatra.DUTDevice, afi oc.E_Types_ADDRESS_FAMILY) {
dni := deviations.DefaultNetworkInstance(dut)
Expand All @@ -770,11 +771,11 @@ func configureBGPTablePolicyWithSetTag(t *testing.T, prefixSetName, prefixSetAdd
if err != nil {
t.Fatalf("AppendNewStatement(%s) failed: %v", "routePolicyStatement", err)
}
//Create prefix-set
// Create prefix-set
prefixSet := rp.GetOrCreateDefinedSets().GetOrCreatePrefixSet(prefixSetName)
prefixSet.GetOrCreatePrefix(prefixSetAddress, maskLenExact)
gnmi.Update(t, dut, gnmi.OC().RoutingPolicy().DefinedSets().PrefixSet(prefixSetName).Config(), prefixSet)
//Create community-set
// Create community-set
communitySet := rp.GetOrCreateDefinedSets().GetOrCreateBgpDefinedSets().GetOrCreateCommunitySet(communitySetName)
communitySet.SetCommunityMember([]oc.RoutingPolicy_DefinedSets_BgpDefinedSets_CommunitySet_CommunityMember_Union{oc.UnionString(fmt.Sprintf("%d:%d", commAS, commValue))})
communitySet.SetMatchSetOptions(oc.BgpPolicy_MatchSetOptionsType_ANY)
Expand All @@ -785,12 +786,12 @@ func configureBGPTablePolicyWithSetTag(t *testing.T, prefixSetName, prefixSetAdd
stmt1.GetOrCreateActions().GetOrCreateSetTag().GetOrCreateInline().SetTag([]oc.RoutingPolicy_PolicyDefinition_Statement_Actions_SetTag_Inline_Tag_Union{oc.UnionUint32(routeTagVal)})
stmt1.GetOrCreateActions().SetPolicyResult(oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE)

//Create tag-set with above route tag value
// Create tag-set with above route tag value
tagSet := rp.GetOrCreateDefinedSets().GetOrCreateTagSet("RouteTagForRedistribution")
tagSet.SetName("RouteTagForRedistribution")
tagSet.SetTagValue([]oc.RoutingPolicy_DefinedSets_TagSet_TagValue_Union{oc.UnionUint32(routeTagVal)})

//Route-policy to match tag and accept
// Route-policy to match tag and accept
pdef2 := rp.GetOrCreatePolicyDefinition("MatchTagRedistributionPolicy")
stmt2, err := pdef2.AppendNewStatement("matchTag")
stmt2.GetOrCreateConditions().GetOrCreateMatchPrefixSet().SetPrefixSet(prefixSetName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ func TestBGPSetup(t *testing.T) {

dni := deviations.DefaultNetworkInstance(bs.DUT)
bgp := bs.DUTConf.GetOrCreateNetworkInstance(dni).GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").GetOrCreateBgp()
bgp.GetOrCreatePeerGroup(cfgplugins.BGPPeerGroup1).GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).GetOrCreateUseMultiplePaths().Enabled = ygot.Bool(true)
switch bs.DUT.Vendor() {
case ondatra.NOKIA:
//BGP multipath enable/disable at the peer-group level not required b/376799583
t.Logf("BGP Multipath enable/disable is not required under Peer-group by %s hence skipping", bs.DUT.Vendor())
default:
bgp.GetOrCreatePeerGroup(cfgplugins.BGPPeerGroup1).GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).GetOrCreateUseMultiplePaths().Enabled = ygot.Bool(true)
}

if !deviations.SkipBgpSendCommunityType(bs.DUT) {
bgp.GetOrCreatePeerGroup(cfgplugins.BGPPeerGroup1).SetSendCommunityType([]oc.E_Bgp_CommunityType{oc.Bgp_CommunityType_STANDARD, oc.Bgp_CommunityType_EXTENDED, oc.Bgp_CommunityType_LARGE})
Expand Down Expand Up @@ -214,7 +220,10 @@ func TestBGPSetup(t *testing.T) {
t.Fatalf("Unsupported vendor %s for deviation 'SkipSettingAllowMultipleAS'", bs.DUT.Vendor())
}
} else {
bgp.GetOrCreateGlobal().GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).GetOrCreateUseMultiplePaths().GetOrCreateEbgp().AllowMultipleAs = ygot.Bool(true)
gEBGP := bgp.GetOrCreateGlobal().GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).GetOrCreateUseMultiplePaths().GetOrCreateEbgp()
gEBGP.AllowMultipleAs = ygot.Bool(true)
gEBGP.MaximumPaths = ygot.Uint32(maxPaths)
gEBGP.GetOrCreateLinkBandwidthExtCommunity().Enabled = ygot.Bool(true)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ platform_exceptions: {
vendor: NOKIA
}
deviations: {
explicit_port_speed: true
skip_bgp_send_community_type: true
explicit_interface_in_default_vrf: true
interface_enabled: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ platform_exceptions: {
default_network_instance: "default"
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
bgp_conditions_match_community_set_unsupported: true
bgp_extended_community_index_unsupported: true
}
}
Expand Down
9 changes: 7 additions & 2 deletions feature/gribi/otg_tests/basic_encap_test/basic_encap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ func getPbrRules(dut *ondatra.DUTDevice, clusterFacing bool) []pbrRule {
pbrRules = append(pbrRules, encapRules...)
}

pbrRules = append(pbrRules, splitDefaultClassRules...)

if deviations.PfRequireMatchDefaultRule(dut) {
pbrRules = append(pbrRules, splitDefaultClassRules...)
} else {
Expand Down Expand Up @@ -803,6 +801,13 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) {
// configure base PBF policies and network-instances
configureBaseconfig(t, dut)

if deviations.ExplicitInterfaceInDefaultVRF(dut) {
fptest.AssignToNetworkInstance(t, dut, p1.Name(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, p2.Name(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, p3.Name(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, p4.Name(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, p5.Name(), deviations.DefaultNetworkInstance(dut), 0)
}
// apply PBF to src interface.
applyForwardingPolicy(t, dut, p1.Name())
if deviations.GRIBIMACOverrideWithStaticARP(dut) {
Expand Down
11 changes: 11 additions & 0 deletions feature/gribi/otg_tests/basic_encap_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@ platform_exceptions: {
omit_l2_mtu: true
}
}
platform_exceptions: {
platform: {
vendor: NOKIA
}
deviations: {
interface_enabled: true
explicit_interface_in_default_vrf: true
static_protocol_name: "static"
ttl_copy_unsupported: true
}
}
tags: TAGS_DATACENTER_EDGE
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# RT: GRIBI Static Route On Lemmings Test

## Summary

Ensure the GRIBI injecting the route entry on lemmings (Control plane), which is brought up in KNE topology

## Topology

ATE port-1 <------> port-1 DUT
DUT port-2 <------> port-2 ATE


## Baseline

```
### Install the following gRIBI AFTs.
- IPv4Entry {198.50.100.64/32 (DEFAULT)} -> NHG#2 (DEFAULT VRF) -> {
{NH#2, DEFAULT VRF, weight:1}, interface-ref:dut-port-2-interface,
}
```

## Procedure

The DUT should be reset to the baseline after each of the following tests.

Test-1, Configure the route entry on lemmings in KNE topology

```
1. Configure the DUT and OTG.
2. Configure Nh, NHG and IPv4 entry through gRIBI route injection.
3. Validate the acknowledgement for FIB installation success.
```

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

0 comments on commit c09063b

Please sign in to comment.