Skip to content

Commit

Permalink
Merge branch 'main' into cisco-dp-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
prinikasn authored Mar 2, 2023
2 parents 5ad6abb + 06a9369 commit dab8f44
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,17 @@ func configureDeviceId(t *testing.T, dut *ondatra.DUTDevice) {
gnmi.Replace(t, dut, gnmi.OC().Component(p4rtNode).Config(), &c)
}

// configurePortId configures p4rt port-id on the DUT.
// configurePortId configures p4rt port-id and interface type on the DUT.
func configurePortId(t *testing.T, dut *ondatra.DUTDevice) {
d := gnmi.OC()
portName := dut.Port(t, "port1").Name()
gnmi.Replace(t, dut, gnmi.OC().Interface(portName).Id().Config(), portId)
currIntf := &oc.Interface{
Name: ygot.String(portName),
Type: oc.IETFInterfaces_InterfaceType_ethernetCsmacd,
Id: &portId,
}
gnmi.Replace(t, dut, d.Interface(portName).Config(), currIntf)

}

// Create client connection
Expand Down

0 comments on commit dab8f44

Please sign in to comment.