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.30: BGP nested import/export policy attachment changes incorporated #3532

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
32ab1b2
RT-1.30: BGP nested import/export policy attachment changes incorporated
ampattan Oct 21, 2024
8886ebf
Restoring not needed changes
trathod1 Nov 7, 2024
8bc8193
Removing deviation skip_set_rp_match_set_options which is not require…
trathod1 Nov 21, 2024
0cc5886
Merge branch 'main' into AP-rt1dot30
trathod1 Dec 11, 2024
8bcc6eb
Merge branch 'main' into AP-rt1dot30
trathod1 Dec 17, 2024
459a136
Add codeowners for transceiver (#3651)
dplore Dec 17, 2024
8a4a8b6
🧹: Clean up `CODEOWNERS` to reflect approvers. (#3655)
robshakir Dec 17, 2024
199bd50
fixing isis_interface_hello_padding_enable_test (#3658)
ram-mac Dec 18, 2024
23dde2f
deviation for RT-2.9 (#3618)
manan-patel Dec 18, 2024
e1aaacb
Avoid adopting potentially unreleased changes in third-party action. …
robshakir Dec 18, 2024
761aff5
Update RT-5.6 to change link down on port1 instead of all ports (#3612)
ANISH-GOTTAPU Dec 18, 2024
72374b3
RT-5.8 monitor interface stats before proceeding with test (#3614)
karthikeya-remilla Dec 19, 2024
2e30ad5
changed pull_request event (#3643)
self-maurya Dec 19, 2024
8fc04a2
“LACPmemberTelemetry” (#3661)
Swetha-haridasula Dec 19, 2024
cdd0c1a
Remove deviation bgp_conditions_match_community_set_unsupported (#3372)
yini101 Dec 19, 2024
4e0cd92
RT-1.32 : actions_MED_LocPref_prepend_flow_control_test.go (#2767)
cprabha Dec 23, 2024
64be689
Update README.md (#2632)
marcushines Dec 26, 2024
552846d
Update ACL-1.2 to cover a management port (#3319)
dplore Dec 26, 2024
797bb7d
Update CODEOWNERS (#3668)
dplore Dec 26, 2024
7d6ea38
addressed issue where mtu 5000 and 9236 were failing as mtu was not g…
mastarkey Dec 26, 2024
33c4a32
remove duplicated tests (#2789)
xw-g Dec 26, 2024
6faefca
added cisco deviation (#3597)
manan-patel Dec 26, 2024
06ad2a8
gNMI-1.27-updating deviation,isis_level_enabled (#2815)
divyarema Dec 26, 2024
b30acd4
adding correct deviation (#2035)
abhijit-dhar Dec 26, 2024
48bf6db
Changes to await for interface up check after replace config (#3456)
priyaranjannanda Dec 26, 2024
d4897a3
adding missing path (#2534)
rszarecki Dec 26, 2024
3fc769c
fixing testregistry between RT-1.19 and RT-21.24 (#2430)
rszarecki Dec 26, 2024
77bef60
GNMI-1.18: Skipping check for empty integrated-circuit and removing d…
trathod1 Dec 26, 2024
37cb25a
fix file path (#3551)
kjahed Dec 26, 2024
7e388f9
RT-1.28: Fixed script with added deviations (#3567)
snaragund Dec 27, 2024
bde1b28
mapped gribi feature owner group (#3670)
self-maurya Dec 27, 2024
50a4acd
update RT 1.26 (#3467)
ANISH-GOTTAPU Dec 27, 2024
10d1646
reusing the function injectIPEntry() inside injectEntries() (#1957)
abhijit-dhar Dec 27, 2024
6ed5871
some gnmi.Get() call is replaced by gnmi.Watch() call (#1932)
abhijit-dhar Dec 27, 2024
895810e
Update Readme per PR#1538 changes (#1681)
arvbaska1 Dec 27, 2024
1203d17
added deviation in bgp_2byte_4byte_asn_policy_test (#3425)
self-maurya Dec 30, 2024
cbaae48
RT2.12: Minor infrastructure fix (#3671)
snaragund Jan 2, 2025
2790bb2
bug fixes: 1) in zr_laser_bias_current_test file, the time.Duration f…
jianchen-g Jan 2, 2025
467d32b
Adding deviation for isisLevelEnabled, max_ecmp_paths for Juniper rou…
priyaranjannanda Jan 3, 2025
9a7db48
RT-2.17: IS-IS Graceful Restart Restarting test plan (#3609)
rszarecki Jan 6, 2025
474642f
Modified TC5 final port up check as timing was causing flaky results …
mastarkey Jan 6, 2025
de4da43
Update scaling test TE-14.1 (#3556)
nflath Jan 6, 2025
57b3773
fixed approval workflow by allowing approval on any commit (#3675)
self-maurya Jan 6, 2025
3b64e58
SFLOW-1: Configuring sflow collector respective to IPv4 and IPv6 (#3471)
trathod1 Jan 7, 2025
027cb43
FP-1.1: Power admin DOWN/UP Test (#3144)
cakhil45 Jan 7, 2025
80958c2
moving gribi client config to main function (#3588)
cprabha Jan 7, 2025
436fe93
updated approval workflow to have min 1 approval (#3682)
self-maurya Jan 7, 2025
7722dc8
Bump github.com/go-git/go-git/v5 from 5.11.0 to 5.13.0 (#3688)
dependabot[bot] Jan 9, 2025
eed6b9c
RT_1.23 : bgp_afi_safi_defaults_test.go (#3627)
cprabha Jan 10, 2025
93251e4
fix queue name binding (#3677)
charantejag504 Jan 10, 2025
b55175b
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Crit…
ampattan Jan 10, 2025
fc02971
Create README for Storage-1.1: Storage File System Check (#3686)
AmrNJ Jan 10, 2025
1b3703a
RT-1.27: fixed failed tests (#3613)
singh-prem Jan 11, 2025
bafc96f
RT-7.4: Updating for deviation usage (#3636)
trathod1 Jan 15, 2025
2cbb6d4
Update comments in metadata proto (#1764)
prinikasn Jan 15, 2025
3c40a0a
Adding deviation for rate class unsupport option for the ETH channel …
jianchen-g Jan 16, 2025
210fc13
fix collateral from PR3658 (#3696)
ram-mac Jan 17, 2025
3b5f759
- Added MedAction to configure and enable the MED value.
ampattan Jan 17, 2025
4130109
-Added updated ondatra files.
ampattan Jan 17, 2025
29e5b00
Merge branch 'main' into AP-rt1dot30
ampattan Jan 17, 2025
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 @@ -36,4 +36,13 @@ platform_exceptions: {
bgp_rib_oc_path_unsupported: true
}
}

platform_exceptions: {
platform: {
vendor: NOKIA
}
deviations: {
skip_prefix_set_mode: true
explicit_interface_in_default_vrf: true
interface_enabled: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ func configureImportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice) {
t.Logf("Configuring nested policy")
// Configure a prefix-set for route filtering/matching.
prefixSet := rp.GetOrCreateDefinedSets().GetOrCreatePrefixSet(v4PrefixSet)
prefixSet.SetMode(oc.PrefixSet_Mode_IPV4)
if !deviations.SkipPrefixSetMode(dut) {
prefixSet.SetMode(oc.PrefixSet_Mode_IPV4)
}
prefixSet.GetOrCreatePrefix(advertisedIPv41.cidr(t), maskLenExact)

if !deviations.SkipSetRpMatchSetOptions(dut) {
Expand All @@ -290,12 +292,13 @@ func configureImportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice) {
if deviations.RoutePolicyUnderAFIUnsupported(dut) {
//policy under peer group
path := gnmi.OC().NetworkInstance(dni).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, bgpName).Bgp().PeerGroup(peerGrpNamev4).ApplyPolicy()
gnmi.BatchDelete(batch, path.Config())
policy := root.GetOrCreateNetworkInstance(dni).GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, bgpName).GetOrCreateBgp().GetOrCreatePeerGroup(peerGrpNamev4).GetOrCreateApplyPolicy()
policy.SetImportPolicy([]string{v4LPPolicy})
gnmi.BatchReplace(batch, path.Config(), policy)

} else {
path := gnmi.OC().NetworkInstance(dni).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, bgpName).Bgp().Neighbor(atePort1.IPv4).AfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).ApplyPolicy()
gnmi.BatchDelete(batch, path.Config())
policy := root.GetOrCreateNetworkInstance(dni).GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, bgpName).GetOrCreateBgp().GetOrCreateNeighbor(atePort1.IPv4).GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).GetOrCreateApplyPolicy()
policy.SetImportPolicy([]string{v4LPPolicy})
if !deviations.RoutingPolicyChainingUnsupported(dut) {
Expand All @@ -305,6 +308,8 @@ func configureImportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice) {
}
}
batch.Set(t, dut)
// Sleep for 5 second to ensure that OTG has recived the update packet
time.Sleep(5 * time.Second)
}

func validateImportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice) {
Expand All @@ -315,6 +320,7 @@ func validateImportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice, ate *onda
found := false
for k, lr := range locRib.Route {
prefixAddr := strings.Split(lr.GetPrefix(), "/")
t.Logf("Route: %v, lr.GetPrefix() -> %v, advertisedIPv41.address: %s, prefixAddr[0]: %s", k, lr.GetPrefix(), advertisedIPv41.address, prefixAddr[0])
if prefixAddr[0] == advertisedIPv41.address {
found = true
t.Logf("Found Route(prefix %s, origin: %v, pathid: %d) => %s", k.Prefix, k.Origin, k.PathId, lr.GetPrefix())
Expand Down Expand Up @@ -381,6 +387,7 @@ func configureExportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice) {
stmt2.GetOrCreateActions().SetPolicyResult(oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE)
}
stmt2.GetOrCreateActions().GetOrCreateBgpActions().SetSetMed(oc.UnionUint32(med))
stmt2.GetOrCreateActions().GetOrCreateBgpActions().SetMedAction = oc.BgpPolicy_BgpSetMedAction_SET
statPath := rp.GetOrCreatePolicyDefinition(v4ASPPolicy).GetStatement(v4ASPStatement).GetOrCreateConditions()
statPath.SetCallPolicy(v4MedPolicy)
gnmi.BatchReplace(batch, gnmi.OC().RoutingPolicy().Config(), rp)
Expand All @@ -407,7 +414,6 @@ func configureExportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice) {
} else {
gnmi.BatchReplace(batch, path.Config(), policy)
}
gnmi.BatchReplace(batch, path.Config(), policy)
}
batch.Set(t, dut)
time.Sleep(time.Second * 60)
Expand All @@ -422,7 +428,7 @@ func validateExportRoutingPolicy(t *testing.T, dut *ondatra.DUTDevice, ate *onda
if bgpPrefix.Address != nil && bgpPrefix.GetAddress() == v42Route &&
bgpPrefix.PrefixLength != nil && bgpPrefix.GetPrefixLength() == v4RoutePrefix {
found = true
t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix, v42Route)
t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix.GetAddress(), v42Route)
t.Logf("Prefix MED %d", bgpPrefix.GetMultiExitDiscriminator())
if bgpPrefix.GetMultiExitDiscriminator() != med {
t.Errorf("For Prefix %v, got MED %d want MED %d", bgpPrefix.GetAddress(), bgpPrefix.GetMultiExitDiscriminator(), med)
Expand Down Expand Up @@ -483,7 +489,9 @@ func configureImportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
}

prefixSet := rp.GetOrCreateDefinedSets().GetOrCreatePrefixSet(v6PrefixSet)
prefixSet.SetMode(oc.PrefixSet_Mode_IPV6)
if !deviations.SkipPrefixSetMode(dut) {
prefixSet.SetMode(oc.PrefixSet_Mode_IPV6)
}
prefixSet.GetOrCreatePrefix(advertisedIPv61.cidr(t), maskLenExact)

if !deviations.SkipSetRpMatchSetOptions(dut) {
Expand Down Expand Up @@ -521,6 +529,8 @@ func configureImportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
}
}
batch.Set(t, dut)
// Sleep for 5 second to ensure that OTG has recived the update packet
time.Sleep(5 * time.Second)
}

func validateImportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice, ate *ondatra.ATEDevice) {
Expand All @@ -531,7 +541,7 @@ func validateImportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice, ate *on
found := false
for k, lr := range locRib.Route {
prefixAddr := strings.Split(lr.GetPrefix(), "/")
t.Logf("lr.GetPrefix() -> %s, prefixAddr[0] -> %s, advertisedIPv61.address = %s", lr.GetPrefix(), prefixAddr[0], advertisedIPv61.address)
t.Logf("Route: %v, lr.GetPrefix() -> %v, advertisedIPv41.address: %s, prefixAddr[0]: %s", k, lr.GetPrefix(), advertisedIPv61.address, prefixAddr[0])
if prefixAddr[0] == advertisedIPv61.address {
found = true
t.Logf("Found Route(prefix %s, origin: %v, pathid: %d) => %s", k.Prefix, k.Origin, k.PathId, lr.GetPrefix())
Expand Down Expand Up @@ -597,6 +607,7 @@ func configureExportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
stmt2.GetOrCreateActions().SetPolicyResult(oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE)
}
stmt2.GetOrCreateActions().GetOrCreateBgpActions().SetSetMed(oc.UnionUint32(med))
stmt2.GetOrCreateActions().GetOrCreateBgpActions().SetMedAction = oc.BgpPolicy_BgpSetMedAction_SET
statPath := rp.GetOrCreatePolicyDefinition(v6ASPPolicy).GetStatement(v6ASPStatement).GetOrCreateConditions()
statPath.SetCallPolicy(v6MedPolicy)
gnmi.BatchReplace(batch, gnmi.OC().RoutingPolicy().Config(), rp)
Expand Down Expand Up @@ -627,8 +638,8 @@ func configureExportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice) {
} else {
gnmi.BatchReplace(batch, path.Config(), policy)
}
batch.Set(t, dut)
}
batch.Set(t, dut)
time.Sleep(time.Second * 60)
}

Expand All @@ -640,7 +651,7 @@ func validateExportRoutingPolicyV6(t *testing.T, dut *ondatra.DUTDevice, ate *on
if bgpPrefix.Address != nil && bgpPrefix.GetAddress() == v62Route &&
bgpPrefix.PrefixLength != nil && bgpPrefix.GetPrefixLength() == v6RoutePrefix {
found = true
t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix, v62Route)
t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix.GetAddress(), v62Route)
if bgpPrefix.GetMultiExitDiscriminator() != med {
t.Errorf("For Prefix %v, got MED %d want MED %d", bgpPrefix.GetAddress(), bgpPrefix.GetMultiExitDiscriminator(), med)
}
Expand Down Expand Up @@ -709,6 +720,7 @@ func createFlowV6(t *testing.T, td testData, fc flowConfig) {
td.ate.OTG().PushConfig(t, td.top)
td.ate.OTG().StartProtocols(t)
otgutils.WaitForARP(t, td.ate.OTG(), td.top, "IPv6")
time.Sleep(3 * time.Second)
}

func checkTraffic(t *testing.T, td testData, flowName string) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
github.com/openconfig/gribigo v0.0.0-20240829231637-69cf06726cc3
github.com/openconfig/kne v0.1.18
github.com/openconfig/models-ci v1.0.2-0.20231113233730-f0986391428e
github.com/openconfig/ondatra v0.6.1
github.com/openconfig/ondatra v0.7.0
github.com/openconfig/replayer v0.0.0-20240110192655-4e9cf83d8d30
github.com/openconfig/testt v0.0.0-20220311054427-efbb1a32ec07
github.com/openconfig/ygnmi v0.11.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,8 @@ github.com/openconfig/models-ci v1.0.2-0.20231113233730-f0986391428e h1:6N4jXpZa
github.com/openconfig/models-ci v1.0.2-0.20231113233730-f0986391428e/go.mod h1:w38G/kObu95PbtwMYVp6SKhkHCegJFwL8B58Ns84g4s=
github.com/openconfig/ondatra v0.6.1 h1:/N3mm4iJX3G8HcASu+qAKcJc/lJqKEaD8MFd6aRVWqc=
github.com/openconfig/ondatra v0.6.1/go.mod h1:ol5PMSLtZJEYPrTwTFpRCyQvAFeA5vQUTAEYFiAlXz0=
github.com/openconfig/ondatra v0.7.0 h1:0nkWzq/YZeDDV9li1Lm9PKHqj/I/z6LMxbsfG2i79vo=
github.com/openconfig/ondatra v0.7.0/go.mod h1:ol5PMSLtZJEYPrTwTFpRCyQvAFeA5vQUTAEYFiAlXz0=
github.com/openconfig/replayer v0.0.0-20240110192655-4e9cf83d8d30 h1:KcHS08m7nFHq/D03ZfZKKNCSaS1jsuvdF3lCyDjPWJc=
github.com/openconfig/replayer v0.0.0-20240110192655-4e9cf83d8d30/go.mod h1:VQ8FdPVaHwxKtamhcrwkPsvTeeoEgFYNK1xE8nHD0S8=
github.com/openconfig/testt v0.0.0-20220311054427-efbb1a32ec07 h1:X631iD/B0ximGFb5P9LY5wHju4SiedxUhc5UZEo7VSw=
Expand Down
Loading