Skip to content
20 changes: 12 additions & 8 deletions feature/bgp/otg_tests/bgp_scale_test/bgp_scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,12 +1072,12 @@ func verifyPortsUp(t *testing.T, dev *ondatra.Device) {
for _, p := range dev.Ports() {
status := gnmi.Get(t, dev, gnmi.OC().Interface(p.Name()).OperStatus().State())
if want := oc.Interface_OperStatus_UP; status != want {
t.Errorf("%s Status: got %v, want %v", p, status, want)
t.Fatalf("%s Status: got %v, want %v", p, status, want)
}
}
status := gnmi.Get(t, dev, gnmi.OC().Interface(aggIDs[len(aggIDs)-1]).OperStatus().State())
if want := oc.Interface_OperStatus_UP; status != want {
t.Errorf("%s Status: got %v, want %v", aggIDs[len(aggIDs)-1], status, want)
t.Fatalf("%s Status: got %v, want %v", aggIDs[len(aggIDs)-1], status, want)
}
}

Expand Down Expand Up @@ -1217,7 +1217,7 @@ func verifyISISTelemetry(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATED
t.Logf("Break from Loop:Iteration %d: Number of established IS-IS sessions: UP %v DOWN %v Configured %v", i, counter, counter2, atePort4.numSubIntf)
break
}
t.Logf("Iteration %d: Number of established IS-IS sessions: %v %v", i, counter, counter2)
t.Logf("Iteration %d: Number of established IS-IS sessions: UP %v DOWN %v Configured %d", i, counter, counter2, atePort4.numSubIntf)
time.Sleep(30 * time.Second)
}
if counter != int(atePort4.numSubIntf) {
Expand Down Expand Up @@ -1682,15 +1682,18 @@ func configureDUTBGP(t *testing.T, as uint32, nbrs []*bgpNeighbor, dut *ondatra.
bgp := niProto.GetOrCreateBgp()

// Global Configuration using cfgplugins
cfgplugins.ConfigureGlobal(bgp, dut,
globalOpts := []cfgplugins.GlobalOption{
cfgplugins.WithAS(as),
cfgplugins.WithRouterID(dutLoopback.IPv4),
cfgplugins.WithGlobalGracefulRestart(true, 120, 300),
cfgplugins.WithGlobalAfiSafiEnabled(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, true),
cfgplugins.WithGlobalAfiSafiEnabled(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST, true),
cfgplugins.WithExternalRouteDistance(9),
cfgplugins.WithGlobalEBGPMultipath(64),
)
}
if dut.Vendor() != ondatra.JUNIPER {
globalOpts = append(globalOpts, cfgplugins.WithGlobalEBGPMultipath(64))
}
cfgplugins.ConfigureGlobal(bgp, dut, globalOpts...)
if deviations.BgpDistanceOcPathUnsupported(dut) {
distanceConfigv4 = fmt.Sprintf("router bgp %d instance BGP\naddress-family %s unicast\ndistance bgp %d 200 200\n", dutAS, "ipv4", 9)
distanceConfigv6 = fmt.Sprintf("router bgp %d instance BGP\naddress-family %s unicast\ndistance bgp %d 200 200\n", dutAS, "ipv6", 9)
Expand All @@ -1716,7 +1719,7 @@ func configureDUTBGP(t *testing.T, as uint32, nbrs []*bgpNeighbor, dut *ondatra.
}

peerGroup := bgp.GetOrCreatePeerGroup(pg.pgName)
cfgplugins.ConfigurePeerGroup(peerGroup, dut,
pgOpts := []cfgplugins.PeerGroupOption{
cfgplugins.WithPeerAS(pg.pgAS),
cfgplugins.WithPGTimers(pg.pgHoldTimer, pg.pgKeepaliveTimer, pg.pgUpdateTimer),
cfgplugins.WithPGDescription(pg.pgName),
Expand All @@ -1726,7 +1729,8 @@ func configureDUTBGP(t *testing.T, as uint32, nbrs []*bgpNeighbor, dut *ondatra.
cfgplugins.WithPGSendCommunity([]oc.E_Bgp_CommunityType{oc.Bgp_CommunityType_STANDARD, oc.Bgp_CommunityType_EXTENDED}),
cfgplugins.WithPGAfiSafiEnabled(pg.pgAFISAFI, true, true),
cfgplugins.ApplyPGRoutingPolicy(pg.pgImportPolicy, pg.pgExportPolicy, dut.Vendor() == ondatra.CISCO || delLinkbwCLIConfig != ""),
)
}
cfgplugins.ConfigurePeerGroup(peerGroup, dut, pgOpts...)
}

for _, nbr := range nbrs {
Expand Down
11 changes: 5 additions & 6 deletions feature/bgp/otg_tests/bgp_scale_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ platform_exceptions: {
omit_l2_mtu: true
skip_tcp_negotiated_mss_check: true
interface_enabled: true
ipv4_missing_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
bgp_default_policy_unsupported: true
require_routed_subinterface_0: true
explicit_interface_in_default_vrf: false
route_policy_under_afi_unsupported: true
default_bgp_instance_name: "BGP"
isis_mpls_unsupported: true
explicit_port_speed: true
isis_lsp_tlvs_oc_unsupported: true
}
}
platform_exceptions: {
Expand All @@ -30,6 +30,7 @@ platform_exceptions: {
}
deviations: {
isis_level_enabled: true
interface_ref_interface_id_format: true
bgp_max_multipath_paths_unsupported: true
multipath_unsupported_neighbor_or_afisafi: true
route_policy_under_afi_unsupported: true
Expand All @@ -51,8 +52,6 @@ platform_exceptions: {
community_member_regex_unsupported: true
default_route_policy_unsupported: true
bgp_conditions_match_community_set_unsupported: true
skip_isis_set_level: true
skip_isis_set_metric_style_type: true
bgp_graceful_restart_under_afi_safi_unsupported: true
bgp_gr_helper_disable_unsupported: true
skip_bgp_send_community_type: true
Expand All @@ -68,8 +67,8 @@ platform_exceptions: {
}
deviations: {
explicit_interface_in_default_vrf: true
interface_enabled: true
isis_interface_afi_unsupported: true
ipv4_missing_enabled: true
aggregate_atomic_update: true
missing_isis_interface_afi_safi_enable: true
missing_value_for_defaults: true
require_routed_subinterface_0: true
Expand Down
1 change: 0 additions & 1 deletion internal/cfgplugins/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,6 @@ func WithPGMultipath(pgName string, enableMultipath bool) PeerGroupOption {
// BGP multipath enable/disable at the peer-group level not required b/376799583
fmt.Printf("PeerGroup %s: BGP Multipath enable/disable not required under Peer-group by %s hence skipping", pgName, dut.Vendor())
case ondatra.JUNIPER:
pgaf.GetOrCreateUseMultiplePaths().Enabled = ygot.Bool(true)
pg.GetOrCreateUseMultiplePaths().Enabled = ygot.Bool(true)
pg.GetOrCreateUseMultiplePaths().GetOrCreateEbgp().SetAllowMultipleAs(true)
default:
Expand Down
10 changes: 5 additions & 5 deletions internal/cfgplugins/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ func AddSubInterface(t *testing.T, dut *ondatra.DUTDevice, b *gnmi.SetBatch, i *

if s.IPv4Address != nil {
sub.GetOrCreateIpv4().GetOrCreateAddress(s.IPv4Address.String()).PrefixLength = ygot.Uint8(uint8(s.IPv4PrefixLen))
if deviations.InterfaceEnabled(dut) && !deviations.IPv4MissingEnabled(dut) {
if deviations.IPv4MissingEnabled(dut) {
sub.GetOrCreateIpv4().SetEnabled(true)
}
}
Expand All @@ -924,7 +924,7 @@ func NewAggregateInterface(t *testing.T, dut *ondatra.DUTDevice, b *gnmi.SetBatc
aggID := l.LagName
agg := l.NewOCInterface(aggID, dut)
agg.Type = oc.IETFInterfaces_InterfaceType_ieee8023adLag
if !deviations.IPv4MissingEnabled(dut) && len(l.SubInterfaces) == 0 {
if deviations.IPv4MissingEnabled(dut) {
agg.GetSubinterface(0).GetOrCreateIpv4().SetEnabled(true)
agg.GetSubinterface(0).GetOrCreateIpv6().SetEnabled(true)
}
Expand All @@ -935,7 +935,6 @@ func NewAggregateInterface(t *testing.T, dut *ondatra.DUTDevice, b *gnmi.SetBatc
}

agg.GetOrCreateAggregation().LagType = l.AggType
gnmi.BatchReplace(b, gnmi.OC().Interface(aggID).Config(), agg)

// Set LACP mode to ACTIVE for the LAG interface
if l.LacpParams != nil {
Expand All @@ -948,6 +947,7 @@ func NewAggregateInterface(t *testing.T, dut *ondatra.DUTDevice, b *gnmi.SetBatc
lacpPath := gnmi.OC().Lacp().Interface(aggID)
gnmi.BatchReplace(b, lacpPath.Config(), lacp)
}
gnmi.BatchReplace(b, gnmi.OC().Interface(aggID).Config(), agg)
gnmi.BatchDelete(b, gnmi.OC().Interface(aggID).Aggregation().MinLinks().Config())

l.PopulateOndatraPorts(t, dut)
Expand Down Expand Up @@ -1094,7 +1094,7 @@ func ConfigureSubinterfaceIPs(s *oc.Interface_Subinterface, dut *ondatra.DUTDevi
// IPv4 Configuration
if ipv4Addr != "" {
s4 := s.GetOrCreateIpv4()
if deviations.InterfaceEnabled(dut) && !deviations.IPv4MissingEnabled(dut) {
if deviations.IPv4MissingEnabled(dut) {
s4.Enabled = ygot.Bool(true)
}
s4a := s4.GetOrCreateAddress(ipv4Addr)
Expand All @@ -1104,7 +1104,7 @@ func ConfigureSubinterfaceIPs(s *oc.Interface_Subinterface, dut *ondatra.DUTDevi
// IPv6 Configuration
if ipv6Addr != "" {
s6 := s.GetOrCreateIpv6()
if deviations.InterfaceEnabled(dut) {
if deviations.IPv4MissingEnabled(dut) {
s6.Enabled = ygot.Bool(true)
}
s6a := s6.GetOrCreateAddress(ipv6Addr)
Expand Down
2 changes: 1 addition & 1 deletion internal/otg_helpers/otg_config_helpers/otgbgphelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func CreateBGPASPath(asNumbers []uint32, segmentType gosnappi.BgpAsPathSegmentTy
func ConfigureISIS(t *testing.T, dev gosnappi.Device, attrs *ISISAttrs) gosnappi.DeviceIsisRouter {
t.Helper()
isis := dev.Isis().SetName(attrs.Name).SetSystemId(attrs.SystemID)
isis.Basic().SetHostname(attrs.Hostname).SetLearnedLspFilter(true)
isis.Basic().SetHostname(attrs.Hostname).SetLearnedLspFilter(false)
isis.Advanced().SetAreaAddresses(attrs.AreaAddresses)

for _, intfAttrs := range attrs.Interfaces {
Expand Down
Loading