Skip to content

Commit

Permalink
fix: speed link is wrongly converted (#510)
Browse files Browse the repository at this point in the history
* chore(k8s): Replace version in k8s manifests

* fix: speed link is wrongly converted

---------

Co-authored-by: src-csm <[email protected]>
  • Loading branch information
2 people authored and bl4ko committed Feb 27, 2025
1 parent 90e2672 commit 0ef9ad7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/source/vmware/vmware_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,9 @@ func (vc *VmwareSource) collectHostPhysicalNicData(
}
}

pnicType := objects.IfaceSpeed2IfaceType[objects.InterfaceSpeed(pnicLinkSpeedMb)]
pnicLinkSpeedKb := pnicLinkSpeedMb * constants.KB
pnicType := objects.IfaceSpeed2IfaceType[objects.InterfaceSpeed(pnicLinkSpeedKb)]

if pnicType == nil {
pnicType = &objects.OtherInterfaceType
}
Expand All @@ -660,7 +662,7 @@ func (vc *VmwareSource) collectHostPhysicalNicData(
Name: pnicName,
Status: true,
Type: pnicType,
Speed: objects.InterfaceSpeed(pnicLinkSpeedMb / constants.KB),
Speed: objects.InterfaceSpeed(pnicLinkSpeedKb),
MTU: pnicMtu,
Mode: pnicMode,
TaggedVlans: taggedVlanList,
Expand Down

0 comments on commit 0ef9ad7

Please sign in to comment.