From 41a07c89c6747ded09068145f48056e242c78b53 Mon Sep 17 00:00:00 2001 From: ampattan Date: Fri, 17 Jan 2025 16:54:09 +0530 Subject: [PATCH 1/2] RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria Changes related to MedAction implemented. Updated import_export_multi_test.go - Added MedAction to configure and enable the MED value. "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." --- .../import_export_multi_test/import_export_multi_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feature/bgp/policybase/otg_tests/import_export_multi_test/import_export_multi_test.go b/feature/bgp/policybase/otg_tests/import_export_multi_test/import_export_multi_test.go index bab83b7d524..72a3fc4e926 100644 --- a/feature/bgp/policybase/otg_tests/import_export_multi_test/import_export_multi_test.go +++ b/feature/bgp/policybase/otg_tests/import_export_multi_test/import_export_multi_test.go @@ -467,6 +467,7 @@ func configureImportExportMultifacetMatchActionsBGPPolicy(t *testing.T, dut *ond // TODO create as-path-set on the DUT, match-as-path-set not support. // Configure set-med 100 stmt5.GetOrCreateActions().GetOrCreateBgpActions().SetMed = oc.UnionUint32(medValue) + stmt5.GetOrCreateActions().GetOrCreateBgpActions().SetMedAction = oc.BgpPolicy_BgpSetMedAction_SET stmt5.GetOrCreateActions().SetPolicyResult(oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE) @@ -817,7 +818,7 @@ func validateOTGBgpPrefixV4AndASLocalPrefMED(t *testing.T, otg *otg.OTG, dut *on if bgpPrefix.Address != nil && bgpPrefix.GetAddress() == ipAddr && bgpPrefix.PrefixLength != nil && bgpPrefix.GetPrefixLength() == prefixLen { foundPrefix = true - t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix.Address, ipAddr) + t.Logf("Prefix recevied on OTG is correct, got prefix %v, want prefix %v", bgpPrefix.GetAddress(), ipAddr) switch pathAttr { case otgMED: if bgpPrefix.GetMultiExitDiscriminator() != metric[0] { From 06efaaa030cf3207ced730153000f427c0173739 Mon Sep 17 00:00:00 2001 From: ampattan Date: Tue, 21 Jan 2025 00:48:50 +0530 Subject: [PATCH 2/2] -new ondatra file updated "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." --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d4f361a0c74..65f4806cc05 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 4dab81848e5..143ef6247d4 100644 --- a/go.sum +++ b/go.sum @@ -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=