From 71f8062d5e36a6550e987914c8081d4115889d13 Mon Sep 17 00:00:00 2001 From: trathod Date: Fri, 11 Oct 2024 19:46:36 -0400 Subject: [PATCH 1/2] RT-7.4: Updating for deviation usage 1. Updating metadata file for missing deviations 2. Updating script to use deviation combination. "This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind." --- .../aspath_and_community_test.go | 5 ++++- .../aspath_and_community_test/metadata.textproto | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go b/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go index de109463b72..990161254ad 100644 --- a/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go +++ b/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go @@ -100,7 +100,9 @@ func configureImportBGPPolicy(t *testing.T, dut *ondatra.DUTDevice, ipv4 string, cs = append(cs, oc.UnionString(communityMatch)) } communitySet.SetCommunityMember(cs) - communitySet.SetMatchSetOptions(commMatchSetOptions) + if deviations.BGPConditionsMatchCommunitySetUnsupported(dut) { + communitySet.SetMatchSetOptions(commMatchSetOptions) + } } var communitySetCLIConfig string @@ -118,6 +120,7 @@ func configureImportBGPPolicy(t *testing.T, dut *ondatra.DUTDevice, ipv4 string, stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().SetCommunitySet(communitySetName) } else { stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetCommunitySet(communitySetName) + stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetMatchSetOptions(oc.E_RoutingPolicy_MatchSetOptionsType(oc.BgpPolicy_MatchSetOptionsType_ANY)) } if deviations.CommunityMemberRegexUnsupported(dut) && communitySetName == "any_my_3_comms" { diff --git a/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto b/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto index fc8bcf61ac6..031d34bfb9c 100644 --- a/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto +++ b/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto @@ -35,4 +35,16 @@ platform_exceptions: { default_route_policy_unsupported: true } } +platform_exceptions: { + platform: { + vendor: NOKIA + } + deviations: { + explicit_port_speed: true + interface_enabled: true + static_protocol_name: "static" + explicit_interface_in_default_vrf: true + default_route_policy_unsupported: true + } +} From 387081cdc89dfe6ac1851c4d96b1a8d2dfd57caa Mon Sep 17 00:00:00 2001 From: trathod Date: Wed, 11 Dec 2024 15:40:08 -0500 Subject: [PATCH 2/2] RT-7.4: Updating for deviation usage 1. Updating metadata file for missing deviations 2. Updating script to use deviation combination. "This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind." --- .../aspath_and_community_test/aspath_and_community_test.go | 2 +- .../otg_tests/aspath_and_community_test/metadata.textproto | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go b/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go index 990161254ad..f9bab65b546 100644 --- a/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go +++ b/feature/bgp/policybase/otg_tests/aspath_and_community_test/aspath_and_community_test.go @@ -120,7 +120,7 @@ func configureImportBGPPolicy(t *testing.T, dut *ondatra.DUTDevice, ipv4 string, stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().SetCommunitySet(communitySetName) } else { stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetCommunitySet(communitySetName) - stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetMatchSetOptions(oc.E_RoutingPolicy_MatchSetOptionsType(oc.BgpPolicy_MatchSetOptionsType_ANY)) + stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchCommunitySet().SetMatchSetOptions(oc.E_RoutingPolicy_MatchSetOptionsType(commMatchSetOptions)) } if deviations.CommunityMemberRegexUnsupported(dut) && communitySetName == "any_my_3_comms" { diff --git a/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto b/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto index 031d34bfb9c..a30baf8abd5 100644 --- a/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto +++ b/feature/bgp/policybase/otg_tests/aspath_and_community_test/metadata.textproto @@ -40,11 +40,9 @@ platform_exceptions: { vendor: NOKIA } deviations: { - explicit_port_speed: true interface_enabled: true static_protocol_name: "static" explicit_interface_in_default_vrf: true - default_route_policy_unsupported: true } }