Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ bandwidth communities to routes based on a prefix match.

[TODO] For each policy-definition created, run a subtest (RT-7.5.4.x-<policy_name_here>-export) to

* Use gnmi Set REPLACE option to attach `allow_all` policy using `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config/export-policy` to apply the policy on the DUT bgp neighbor to the ATE port 1.
* Use gnmi Set REPLACE to attach the `allow-all` import policy to the DUT BGP
neighbor facing ATE port 1 for IPv4 and IPv6. This explicitly accepts the
source routes when the default import policy is `REJECT_ROUTE`.
Platforms with `bgp_default_import_policy_accept_route` retain their implicit
route acceptance without attaching this prerequisite policy.
* Use gnmi Set REPLACE option for:
* `/routing-policy/policy-definitions` to configure the policy
* Use `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config/export-policy`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,11 @@ func applyImportPolicyDut(t *testing.T, dut *ondatra.DUTDevice, policyName strin
func applyExportPolicyDut(t *testing.T, dut *ondatra.DUTDevice, policyName string) {
root := &oc.Root{}
dni := deviations.DefaultNetworkInstance(dut)
removeImportAndExportPolicy(t, dut)
if deviations.ExplicitlyApplyAllowAllImportPolicy(dut) {
if deviations.BgpDefaultImportPolicyAcceptRoute(dut) {
removeImportAndExportPolicy(t, dut)
} else {
// The default import policy rejects routes. Accept the source routes
// explicitly before testing the export policy on the other neighbor.
applyImportPolicyDut(t, dut, "allow-all")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ platform_exceptions: {
bgp_extended_community_index_unsupported: true
use_bgp_set_community_option_type_replace: true
bgp_rib_streaming_config_required: true
bgp_default_import_policy_accept_route: true
}
}
platform_exceptions: {
Expand All @@ -33,7 +34,6 @@ platform_exceptions: {
bgp_extended_community_index_unsupported: true
bgp_conditions_match_community_set_unsupported: true
bgp_explicit_extended_community_enable: true
explicitly_apply_allow_all_import_policy: true
}
}
platform_exceptions: {
Expand All @@ -42,6 +42,7 @@ platform_exceptions: {
}
deviations: {
bgp_rib_oc_path_unsupported: true
bgp_default_import_policy_accept_route: true
}
}
platform_exceptions: {
Expand All @@ -51,6 +52,7 @@ platform_exceptions: {
deviations: {
interface_enabled: true
explicit_interface_in_default_vrf: true
bgp_default_import_policy_accept_route: true
bgp_extended_community_index_unsupported: true
skip_bgp_send_community_type: true
}
Expand Down
10 changes: 6 additions & 4 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,7 @@
return lookupDUTDeviations(dut).GetInterfaceEthernetInblockErrorsUnsupported()
}

// WithIPAddressUnsupported returns true when an indirect next-hop (direct interface IP) with forwarding viable is used, since this is not supported.

Check failure on line 1944 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function ForwardingViableFailoverWithIndirectNHUnsupported should be of the form "ForwardingViableFailoverWithIndirectNHUnsupported ..."
// Nokia b/428883444
func ForwardingViableFailoverWithIndirectNHUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetForwardingViableFailoverWithIndirectNhUnsupported()
Expand Down Expand Up @@ -2034,10 +2034,12 @@
return lookupDUTDeviations(dut).GetWecmpSetWeightUnsupported()
}

// ExplicitlyApplyAllowAllImportPolicy returns true if we need to explicitly apply "allow-all" import policy on the device
// Cisco: https://partnerissuetracker.corp.google.com/issues/479056256
func ExplicitlyApplyAllowAllImportPolicy(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetExplicitlyApplyAllowAllImportPolicy()
// BgpDefaultImportPolicyAcceptRoute reports whether BGP accepts routes without an
// explicit import policy instead of using the OpenConfig REJECT_ROUTE default.
// Tracking issue for Cisco: https://issuetracker.google.com/479056256
// TODO: Google team to raise issues for vendors who consume this deviation
func BgpDefaultImportPolicyAcceptRoute(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetBgpDefaultImportPolicyAcceptRoute()
}
Comment thread
karthikeya-remilla marked this conversation as resolved.
Resolved

// QosFt returns the functional translator to be used for translating QoS leaves.
Expand Down Expand Up @@ -2124,7 +2126,7 @@
return lookupDUTDeviations(dut).GetGrpcServerServicesUnsupported()
}

// StaticRouteToNextHopGroupOCNotSupported returns true if device does not support oc state path static route to nexthop group

Check failure on line 2129 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function StaticRouteToNHGOCUnsupported should be of the form "StaticRouteToNHGOCUnsupported ..."
func StaticRouteToNHGOCUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetStaticRouteToNhgOcUnsupported()
}
Expand Down Expand Up @@ -2152,7 +2154,7 @@

// AcctzRecordSessionChannelIdUnsupported returns true if the device does not support Acctz record for fail user
// Juniper: https://partnerissuetracker.corp.google.com/issues/500627000
func AcctzRecordSessionChannelIdUnsupported(dut *ondatra.DUTDevice) bool {

Check failure on line 2157 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

func AcctzRecordSessionChannelIdUnsupported should be AcctzRecordSessionChannelIDUnsupported
return lookupDUTDeviations(dut).GetAcctzRecordSessionChannelIdUnsupported()
}

Expand Down Expand Up @@ -2183,30 +2185,30 @@
return lookupDUTDeviations(dut).GetEnableMplsStaticOnInterface()
}

// Device does not support secondary controller card CPU utilization

Check failure on line 2188 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function SecondaryControllerCardCpuUtilizationUnsupported should be of the form "SecondaryControllerCardCpuUtilizationUnsupported ..."
// Arista: https://issuetracker.google.com/issues/508666262
func SecondaryControllerCardCpuUtilizationUnsupported(dut *ondatra.DUTDevice) bool {

Check failure on line 2190 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

func SecondaryControllerCardCpuUtilizationUnsupported should be SecondaryControllerCardCPUUtilizationUnsupported
return lookupDUTDeviations(dut).GetSecondaryControllerCardCpuUtilizationUnsupported()
}

// Device does not support secondary controller card memory utilization

Check failure on line 2194 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function SecondaryControllerCardMemoryUtilizationUnsupported should be of the form "SecondaryControllerCardMemoryUtilizationUnsupported ..."
// Arista: https://issuetracker.google.com/issues/508656197
func SecondaryControllerCardMemoryUtilizationUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSecondaryControllerCardMemoryUtilizationUnsupported()
}

