Skip to content

Commit

Permalink
Merge branch 'main' into jianchen/oc_path
Browse files Browse the repository at this point in the history
  • Loading branch information
jianchen-g committed Jan 27, 2025
2 parents 1739477 + 79aa0be commit 1110de7
Showing 65 changed files with 1,758 additions and 701 deletions.
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@ platform_exceptions: {
default_network_instance: "default"
isis_instance_enabled_required: true
isis_interface_afi_unsupported: true
route_policy_under_afi_unsupported: true
}
}

Original file line number Diff line number Diff line change
@@ -49,6 +49,5 @@ platform_exceptions: {
default_network_instance: "default"
isis_instance_enabled_required: true
isis_interface_afi_unsupported: true
route_policy_under_afi_unsupported: true
}
}
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -16,9 +16,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
isis_interface_afi_unsupported: true
skip_isis_set_level: true
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
skip_setting_statement_for_policy: true
}
}
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_config_vrf_before_address: true
deprecated_vlan_id: true
Original file line number Diff line number Diff line change
@@ -11,16 +11,11 @@ platform_exceptions: {
}
deviations: {
isis_instance_enabled_required: true
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_interface_afi_unsupported: true
skip_isis_set_level: true
skip_isis_set_metric_style_type: true
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
}
}
platform_exceptions: {
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
network_instance_table_deletion_required: true
interface_enabled: true
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ const (
var (
dutPort1 = attrs.Attributes{
Desc: "DUT to ATE Port1",
Name: "port1",
IPv4: "192.0.2.1",
IPv6: "2001:db8::192:0:2:1",
IPv4Len: plenIPv4,
@@ -77,6 +78,7 @@ var (
}
dutPort2 = attrs.Attributes{
Desc: "DUT to ATE Port2",
Name: "port2",
IPv4: "192.0.2.5",
IPv6: "2001:db8::192:0:2:5",
IPv4Len: plenIPv4,
@@ -111,12 +113,17 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) {

i2 := dutPort2.NewOCInterface(dut.Port(t, "port2").Name(), dut)
gnmi.Replace(t, dut, dc.Interface(i2.GetName()).Config(), i2)
if deviations.ExplicitInterfaceInDefaultVRF(dut) {
fptest.AssignToNetworkInstance(t, dut, i1.GetName(), deviations.DefaultNetworkInstance(dut), 0)
fptest.AssignToNetworkInstance(t, dut, i2.GetName(), deviations.DefaultNetworkInstance(dut), 0)
}
}

// verifyPortsUp asserts that each port on the device is operating.
func verifyPortsUp(t *testing.T, dev *ondatra.Device) {
func verifyPortsUp(t *testing.T, dev *ondatra.Device, portList []string) {
t.Helper()
for _, p := range dev.Ports() {
for _, port := range portList {
p := dev.Port(t, port)
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)
@@ -144,7 +151,11 @@ func bgpCreateNbr(t *testing.T, localAs, peerAs uint32, dut *ondatra.DUTDevice,
pg2 := bgp.GetOrCreatePeerGroup(peerGrpName2) // V6 peer group
pg2.PeerAs = ygot.Uint32(dutAS)
pg2.PeerGroupName = ygot.String(peerGrpName2)

if isV4Only {
global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true)
} else {
global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST).Enabled = ygot.Bool(true)
}
for _, nbr := range nbrs {
nv4 := bgp.GetOrCreateNeighbor(nbr.neighborip)
nv4.PeerGroup = ygot.String(nbr.peerGrp)
@@ -479,7 +490,8 @@ func TestAfiSafiOcDefaults(t *testing.T) {
})

t.Run("Verify port status on DUT", func(t *testing.T) {
verifyPortsUp(t, dut.Device)
portList := []string{"port1", "port2"}
verifyPortsUp(t, dut.Device, portList)
})

t.Run("Verify BGP telemetry", func(t *testing.T) {
Original file line number Diff line number Diff line change
@@ -28,6 +28,9 @@ platform_exceptions: {
vendor: NOKIA
}
deviations: {
skip_bgp_session_check_without_afisafi: true
explicit_interface_in_default_vrf: true
bgp_global_extended_next_hop_encoding_unsupported: true
interface_enabled: true
}
}
@@ -36,7 +39,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
network_instance_table_deletion_required: true
interface_enabled: true
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -176,12 +176,10 @@ func configureOTG(t *testing.T, otg *otg.OTG) (gosnappi.BgpV4Peer, gosnappi.Devi

iDut1Bgp4Peer := iDut1Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut1Ipv4.Name()).Peers().Add().SetName(otgPort1V4Peer)
iDut1Bgp4Peer.SetPeerAddress(iDut1Ipv4.Gateway()).SetAsNumber(ateAS1).SetAsType(gosnappi.BgpV4PeerAsType.EBGP)
iDut1Bgp4Peer.Capability().SetIpv4UnicastAddPath(true).SetIpv6UnicastAddPath(true)
iDut1Bgp4Peer.LearnedInformationFilter().SetUnicastIpv4Prefix(true).SetUnicastIpv6Prefix(true)

iDut2Bgp4Peer := iDut2Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut2Ipv4.Name()).Peers().Add().SetName(otgPort2V4Peer)
iDut2Bgp4Peer.SetPeerAddress(iDut2Ipv4.Gateway()).SetAsNumber(ateAS2).SetAsType(gosnappi.BgpV4PeerAsType.EBGP)
iDut2Bgp4Peer.Capability().SetIpv4UnicastAddPath(true).SetIpv6UnicastAddPath(true)
iDut2Bgp4Peer.LearnedInformationFilter().SetUnicastIpv4Prefix(true).SetUnicastIpv6Prefix(true)

t.Logf("Pushing config to OTG and starting protocols...")
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -42,7 +42,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
}
}

Original file line number Diff line number Diff line change
@@ -11,13 +11,10 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
}
}
platform_exceptions: {
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
missing_value_for_defaults: true
skip_set_rp_match_set_options: true
default_import_export_policy_unsupported: false
skip_setting_statement_for_policy: true
}
Original file line number Diff line number Diff line change
@@ -11,13 +11,10 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
}
}
platform_exceptions: {
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@ platform_exceptions: {
missing_isis_interface_afi_safi_enable: true
isis_interface_afi_unsupported: true
isis_instance_enabled_required: true
default_import_export_policy_unsupported: true
bgp_default_policy_unsupported: true
}
}
Original file line number Diff line number Diff line change
@@ -16,10 +16,7 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
missing_value_for_defaults: true
skip_set_rp_match_set_options: true
bgp_community_set_refs_unsupported: true
bgp_community_member_is_a_string: true
skip_bgp_send_community_type: true
}
}
platform_exceptions: {
Original file line number Diff line number Diff line change
@@ -10,13 +10,10 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
skip_set_rp_match_set_options: true
skip_setting_disable_metric_propagation: true
bgp_extended_community_index_unsupported: true
}
}
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
missing_value_for_defaults: true
skip_set_rp_match_set_options: true
routing_policy_chaining_unsupported: true
}
}
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ platform_exceptions: {
default_network_instance: "default"
missing_value_for_defaults: true
skip_set_rp_match_set_options: true
default_import_export_policy_unsupported: true
}
}
platform_exceptions: {
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ platform_exceptions: {
skip_set_rp_match_set_options: true
skip_prefix_set_mode: true
table_connections_unsupported: true
use_vendor_native_tag_set_config: true
skip_bgp_send_community_type: true
}
}
@@ -31,10 +30,7 @@ platform_exceptions: {
default_network_instance: "default"
interface_enabled: true
static_protocol_name: "STATIC"
skip_bgp_send_community_type: true
skip_setting_disable_metric_propagation: true
same_policy_attached_to_all_afis: true
set_metric_as_preference: true
}
}
platform_exceptions: {
1 change: 0 additions & 1 deletion feature/bgp/tests/local_bgp_test/metadata.textproto
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ platform_exceptions: {
}
deviations: {
connect_retry: true
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
network_instance_table_deletion_required: true
missing_value_for_defaults: true
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ platform_exceptions: {
vendor: ARISTA
}
deviations: {
route_policy_under_afi_unsupported: true
omit_l2_mtu: true
interface_enabled: true
default_network_instance: "default"
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ between 2 DUTs.

## Topology

* dut1:port1 <--> port1:dut2
* dut1:port1 <--> port1:dut2 (port1 as singleton and memberlink)

## Procedure

Loading

0 comments on commit 1110de7

Please sign in to comment.