Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT-1.32 : actions_MED_LocPref_prepend_flow_control_test.go #2767

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
215b77b
updated RT-1.32
cprabha Mar 6, 2024
a35bce0
Merge branch 'main' into RT-1.32
cprabha Mar 6, 2024
c545a3f
Merge branch 'main' into RT-1.32
cprabha Mar 18, 2024
17cc615
resolving conflicts
cprabha Mar 18, 2024
4c686bb
Merge branch 'main' into RT-1.32
cprabha Mar 18, 2024
80e528e
Fixing go static error
cprabha Mar 18, 2024
01a28b4
Merge branch 'RT-1.32' of https://github.com/cprabha/featureprofiles …
cprabha Mar 18, 2024
b6023a1
Merge branch 'main' into RT-1.32
cprabha Mar 19, 2024
b3cc76b
Resolving conflicts
cprabha Mar 19, 2024
e10b88e
Merge branch 'main' into RT-1.32
cprabha Mar 25, 2024
a15fbbd
Resolving conflicts
cprabha Mar 25, 2024
3f1340b
Changed folder name as per latest git commit
cprabha Apr 5, 2024
ff48324
updating with git copy of README
cprabha Apr 5, 2024
e3cfa2a
Merge branch 'main' into RT-1.32
cprabha Apr 22, 2024
2b9c1dd
Resolving conflicts
cprabha Apr 24, 2024
d04d22e
Resolving conflicts
cprabha Aug 7, 2024
e6af919
updated
cprabha Aug 13, 2024
90d2665
Merge branch 'main' into RT-1.32
cprabha Aug 13, 2024
afb9a30
updating deviations
cprabha Aug 13, 2024
e041fa1
Merge branch 'RT-1.32' of https://github.com/cprabha/featureprofiles …
cprabha Aug 13, 2024
304074a
resolving conflicts
cprabha Aug 13, 2024
4dec617
Resvoling conflicts
cprabha Aug 13, 2024
74bf297
Merge branch 'main' into RT-1.32
Swetha-haridasula Aug 19, 2024
6282a97
Merge branch 'main' into RT-1.32
cprabha Aug 19, 2024
e293824
Merge branch 'main' into RT-1.32
cprabha Aug 22, 2024
326ab83
resolving conflicts
cprabha Aug 22, 2024
5c62b78
Merge branch 'main' into RT-1.32
cprabha Aug 26, 2024
1ac36a2
Added verification for setmedincrease policy
cprabha Aug 26, 2024
a88204a
updated verification
cprabha Aug 26, 2024
10e3fe7
Merge branch 'main' into RT-1.32
cprabha Aug 28, 2024
789a72c
Resolving conflicts
cprabha Aug 28, 2024
d0128d5
Merge branch 'main' into RT-1.32
cprabha Oct 16, 2024
2480605
resoving conflicts
cprabha Oct 16, 2024
dd22724
Merge branch 'main' into RT-1.32
cprabha Oct 24, 2024
49db4da
Resolving conflicts
cprabha Oct 24, 2024
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
Prev Previous commit
Next Next commit
updated
  • Loading branch information
cprabha committed Aug 13, 2024
commit e6af9192eb92344d1e11c2ef571063d0f300bf47
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
initialLocalPrefValue = 50
initialMEDValue = 50
setMEDPolicy = "med-policy"
setMEDIncreasePolicy = "med-increase-policy"
matchStatement1 = "match-statement-1"
setPrependPolicy = "prepend-policy"
testASN = 23456
Expand Down Expand Up @@ -227,12 +228,11 @@ func configureASLocalPrefMEDPolicy(t *testing.T, dut *ondatra.DUTDevice, policyT
actions.GetOrCreateBgpActions().SetLocalPref = ygot.Uint32(uint32(metric))
actions.PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE
case setMEDPolicy:
if strings.Contains(policyValue, "+") {
actions.GetOrCreateBgpActions().SetMed = oc.UnionString(policyValue)
} else {
metric, _ := strconv.Atoi(policyValue)
actions.GetOrCreateBgpActions().SetMed = oc.UnionUint32(uint32(metric))
}
metric, _ := strconv.Atoi(policyValue)
actions.GetOrCreateBgpActions().SetMed = oc.UnionUint32(uint32(metric))
actions.PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE
case setMEDIncreasePolicy:
actions.GetOrCreateBgpActions().SetMed = oc.UnionString(policyValue)
actions.PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE
case setPrependPolicy:
metric, _ := strconv.Atoi(policyValue)
Expand Down Expand Up @@ -455,7 +455,7 @@ func validateOTGBgpPrefixV4AndASLocalPrefMED(t *testing.T, otg *otg.OTG, dut *on
_, ok := gnmi.WatchAll(t,
otg,
gnmi.OTG().BgpPeer(peerName).UnicastIpv4PrefixAny().State(),
30*time.Second,
60*time.Second,
func(v *ygnmi.Value[*otgtelemetry.BgpPeer_UnicastIpv4Prefix]) bool {
_, present := v.Val()
return present
Expand Down Expand Up @@ -635,7 +635,7 @@ func TestBGPPolicy(t *testing.T) {
asn: dutAS,
}, {
desc: "Configure eBGP increase MED Import Export Policy",
rpPolicy: setMEDPolicy,
rpPolicy: setMEDIncreasePolicy,
policyTypePort1: "",
policyValue: "+100",
policyStatement: matchStatement1,
Expand Down Expand Up @@ -740,6 +740,10 @@ func TestBGPPolicy(t *testing.T) {
if tc.isDeletePolicy {
deleteBGPImportExportPolicy(t, dut, tc.deleteNbrv4, tc.deleteNbrv6, atePort2.IPv4, atePort2.IPv6)
}
if tc.rpPolicy == setMEDIncreasePolicy && deviations.BgpSetmedUnionTypeUnsupported(dut) {
t.Skip("BGP set med union is not supported in OC, skipping test.")
}

// Configure Routing Policy on the DUT.
configureASLocalPrefMEDPolicy(t, dut, tc.rpPolicy, tc.policyValue, tc.policyStatement, tc.asn)
if !deviations.DefaultRoutePolicyUnsupported(dut) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ platform_exceptions: {
vendor: JUNIPER
}
deviations: {
policy_result_type_next_statement_unsupported: true
bgp_rib_oc_path_unsupported: true
bgp_setmed_union_type_unsupported: true
}
}
platform_exceptions: {
Expand Down
3 changes: 3 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ message Metadata {
// bgp_afisafi_in_default_ni_before_other_ni is set to true for devices that require certain afi/safis to be enabled
// in default network instance (ni) before enabling afi/safis for neighbors in default or non-default ni.
bool bgp_afi_safi_in_default_ni_before_other_ni = 212;
// Juniper: b/358534837
// Devices that do not support setting med value using union type in OC.
bool bgp_setmed_union_type_unsupported = 213;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35;
Expand Down
94 changes: 54 additions & 40 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.