Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address additional review comments regarding port-speed and switch ca… #15

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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