Skip to content

Commit

Permalink
Adding Deviation to skip test with PBF action as decap/encap vrf (ope…
Browse files Browse the repository at this point in the history
…nconfig#2643)

* Adding Deviation to skip test with PBF action as decap/encap vrf

"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."

* make sure ni name is configured (openconfig#2590)

* Fix introspection target in binding (openconfig#2642)

* fix introspection target

* remove name argument from makeDialer

* simplify binding_test a bit

* corrected typo

---------

Co-authored-by: Sergey Fomin <[email protected]>
Co-authored-by: Karim Jahed <[email protected]>
Co-authored-by: Greg Dennis <[email protected]>
  • Loading branch information
4 people authored Feb 9, 2024
1 parent 7b95c87 commit 2df50cb
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,17 @@ func testDecapEncap(ctx context.Context, t *testing.T, args *testArgs) {
}

func testBackupDecapWithVrfPolW(ctx context.Context, t *testing.T, args *testArgs) {
if deviations.SkipPbfWithDecapEncapVrf(args.dut) {
t.Skip("Skipping test as PBF with decap encap vrf is not supported")
}
vrfpolicy.ConfigureVRFSelectionPolicyW(t, args.dut)
testBackupDecap(ctx, t, args)
}

func testDecapEncapWithVrfPolW(ctx context.Context, t *testing.T, args *testArgs) {
if deviations.SkipPbfWithDecapEncapVrf(args.dut) {
t.Skip("Skipping test as PBF with decap encap vrf is not supported")
}
vrfpolicy.ConfigureVRFSelectionPolicyW(t, args.dut)
testDecapEncap(ctx, t, args)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ platform_exceptions: {
explicit_interface_in_default_vrf: true
static_protocol_name: "static"
interface_enabled: true
skip_pbf_with_decap_encap_vrf: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,9 @@ func TestHierarchicalWeightResolution(t *testing.T) {
})

t.Run("TestBasicHierarchicalWeightWithVrfPolW", func(t *testing.T) {
if deviations.SkipPbfWithDecapEncapVrf(dut) {
t.Skip("Skipping test as it is not supported")
}
vrfpolicy.ConfigureVRFSelectionPolicyW(t, dut)
testBasicHierarchicalWeight(ctx, t, dut, ate, top, gRIBI)
})
Expand All @@ -705,6 +708,9 @@ func TestHierarchicalWeightResolution(t *testing.T) {
})

t.Run("TestHierarchicalWeightBoundaryScenarioWithVrfPolW", func(t *testing.T) {
if deviations.SkipPbfWithDecapEncapVrf(dut) {
t.Skip("Skipping test as it is not supported")
}
vrfpolicy.ConfigureVRFSelectionPolicyW(t, dut)
testHierarchicalWeightBoundaryScenario(ctx, t, dut, ate, top, gRIBI)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ platform_exceptions: {
explicit_port_speed: true
explicit_interface_in_default_vrf: true
interface_enabled: true
skip_pbf_with_decap_encap_vrf: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ func TestBackup(t *testing.T) {
})

t.Run("IPv4BackUpSwitchWithVrfPolicyW", func(t *testing.T) {
if deviations.SkipPbfWithDecapEncapVrf(dut) {
t.Skip("Skipping test as PBF with decap / encap vrf is not supported")
}
t.Logf("Name: IPv4BackUpSwitchWithVrfPolicyW")
t.Logf("Description: Set primary and backup path with gribi and shutdown the primary path validating traffic switching over backup path with vrf policy W")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ platform_exceptions: {
explicit_port_speed: true
explicit_interface_in_default_vrf: true
interface_enabled: true
skip_pbf_with_decap_encap_vrf: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ type transitKey struct{}
// testBaseHierarchialNHGwithVrfPolW verifies recursive IPv4 Entry for
// 198.51.100.0/24 (a) with vrf selection w
func testBaseHierarchialNHGwithVrfPolW(ctx context.Context, t *testing.T, args *testArgs) {
if deviations.SkipPbfWithDecapEncapVrf(args.dut) {
t.Skip("Skipping test as pbf with decap encap vrf is not supported")
}
vrfpolicy.ConfigureVRFSelectionPolicyW(t, args.dut)

ctx = context.WithValue(ctx, transitKey{}, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ platform_exceptions: {
explicit_interface_in_default_vrf: true
static_protocol_name: "static"
interface_enabled: true
skip_pbf_with_decap_encap_vrf: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ func testRecursiveIPv4EntrywithMACNexthop(t *testing.T, args *testArgs) {
// 198.51.100.1/32 (a) with vrf selection w
func testRecursiveIPv4EntrywithVrfPolW(t *testing.T, args *testArgs) {

if deviations.SkipPbfWithDecapEncapVrf(args.dut) {

t.Skip("Skipping Test as it is not supported")
}
t.Log("Delete existing vrf selection policy and Apply vrf selectioin policy W")
configNonDefaultNetworkInstance(t, args.dut)
deleteVrfSelectionPolicy(t, args.dut)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ platform_exceptions: {
explicit_interface_ref_definition: true
static_protocol_name: "static"
interface_enabled: true
skip_pbf_with_decap_encap_vrf: true
}
}
platform_exceptions: {
Expand Down
5 changes: 5 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,3 +750,8 @@ func PrefixLimitExceededTelemetryUnsupported(dut *ondatra.DUTDevice) bool {
func SkipSettingAllowMultipleAS(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSkipSettingAllowMultipleAs()
}

// SkipPbfWithDecapEncapVrf return true if device needs to skip test with which has PBF with decap encap VRF as action
func SkipPbfWithDecapEncapVrf(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSkipPbfWithDecapEncapVrf()
}
5 changes: 4 additions & 1 deletion proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,10 @@ message Metadata {
// Skip setting allow-multiple-as while configuring eBGP
// Arista: partnerissuetracker.corp.google.com/issues/317422300
bool skip_setting_allow_multiple_as = 140;

//Skip tests with decap encap vrf as PBF action
// Nokia: partnerissuetracker.corp.google.com/issues/323251581
bool skip_pbf_with_decap_encap_vrf = 141;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19;
}
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.

0 comments on commit 2df50cb

Please sign in to comment.