// Device does not support interface counters in fcs errors

Check failure on line 2200 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function InterfaceCountersInFcsErrorsUnsupported should be of the form "InterfaceCountersInFcsErrorsUnsupported ..."
// Arista: https://issuetracker.google.com/issues/508304903
func InterfaceCountersInFcsErrorsUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetInterfaceCountersInFcsErrorsUnsupported()
}

// Mpls static pseudowire returns true if oc is not supported

Check failure on line 2206 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function MplsStaticPseudowireOcUnsupported should be of the form "MplsStaticPseudowireOcUnsupported ..."
func MplsStaticPseudowireOcUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetMplsStaticPseudowireOcUnsupported()
}

// Vlan client encapsulation returns true if oc is not supported

Check failure on line 2211 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis (ARM64)

comment on exported function VlanClientEncapsulationOcUnsupported should be of the form "VlanClientEncapsulationOcUnsupported ..."
func VlanClientEncapsulationOcUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetVlanClientEncapsulationOcUnsupported()
}
Expand Down
9 changes: 5 additions & 4 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,6 @@ message Metadata {
// Juniper b/450154047
bool wecmp_set_weight_unsupported = 388;

// Device does not support default import policy so we need to explicitly apply "allow-all" import policy
// Cisco: https://partnerissuetracker.corp.google.com/issues/479056256
bool explicitly_apply_allow_all_import_policy = 389;
// Cisco: https://partnerissuetracker.corp.google.com/issues/429234443
// Functional translator to be used for QoS paths
string qos_ft = 390;
Expand Down Expand Up @@ -1623,8 +1620,12 @@ message Metadata {
// https://issuetracker.google.com/581463773
bool bgp_gr_helper_hold_timer_expiry_requires_stale_policy = 489;

// Device accepts BGP routes without an explicit import policy instead of
// using the OpenConfig REJECT_ROUTE default.
bool bgp_default_import_policy_accept_route = 490;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 38, 43, 90, 97, 55, 89, 19, 36, 35, 40, 113, 131, 141, 173, 234, 254, 231, 300, 241, 49, 313, 319, 345;
reserved 84, 9, 28, 20, 38, 43, 90, 97, 55, 89, 19, 36, 35, 40, 113, 131, 141, 173, 234, 254, 231, 300, 241, 49, 313, 319, 345, 389;
}

message PlatformExceptions {
Expand Down
Loading
Loading