Skip to content

Commit

Permalink
Merge pull request #15 from nagarwal03/satoru-port-jan30
Browse files Browse the repository at this point in the history
Address additional review comments regarding port-speed and switch ca…
  • Loading branch information
Satoru-Shinohara authored Feb 28, 2024
2 parents dded84e + e264cf6 commit b4c7204
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions translib/transformer/xfmr_intf.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ var intfOCToSpeedMap = map[ocbinds.E_OpenconfigIfEthernet_ETHERNET_SPEED]string{
ocbinds.OpenconfigIfEthernet_ETHERNET_SPEED_SPEED_100GB: "100000",
ocbinds.OpenconfigIfEthernet_ETHERNET_SPEED_SPEED_200GB: "200000",
ocbinds.OpenconfigIfEthernet_ETHERNET_SPEED_SPEED_400GB: "400000",
ocbinds.OpenconfigIfEthernet_ETHERNET_SPEED_SPEED_800GB: "800000",
}

type E_InterfaceType int64
Expand Down Expand Up @@ -159,17 +160,13 @@ func getIntfsRoot(s *ygot.GoStruct) *ocbinds.OpenconfigInterfaces_Interfaces {

func getPortTableNameByDBId(intftbl IntfTblData, curDb db.DBNum) (string, error) {

var tblName string
tblName := intftbl.cfgDb.portTN

switch curDb {
case db.ConfigDB:
tblName = intftbl.cfgDb.portTN
case db.ApplDB:
tblName = intftbl.appDb.portTN
case db.StateDB:
tblName = intftbl.stateDb.portTN
default:
tblName = intftbl.cfgDb.portTN
}

return tblName, nil
Expand Down

0 comments on commit b4c7204

Please sign in to comment.