Skip to content

Commit

Permalink
Merge branch 'main' into gNMI-1.10-Add-wildcard-path-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Swetha-haridasula authored Feb 13, 2025
2 parents 2b6347d + cc4f925 commit bc2acbf
Show file tree
Hide file tree
Showing 9 changed files with 778 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,21 @@ func TestMain(m *testing.M) {
}

const (
advertisedRoutesv4CIDR = "203.0.113.1/32"
advertisedRoutesv4Net = "203.0.113.1"
advertisedRoutesv4Prefix = 32
peerGrpName1 = "BGP-PEER-GROUP1"
peerGrpName2 = "BGP-PEER-GROUP2"
dutGlobalAS = 64512
dutLocalAS1 = 65501
dutLocalAS2 = 64513
ateAS1 = 65502
ateAS2 = 65503
plenIPv4 = 30
plenIPv6 = 126
policyName = "ALLOW"
advertisedRoutesv4CIDR = "203.0.113.1/32"
advertisedRoutesv4Net = "203.0.113.1"
advertisedRoutesv4Prefix = 32
advertisedRoutesv4PrefixLen = "32..32"
peerGrpName1 = "BGP-PEER-GROUP1"
peerGrpName2 = "BGP-PEER-GROUP2"
dutGlobalAS = 64512
dutLocalAS1 = 65501
dutLocalAS2 = 64513
ateAS1 = 65502
ateAS2 = 65503
plenIPv4 = 30
plenIPv6 = 126
policyName = "ALLOW"
prefixSetName = "prefSet"
)

var (
Expand Down Expand Up @@ -234,14 +236,17 @@ func verifyPrefixesTelemetry(t *testing.T, dut *ondatra.DUTDevice, nbr string, w
func configureRoutePolicy(t *testing.T, dut *ondatra.DUTDevice, name string, pr oc.E_RoutingPolicy_PolicyResultType) {
d := &oc.Root{}
rp := d.GetOrCreateRoutingPolicy()

prefixSet := rp.GetOrCreateDefinedSets().GetOrCreatePrefixSet(prefixSetName)
prefixSet.GetOrCreatePrefix(advertisedRoutesv4CIDR, advertisedRoutesv4PrefixLen)
pdef := rp.GetOrCreatePolicyDefinition(name)
stmt, err := pdef.AppendNewStatement(name)
if err != nil {
t.Fatalf("AppendNewStatement(%s) failed: %v", name, err)
}
stmt.GetOrCreateConditions().GetOrCreateMatchPrefixSet().SetPrefixSet(prefixSetName)
stmt.GetOrCreateActions().PolicyResult = pr
gnmi.Update(t, dut, gnmi.OC().RoutingPolicy().Config(), rp)

}

// verifyOTGPrefixTelemetry is to Validate prefix received on OTG por2.
Expand All @@ -260,7 +265,7 @@ func verifyOTGPrefixTelemetry(t *testing.T, otg *otg.OTG, wantPrefix bool) {
gotASPath := prefix.AsPath[len(prefix.AsPath)-1].GetAsNumbers()
t.Logf("Received prefix %v on otg as expected with AS-PATH %v", prefix.GetAddress(), gotASPath)
} else {
t.Errorf("Prefix %v is not received on otg", prefix.GetAddress())
t.Errorf("Prefix %v is received on otg when it is not expected", prefix.GetAddress())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
missing_value_for_defaults: true
default_import_export_policy_unsupported: false
skip_setting_statement_for_policy: true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ platform_exceptions: {
missing_isis_interface_afi_safi_enable: true
isis_interface_afi_unsupported: true
isis_instance_enabled_required: true
bgp_default_policy_unsupported: true
}
}
platform_exceptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
missing_value_for_defaults: true
skip_set_rp_match_set_options: true
}
}
platform_exceptions: {
Expand Down
20 changes: 20 additions & 0 deletions feature/mtu/otg_tests/pmtu_handing/metadata.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto
# proto-message: Metadata

uuid: "329bfa6e-280a-4997-80b7-fd5d86110c90"
plan_id: "MTU-1.5"
description: "Path MTU handing"
testbed: TESTBED_DUT_ATE_2LINKS
platform_exceptions: {
platform: {
vendor: NOKIA
}
deviations: {
explicit_port_speed: true
explicit_interface_in_default_vrf: true
omit_l2_mtu: true
fragment_total_drops_unsupported: true
aggregate_atomic_update: true
interface_enabled: true
}
}
Loading

0 comments on commit bc2acbf

Please sign in to comment.