From 109d9411a6a1e925f1ada888898ca28ba35a98b6 Mon Sep 17 00:00:00 2001 From: Rahul Kumar <164056913+rahulsy26@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:15:48 +0530 Subject: [PATCH] Adding new subtest and Updating with GRIBI backup NHG (#3400) --- .../aggregate_all_not_viable_test/README.md | 51 +++- ...ggregate_all_not_forwarding_viable_test.go | 257 ++++++++++++++---- .../metadata.textproto | 13 + 3 files changed, 260 insertions(+), 61 deletions(-) diff --git a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/README.md b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/README.md index 5949b55c30a..29c5cfd2c02 100644 --- a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/README.md +++ b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/README.md @@ -46,8 +46,9 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE 1. Advertise one network prefix (pfx2) from ATE LAG_2 and ATE LAG_3. - Establish iBGP between ATE and DUT over LGA using LAG interface IPs and advertise prefix pfx3 with BGP NH from pfx2 range. -- Programm via gRIBI route for prefix pfx4 with NHG pointing LAG_2 & LAG_3(all - ports are forwarding-viable at this point) with equal weight. +- Programm via gRIBI route for prefix pfx4 with NHG pointing to NH LAG_2 & backup + to NHG pointing to NH LAG_3(all ports are forwarding-viable at this point) + with equal weight. ## RT-5.7.1: For ISIS cost of LAG_2 lower than ISIS cost of LAG_3: #### Run traffic: @@ -64,9 +65,8 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE #### RT-5.7.1.2: Verify forwarding-viable behavior on an aggregate interface with all members down or set with forwarding-viable=FALSE. - Ensure ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 -- Disable/deactive laser on ATE port2; Now all LAG_2 members are either down - (port2) or set with forwarding-viable=FALSE -- Ensure that the ISIS adjacency times out on DUT LAG_2 and ATE LAG_2 +- Set with forwarding-viable=FALSE on port 2 (All Ports now on LAG_2 are set with FV=false) +- Ensure that the ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 - Ensure there is no layer3 traffic transmitted out of DUT ports 2-6 (LAG_2) - Ensure that traffic is received on all port3-6 and delivered to ATE LAG_1 - Ensure there are no packet losses in steady state (no congestion) for @@ -75,7 +75,7 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE traffic from ATE LAG_1 to ATE LAG_3 (pfx_2, pfx3). - Ensure there is no traffic received on DUT LAG_3 - Ensure that traffic from ATE port1 to pfx2, pfx3 are transmitted via DUT LAG3 -- Ensure that traffic from ATE port1 to pfx4 are transmitted out through NH pointing to LAG3 +- Ensure that traffic from ATE port1 to pfx4 are transmitted out through backup NHG pointing to NH LAG3 #### RT-5.7.1.3: Make the forwarding-viable transitions from FALSE --> TRUE on a ports 6 within the LAG_2 on the DUT - Ensure that only DUT port 6 of LAG ports has bidirectional traffic. @@ -85,6 +85,21 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE - Ensure there is no traffic received on DUT LAG_3 - Ensure there is no traffic transmitted on DUT LAG_3 +#### RT-5.7.1.4: Verify forwarding-viable behavior on an aggregate interface with some members are down with all member are set with forwarding-viable=FALSE. +- Ensure ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 +- Set with forwarding-viable=FALSE on port 2 and make down other ports on LAG_2 + (All Ports now on LAG_2 are set with FV=false and some ports are down) +- Ensure that the ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 +- Ensure there is no layer3 traffic transmitted out of DUT ports 2-6 (LAG_2) +- Ensure that traffic is received on all port3-6 and delivered to ATE LAG_1 +- Ensure there are no packet losses in steady state (no congestion) for + traffic from ATE LAG_2 to ATE LAG_1 (pfx_1). +- Ensure there are no packet losses in steady state (no congestion) for + traffic from ATE LAG_1 to ATE LAG_3 (pfx_2, pfx3). +- Ensure there is no traffic received on DUT LAG_3 +- Ensure that traffic from ATE port1 to pfx2, pfx3 are transmitted via DUT LAG3 +- Ensure that traffic from ATE port1 to pfx4 are transmitted out through NHG pointing to NH LAG3 + ## RT-5.7.2: For ISIS cost of LAG_2 equal to ISIS cost of LAG_3 #### Run traffic: @@ -99,11 +114,10 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE - Ensure that traffic is received on all port2-6 and ports7-8 and delivered to ATE port1 - Ensure there are no packet losses in steady state (no congestion) -#### RT-5.7.2.2: Verify forwarding-viable behavior on an aggregate interface with all members down or set with forwarding-viable=FALSE. +#### RT-5.7.2.2: Verify forwarding-viable behavior on an aggregate interface with all are set with forwarding-viable=FALSE. - Ensure ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 -- Disable/deactive laser on ATE port2; Now all LAG_2 members are either down (port2) or - set with forwarding-viable=FALSE -- Ensure that the ISIS adjacency times out on DUT LAG_2 and ATE LAG_2 +- Set with forwarding-viable=FALSE on port 2 (All Ports now on LAG_2 are set with FV=false) +- Ensure that the ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 - Ensure there is no traffic transmitted out of DUT ports 2-6 (LAG_2) - Ensure that traffic received on all port3-6 and ports7-8 is delivered to ATE LAG_1 - Ensure there are no packet losses in steady state (no congestion) for @@ -111,7 +125,7 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE - Ensure there are no packet losses in steady state (no congestion) for traffic from ATE LAG_1 to ATE LAG_3 (pfx_2, pfx3). - Ensure that traffic from ATE port1 to pfx2, pfx3 are transmitted via DUT LAG3 -- Ensure that traffic from ATE port1 to pfx4 are transmitted out through NH pointing to LAG3 +- Ensure that traffic from ATE port1 to pfx4 are transmitted out through NHG pointing to NH LAG3 #### RT-5.7.2.3: Make the forwarding-viable transitions from FALSE --> TRUE on a ports 6 within the LAG_2 on the DUT - Ensure that only DUT port 6 of LAG_2 and all ports of LAG_3 ports has bidirectional traffic. @@ -119,6 +133,21 @@ Ensure that when --all LAG member-- become set with forwarding-viable == FALSE - Ensure that traffic received on all port3-6 and ports7-8 is delivered to ATE port1 - Ensure there are no packet losses in steady state (no congestion). +#### RT-5.7.2.4: Verify forwarding-viable behavior on an aggregate interface with some members are down with all member are set with forwarding-viable=FALSE. +- Ensure ISIS adjacency is UP on DUT LAG_2 and ATE LAG_2 +- Set with forwarding-viable=FALSE and make down other ports on LAG_2 + (All Ports now on LAG_2 are set with FV=false and some ports are down) +- Ensure that the ISIS adjacency times out on DUT LAG_2 and ATE LAG_2 +- Ensure there is no traffic transmitted out of DUT ports 2-6 (LAG_2) +- Ensure that traffic received on all port3-6 and ports7-8 is delivered to ATE LAG_1 +- Ensure there are no packet losses in steady state (no congestion) for + traffic from ATE LAG_2, LAG_3 to ATE LAG_1 (pfx_1). +- Ensure there are no packet losses in steady state (no congestion) for + traffic from ATE LAG_1 to ATE LAG_3 (pfx_2, pfx3). +- Ensure that traffic from ATE port1 to pfx2, pfx3 are transmitted via DUT LAG3 +- Ensure that traffic from ATE port1 to pfx4 are transmitted out through NH pointing to LAG3 + + ## OpenConfig Path and RPC Coverage The below yaml defines the OC paths and RPC intended to be covered by this test. diff --git a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/aggregate_all_not_forwarding_viable_test.go b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/aggregate_all_not_forwarding_viable_test.go index 48cacf68dd8..1128fbf265a 100644 --- a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/aggregate_all_not_forwarding_viable_test.go +++ b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/aggregate_all_not_forwarding_viable_test.go @@ -77,6 +77,9 @@ const ( LAG1 = "lag1" LAG2 = "lag2" LAG3 = "lag3" + niTeVrf111 = "TE_VRF_111" + niRepairVrf = "REPAIR_VRF" + pfx1AdvV4WithMask = "100.0.1.0/24" ) type aggPortData struct { @@ -144,20 +147,20 @@ var ( IPv6Len: 128, } - pfx1AdvV4 = &ipAddr{ip: "100.0.1.0", prefix: 24} - pfx1AdvV6 = &ipAddr{ip: "2002:db8:64:64::0", prefix: 64} - pfx2AdvV4 = &ipAddr{ip: "100.0.2.0", prefix: 24} - pfx2AdvV6 = &ipAddr{ip: "2003:db8:64:64::0", prefix: 64} - pfx3AdvV4 = &ipAddr{ip: "100.0.3.0", prefix: 24} - pfx4AdvV4 = &ipAddr{ip: "100.0.4.0", prefix: 24} - pmd100GFRPorts []string - dutPortList []*ondatra.Port - atePortList []*ondatra.Port - rxPktsBeforeTraffic map[*ondatra.Port]uint64 - txPktsBeforeTraffic map[*ondatra.Port]uint64 - equalDistributionWeights = []uint64{50, 50} - ecmpTolerance = uint64(1) - ipRange = []uint32{254, 500} + pfx1AdvV4 = &ipAddr{ip: "100.0.1.0", prefix: 24} + pfx1AdvV6 = &ipAddr{ip: "2002:db8:64:64::0", prefix: 64} + pfx2AdvV4 = &ipAddr{ip: "100.0.2.0", prefix: 24} + pfx2AdvV6 = &ipAddr{ip: "2003:db8:64:64::0", prefix: 64} + pfx3AdvV4 = &ipAddr{ip: "100.0.3.0", prefix: 24} + pfx4AdvV4 = &ipAddr{ip: "100.0.4.0", prefix: 24} + pmd100GFRPorts []string + dutPortList []*ondatra.Port + atePortList []*ondatra.Port + rxPktsBeforeTraffic map[*ondatra.Port]uint64 + txPktsBeforeTraffic map[*ondatra.Port]uint64 + trafficDistributionWeights = []uint64{50, 50} + ecmpTolerance = uint64(1) + ipRange = []uint32{250, 500} dutAggMac []string ) @@ -173,18 +176,20 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { ate := ondatra.ATE(t, "ate") aggIDs := configureDUT(t, dut) + configNonDefaultNetworkInstance(t, dut) changeMetric(t, dut, aggIDs[2], 30) top := configureATE(t, ate) + installGRIBIRoutes(t, dut, ate, top) ate.OTG().PushConfig(t, top) ate.OTG().StartProtocols(t) for _, aggID := range aggIDs { gnmi.Await(t, dut, gnmi.OC().Interface(aggID).OperStatus().State(), 60*time.Second, oc.Interface_OperStatus_UP) } - flows := createFlows(t, ate, top) ate.OTG().PushConfig(t, top) ate.OTG().StartProtocols(t) + for _, agg := range []*aggPortData{agg1, agg2, agg3} { bgpPath := ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() gnmi.Await(t, dut, bgpPath.Neighbor(agg.ateIPv4).SessionState().State(), time.Minute, oc.Bgp_Neighbor_SessionState_ESTABLISHED) @@ -216,11 +221,6 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { configForwardingViable(t, dut, dutPortList[1:2], false) // Ensure ISIS Adjacency is Down on LAG_2 - if ok := awaitAdjacency(t, dut, aggIDs[1], oc.Isis_IsisInterfaceAdjState_DOWN); !ok { - if presence := gnmi.LookupAll(t, dut, ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Interface(aggIDs[1]).LevelAny().AdjacencyAny().AdjacencyState().State()); len(presence) > 0 { - t.Fatalf("ISIS Adjacency is Established on LAG_2 ") - } - } startTraffic(t, dut, ate, top) if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:agg2.ateLagCount+1], dutPortList[1:agg2.ateLagCount+1]); err != nil { t.Fatal(err) @@ -255,8 +255,55 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { t.Fatal("Packet Dropped, LossPct for flow ") } }) + + // Reset Forwarding-Viable to True for all the ports of LAG_2 + configForwardingViable(t, dut, dutPortList[1:agg2.ateLagCount], true) + + t.Run("RT-5.7.1.4: Setting Forwarding-Viable to False and Down some Port on Lag2", func(t *testing.T) { + // Ensure ISIS Adjacency is up on LAG_2 + if ok := awaitAdjacency(t, dut, aggIDs[1], oc.Isis_IsisInterfaceAdjState_UP); !ok { + t.Fatal("ISIS Adjacency is Down on LAG_2") + } + configForwardingViable(t, dut, dutPortList[1:agg2.ateLagCount+1], false) + // Ensure ISIS Adjacency is Down on LAG_2 + + if len(dut.Ports()) > 4 { + t.Logf("Bring Down Port2 and Port3") + setDUTInterfaceWithState(t, dut, []*ondatra.Port{dut.Port(t, "port2"), dut.Port(t, "port3")}, false) + } else { + t.Logf("Bring Down Port2") + setDUTInterfaceWithState(t, dut, []*ondatra.Port{dut.Port(t, "port2")}, false) + } + + // Ensure LAG2 is UP when all member are Forwarding unviable + gnmi.Await(t, dut, gnmi.OC().Interface(aggIDs[1]).OperStatus().State(), 60*time.Second, oc.Interface_OperStatus_UP) + startTraffic(t, dut, ate, top) + if len(dut.Ports()) > 4 { + if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:agg2.ateLagCount+1], dutPortList[3:agg2.ateLagCount+1]); err != nil { + t.Fatal(err) + } + } else { + if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:agg2.ateLagCount], dutPortList[2:agg2.ateLagCount]); err != nil { + t.Fatal(err) + } + } + // Ensure that traffic from ATE port1 to pfx4 transmitted out using LAG3 + if ok := verifyTrafficFlow(t, ate, flows[1:2], true); !ok { + t.Fatal("Packet Dropped, LossPct for flow ", flows[1].Name()) + } + // Ensure there is no traffic received on DUT LAG_3 + if got := validateLag3Traffic(t, dut, ate, dutPortList[(agg2.ateLagCount+1):]); got == true { + t.Fatal("Packets are Received on DUT LAG_3") + } + if ok := verifyTrafficFlow(t, ate, flows[0:1], true); !ok { + t.Fatal("Packet Dropped, LossPct for flow ", flows[0].Name()) + } + }) + t.Logf("Bring Up the Port2 and Port3") + setDUTInterfaceWithState(t, dut, []*ondatra.Port{dut.Port(t, "port2"), dut.Port(t, "port3")}, true) + // Reset Forwarding-Viable to True for all the ports of LAG_2 - configForwardingViable(t, dut, dutPortList[1:6], true) + configForwardingViable(t, dut, dutPortList[1:agg2.ateLagCount+1], true) // Change ISIS metric Equal for Both LAG_2 and LAG_3 changeMetric(t, dut, aggIDs[2], 20) @@ -276,9 +323,9 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[2:(agg2.ateLagCount+1)], dutPortList[2:(agg2.ateLagCount+1)]); err != nil { t.Fatal(err) } - // Ensure Load Balancing 50:50 on LAG_2 and LAG_3 for prefix's pfx2, pfx3 and pfx4 + // Ensure Load WECMP on LAG_2 and LAG_3 for prefix's pfx2, pfx3 and pfx4 weights := trafficRXWeights(t, ate, []string{agg2.ateAggName, agg3.ateAggName}, flows[0]) - for idx, weight := range equalDistributionWeights { + for idx, weight := range trafficDistributionWeights { if got, want := weights[idx], weight; got < want-ecmpTolerance || got > want+ecmpTolerance { t.Errorf("ECMP Percentage for Aggregate Index: %d: got %d, want %d", idx+1, got, want) } @@ -294,12 +341,6 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { t.Fatal("ISIS Adjacency is Down on LAG_2") } configForwardingViable(t, dut, dutPortList[1:2], false) - // Ensure ISIS Adjacency is Down on LAG_2 - if ok := awaitAdjacency(t, dut, aggIDs[1], oc.Isis_IsisInterfaceAdjState_DOWN); !ok { - if presence := gnmi.LookupAll(t, dut, ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis().Interface(aggIDs[1]).LevelAny().AdjacencyAny().AdjacencyState().State()); len(presence) > 0 { - t.Fatalf("ISIS Adjacency is Established on LAG_2") - } - } startTraffic(t, dut, ate, top) if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:(agg2.ateLagCount+1)], dutPortList[1:(agg2.ateLagCount+1)]); err != nil { t.Fatal(err) @@ -330,6 +371,73 @@ func TestAggregateAllNotForwardingViable(t *testing.T) { t.Fatal("Packet Dropped, LossPct for flow ") } }) + + // Reset Forwarding-Viable to True for all the ports of LAG_2 + configForwardingViable(t, dut, dutPortList[1:agg2.ateLagCount], true) + + t.Run("RT-5.7.2.4: Setting Forwarding-Viable to False and Down some Port on Lag2", func(t *testing.T) { + // Ensure ISIS Adjacency is up on LAG_2 + if ok := awaitAdjacency(t, dut, aggIDs[1], oc.Isis_IsisInterfaceAdjState_UP); !ok { + t.Fatal("ISIS Adjacency is Down on LAG_2") + } + configForwardingViable(t, dut, dutPortList[1:agg2.ateLagCount+1], false) + // Ensure ISIS Adjacency is Down on LAG_2 + + if len(dut.Ports()) > 4 { + t.Logf("Bring Down Port2 and Port3") + setDUTInterfaceWithState(t, dut, []*ondatra.Port{dut.Port(t, "port2"), dut.Port(t, "port3")}, false) + } else { + t.Logf("Bring Down Port2") + setDUTInterfaceWithState(t, dut, []*ondatra.Port{dut.Port(t, "port2")}, false) + } + // Ensure LAG2 is UP when all member are Forwarding unviable + gnmi.Await(t, dut, gnmi.OC().Interface(aggIDs[1]).OperStatus().State(), 60*time.Second, oc.Interface_OperStatus_UP) + startTraffic(t, dut, ate, top) + if len(dut.Ports()) > 4 { + if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:agg2.ateLagCount+1], dutPortList[3:agg2.ateLagCount+1]); err != nil { + t.Fatal(err) + } + } else { + if err := confirmNonViableForwardingTraffic(t, dut, ate, atePortList[1:agg2.ateLagCount], dutPortList[2:agg2.ateLagCount]); err != nil { + t.Fatal(err) + } + } + // Ensure that traffic from ATE port1 to pfx4 transmitted out using LAG3 + if ok := verifyTrafficFlow(t, ate, flows[1:2], true); !ok { + t.Fatal("Packet Dropped, LossPct for flow ", flows[1].Name()) + } + // Ensure there is traffic received on DUT LAG_3 + if got := validateLag3Traffic(t, dut, ate, dutPortList[(agg2.ateLagCount+1):]); got == false { + t.Fatal("Packets are Received on DUT LAG_3") + } + if ok := verifyTrafficFlow(t, ate, flows[0:1], true); !ok { + t.Fatal("Packet Dropped, LossPct for flow ", flows[0].Name()) + } + }) +} + +func setDUTInterfaceWithState(t testing.TB, dut *ondatra.DUTDevice, ports []*ondatra.Port, state bool) { + dc := gnmi.OC() + i := &oc.Interface{} + i.Enabled = ygot.Bool(state) + i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd + for _, p := range ports { + i.Name = ygot.String(p.Name()) + gnmi.Update(t, dut, dc.Interface(p.Name()).Config(), i) + } +} + +// configureNetworkInstance configures vrfs DECAP_TE_VRF,ENCAP_TE_VRF_A,ENCAP_TE_VRF_B, +// TE_VRF_222, TE_VRF_111. +func configNonDefaultNetworkInstance(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + c := &oc.Root{} + vrfs := []string{niTeVrf111, niRepairVrf} + for _, vrf := range vrfs { + ni := c.GetOrCreateNetworkInstance(vrf) + ni.Type = oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_L3VRF + gnmi.Replace(t, dut, gnmi.OC().NetworkInstance(vrf).Config(), ni) + } } // configureDUT configures DUT @@ -343,6 +451,7 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) []string { if len(dut.Ports()) > 4 { agg2.ateLagCount = uint32(len(dut.Ports()) - 3) agg3.ateLagCount = 2 + trafficDistributionWeights = []uint64{33, 67} } var aggIDs []string for _, a := range []*aggPortData{agg1, agg2, agg3} { @@ -459,9 +568,6 @@ func configAggregateDUT(dut *ondatra.DUTDevice, i *oc.Interface, a *aggPortData) a4 := s4.GetOrCreateAddress(a.dutIPv4) a4.PrefixLength = ygot.Uint8(ipv4PLen) - // n4 := s4.GetOrCreateNeighbor(a.ateIPv4) - // n4.LinkLayerAddress = ygot.String(a.ateAggMAC) - s6 := s.GetOrCreateIpv6() if deviations.InterfaceEnabled(dut) { s6.Enabled = ygot.Bool(true) @@ -858,7 +964,6 @@ func installGRIBIRoutes(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDe client.Connection().WithStub(gribic).WithPersistence().WithInitialElectionID(12, 0). WithRedundancyMode(fluent.ElectedPrimaryClient).WithFIBACK() client.Start(ctx, t) - defer client.Stop(t) gribi.FlushAll(client) client.StartSending(ctx, t) gribi.BecomeLeader(t, client) @@ -871,34 +976,86 @@ func installGRIBIRoutes(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDe top: top, } - t.Logf("An IPv4Entry for %s is pointing to ATE LAG2 via gRIBI", pfx4AdvV4.ip+"/24") + t.Logf("An IPv4Entry for %s is pointing to ATE LAG2 and Backup NHG to LAG3 via gRIBI", pfx4AdvV4.ip+"/24") + // Programming AFT entries for backup NHG tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithIndex(3000).WithNextHopNetworkInstance(niRepairVrf), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithID(3000).AddNextHop(3000, 1), + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). - WithIndex(uint64(100)).WithIPAddress(agg2.ateIPv4), - fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). - WithIndex(uint64(101)).WithIPAddress(agg3.ateIPv4), + WithIndex(uint64(1000)).WithIPAddress(agg3.ateIPv4), fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). - WithID(uint64(100)).AddNextHop(uint64(100), uint64(1)).AddNextHop(uint64(101), uint64(1))) + WithID(uint64(1000)).AddNextHop(uint64(1000), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niRepairVrf).WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix(pfx4AdvV4.ip+"/24").WithNextHopGroup(1000)) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, time.Minute); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation(pfx4AdvV4.ip+"/24"). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) + // Programming AFT entries for prefixes Encap in Default VRF tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(1)).WithEncapsulateHeader(fluent.IPinIP). + WithIPinIP("100.0.1.254", "100.0.4.254"). + WithNextHopNetworkInstance(niTeVrf111), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(1)).AddNextHop(uint64(1), uint64(1)), + fluent.IPv4Entry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). - WithPrefix(pfx4AdvV4.ip+"/24").WithNextHopGroup(uint64(100))) + WithPrefix(pfx4AdvV4.ip+"/24").WithNextHopGroup(1). + WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut))) - if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 5*time.Minute); err != nil { + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, time.Minute); err != nil { t.Logf("Could not program entries via client, got err, check error codes: %v", err) } - defaultVRFIPList := []string{pfx4AdvV4.ip} - for ip := range defaultVRFIPList { - chk.HasResult(t, tcArgs.client.Results(t), - fluent.OperationResult(). - WithIPv4Operation(defaultVRFIPList[ip]+"/24"). - WithOperationType(constants.Add). - WithProgrammingResult(fluent.InstalledInFIB). - AsResult(), - chk.IgnoreOperationID(), - ) + + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation(pfx4AdvV4.ip+"/24"). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) + + // Programming AFT entries for encapped prefixes "100.0.4.254/32" + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(101)).WithIPAddress(agg2.ateIPv4), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(101)).AddNextHop(uint64(101), uint64(1)).WithBackupNHG(3000), + + fluent.IPv4Entry().WithNetworkInstance(niTeVrf111). + WithPrefix("100.0.4.254/32").WithNextHopGroup(101). + WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)), + ) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 5*time.Minute); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) } + + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation("100.0.4.254/32"). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) } // awaitTimeout calls a fluent client Await, adding a timeout to the context. diff --git a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/metadata.textproto b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/metadata.textproto index 0896d869a61..a7ce571869e 100644 --- a/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/metadata.textproto +++ b/feature/interface/aggregate/otg_tests/aggregate_all_not_viable_test/metadata.textproto @@ -20,6 +20,19 @@ platform_exceptions: { } } +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + interface_ref_config_unsupported:true + wecmp_auto_unsupported: true + isis_loopback_required: true + weighted_ecmp_fixed_packet_verification: true + interface_ref_interface_id_format: true + } +} + platform_exceptions: { platform: { vendor: ARISTA