Skip to content

Commit

Permalink
TE-1.1 static_arp_test.go (openconfig#2524)
Browse files Browse the repository at this point in the history
* added flow control

* Added deviation

---------

Co-authored-by: Arul Kumar Sekar <128646204+arulkumarsekar@users.noreply.github.com>
  • Loading branch information
2 people authored and frasieroh committed Jan 11, 2024
1 parent 722c554 commit 552d345
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ platform_exceptions: {
ipv4_missing_enabled: true
}
}
platform_exceptions: {
platform: {
vendor: JUNIPER
}
deviations: {
enable_flowctrl_flag: true
}
}
platform_exceptions: {
platform: {
vendor: NOKIA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func configInterfaceDUT(t *testing.T, p *ondatra.Port, me, peer *attrs.Attribute
if me.MAC != "" {
e := i.GetOrCreateEthernet()
e.MacAddress = ygot.String(me.MAC)
if deviations.EnableFlowctrlFlag(dut) {
e.EnableFlowControl = ygot.Bool(true)
}
}

s := i.GetOrCreateSubinterface(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ platform_exceptions: {
ipv4_missing_enabled: true
}
}
platform_exceptions: {
platform: {
vendor: JUNIPER
}
deviations: {
enable_flowctrl_flag: true
}
}
platform_exceptions: {
platform: {
vendor: NOKIA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func configInterfaceDUT(t *testing.T, p *ondatra.Port, me, peer *attrs.Attribute
if me.MAC != "" {
e := i.GetOrCreateEthernet()
e.MacAddress = ygot.String(me.MAC)
if deviations.EnableFlowctrlFlag(dut) {
e.EnableFlowControl = ygot.Bool(true)
}
}

s := i.GetOrCreateSubinterface(0)
Expand Down
5 changes: 5 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,3 +730,8 @@ func StaticRouteNextHopInterfaceRefUnsupported(dut *ondatra.DUTDevice) bool {
func SkipStaticNexthopCheck(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSkipStaticNexthopCheck()
}

// EnableFlowctrlFlag returns if device needs set leaf specific enable flag.
func EnableFlowctrlFlag(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetEnableFlowctrlFlag()
}
3 changes: 3 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ message Metadata {
// Devices which does not support nexthop index state
// Juniper: b/304729237
bool skip_static_nexthop_check = 136;
// Devices which needs to enable leaf specific flag
// Juniper: b/319202763
bool enable_flowctrl_flag = 137;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19;
Expand Down
87 changes: 50 additions & 37 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 552d345

Please sign in to comment.