@@ -23,7 +23,6 @@ import (
2323 "github.com/openconfig/ondatra/netutil"
2424 "github.com/openconfig/ondatra/otg"
2525 "github.com/openconfig/ygnmi/ygnmi"
26- "github.com/openconfig/ygot/ygot"
2726)
2827
2928func TestMain (m * testing.M ) {
@@ -686,7 +685,7 @@ func configInterfaceDUT(p *ondatra.Port, a *attrs.Attributes, dut *ondatra.DUTDe
686685 i := a .NewOCInterface (p .Name (), dut )
687686 s4 := i .GetOrCreateSubinterface (0 ).GetOrCreateIpv4 ()
688687 if deviations .InterfaceEnabled (dut ) && ! deviations .IPv4MissingEnabled (dut ) {
689- s4 .Enabled = ygot . Bool (true )
688+ s4 .SetEnabled (true )
690689 }
691690 i .GetOrCreateSubinterface (0 ).GetOrCreateIpv6 ()
692691
@@ -774,31 +773,31 @@ func bgpCreateNbr(t *testing.T, localAs uint32, dut *ondatra.DUTDevice, bgpNbr [
774773 bgp := niProto .GetOrCreateBgp ()
775774
776775 global := bgp .GetOrCreateGlobal ()
777- global .RouterId = ygot . String (dutloopback0 .IPv4 )
778- global .As = ygot . Uint32 (localAs )
779- global .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST ).Enabled = ygot . Bool (true )
780- global .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST ).Enabled = ygot . Bool (true )
776+ global .SetRouterId (dutloopback0 .IPv4 )
777+ global .SetAs (localAs )
778+ global .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST ).SetEnabled (true )
779+ global .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST ).SetEnabled (true )
781780
782781 for _ , nbr := range bgpNbr {
783782 pg1 := bgp .GetOrCreatePeerGroup (nbr .peerGrpName )
784- pg1 .PeerAs = ygot . Uint32 (nbr .peerAs )
783+ pg1 .SetPeerAs (nbr .peerAs )
785784
786785 bgpNbr := bgp .GetOrCreateNeighbor (nbr .nbrIp )
787- bgpNbr .PeerGroup = ygot . String (nbr .peerGrpName )
788- bgpNbr .PeerAs = ygot . Uint32 (nbr .peerAs )
789- bgpNbr .Enabled = ygot . Bool (true )
786+ bgpNbr .SetPeerGroup (nbr .peerGrpName )
787+ bgpNbr .SetPeerAs (nbr .peerAs )
788+ bgpNbr .SetEnabled (true )
790789 bgpNbrT := bgpNbr .GetOrCreateTransport ()
791790
792791 localAddressLeaf = nbr .srcIp
793792
794793 if dut .Vendor () == ondatra .CISCO {
795794 localAddressLeaf = dutloopback0 .Name
796795 }
797- bgpNbrT .LocalAddress = ygot . String (localAddressLeaf )
796+ bgpNbrT .SetLocalAddress (localAddressLeaf )
798797 af4 := bgpNbr .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST )
799- af4 .Enabled = ygot . Bool (true )
798+ af4 .SetEnabled (true )
800799 af6 := bgpNbr .GetOrCreateAfiSafi (oc .BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST )
801- af6 .Enabled = ygot . Bool (true )
800+ af6 .SetEnabled (true )
802801 }
803802
804803 gnmi .Replace (t , dut , dutConfPath .Config (), niProto )
@@ -1219,51 +1218,51 @@ func TestStaticGue(t *testing.T) {
12191218 Description : "Validate traffic with basic config" ,
12201219 testFunc : testBaselineTraffic ,
12211220 },
1222- // {
1223- // Name: "Testcase: Verify BE1 Traffic Migrated from being routed over the DUT_Port2",
1224- // Description: "Verify BE1 Traffic Migrated from being routed over the DUT_Port2",
1225- // testFunc: testBE1TrafficMigration,
1226- // },
1227- // {
1228- // Name: "Testcase: Verify AF1 Traffic Migrated from being routed over the DUT_Port2",
1229- // Description: "Verify AF1 Traffic Migrated from being routed over the DUT_Port2",
1230- // testFunc: testAF1TrafficMigration,
1231- // },
1232- // {
1233- // Name: "Testcase: Verify AF2 Traffic Migrated from being routed over the DUT_Port2",
1234- // Description: "Verify AF2 Traffic Migrated from being routed over the DUT_Port2",
1235- // testFunc: testAF2TrafficMigration,
1236- // },
1237- // {
1238- // Name: "Testcase: Verify AF3 Traffic Migrated from being routed over the DUT_Port2",
1239- // Description: "Verify AF3 Traffic Migrated from being routed over the DUT_Port2",
1240- // testFunc: testAF3TrafficMigration,
1241- // },
1242- // {
1243- // Name: "Testcase: Verify AF4 Traffic Migrated from being routed over the DUT_Port2",
1244- // Description: "Verify AF4 Traffic Migrated from being routed over the DUT_Port2",
1245- // testFunc: testAF4TrafficMigration,
1246- // },
1247- // // {
1248- // // Name: "Testcase: DUT as a GUE Decap Node",
1249- // // Description: "Verify DUT as a GUE Decap Node",
1250- // // testFunc: testDUTDecapNode,
1251- // // },
1252- // {
1253- // Name: "Testcase: Negative Scenario - EBGP Route for remote tunnel endpoints Removed",
1254- // Description: "Verify EBGP Route for remote tunnel endpoints Removed",
1255- // testFunc: testTunnelEndpointRemoved,
1256- // },
1257- // // {
1258- // // Name: "Testcase: Negative Scenario - IBGP Route for Remote Tunnel Endpoints Removed",
1259- // // Description: "Verify IBGP Route for Remote Tunnel Endpoints Removed",
1260- // // testFunc: testIbgpTunnelEndpointRemoved,
1261- // // },
1262- // {
1263- // Name: "Testcase: Establish IBGP Peering over EBGP",
1264- // Description: "Verify Establish IBGP Peering over EBGP",
1265- // testFunc: testEstablishIBGPoverEBGP,
1266- // },
1221+ {
1222+ Name : "Testcase: Verify BE1 Traffic Migrated from being routed over the DUT_Port2" ,
1223+ Description : "Verify BE1 Traffic Migrated from being routed over the DUT_Port2" ,
1224+ testFunc : testBE1TrafficMigration ,
1225+ },
1226+ {
1227+ Name : "Testcase: Verify AF1 Traffic Migrated from being routed over the DUT_Port2" ,
1228+ Description : "Verify AF1 Traffic Migrated from being routed over the DUT_Port2" ,
1229+ testFunc : testAF1TrafficMigration ,
1230+ },
1231+ {
1232+ Name : "Testcase: Verify AF2 Traffic Migrated from being routed over the DUT_Port2" ,
1233+ Description : "Verify AF2 Traffic Migrated from being routed over the DUT_Port2" ,
1234+ testFunc : testAF2TrafficMigration ,
1235+ },
1236+ {
1237+ Name : "Testcase: Verify AF3 Traffic Migrated from being routed over the DUT_Port2" ,
1238+ Description : "Verify AF3 Traffic Migrated from being routed over the DUT_Port2" ,
1239+ testFunc : testAF3TrafficMigration ,
1240+ },
1241+ {
1242+ Name : "Testcase: Verify AF4 Traffic Migrated from being routed over the DUT_Port2" ,
1243+ Description : "Verify AF4 Traffic Migrated from being routed over the DUT_Port2" ,
1244+ testFunc : testAF4TrafficMigration ,
1245+ },
1246+ // {
1247+ // Name: "Testcase: DUT as a GUE Decap Node",
1248+ // Description: "Verify DUT as a GUE Decap Node",
1249+ // testFunc: testDUTDecapNode,
1250+ // },
1251+ {
1252+ Name : "Testcase: Negative Scenario - EBGP Route for remote tunnel endpoints Removed" ,
1253+ Description : "Verify EBGP Route for remote tunnel endpoints Removed" ,
1254+ testFunc : testTunnelEndpointRemoved ,
1255+ },
1256+ // {
1257+ // Name: "Testcase: Negative Scenario - IBGP Route for Remote Tunnel Endpoints Removed",
1258+ // Description: "Verify IBGP Route for Remote Tunnel Endpoints Removed",
1259+ // testFunc: testIbgpTunnelEndpointRemoved,
1260+ // },
1261+ {
1262+ Name : "Testcase: Establish IBGP Peering over EBGP" ,
1263+ Description : "Verify Establish IBGP Peering over EBGP" ,
1264+ testFunc : testEstablishIBGPoverEBGP ,
1265+ },
12671266 }
12681267
12691268 // Run the test cases.
0 commit comments