-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from almaslennikov/sriov_get_uplink
Reuse getUplinkRepresentor function from sriovnet
- Loading branch information
Showing
11 changed files
with
93 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
23 changes: 22 additions & 1 deletion
23
pkg/manager/mocks/Sriovnet.go → pkg/utils/mocks/Sriovnet.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package utils | ||
|
||
import "github.com/Mellanox/sriovnet" | ||
|
||
// SriovnetProvider represents limited subset of functions from sriovnet package | ||
type SriovnetProvider interface { | ||
GetVfRepresentor(string, int) (string, error) | ||
GetUplinkRepresentor(string) (string, error) | ||
} | ||
|
||
type SriovnetWrapper struct{} | ||
|
||
func (s *SriovnetWrapper) GetVfRepresentor(master string, vfid int) (string, error) { | ||
return sriovnet.GetVfRepresentor(master, vfid) | ||
} | ||
|
||
func (s *SriovnetWrapper) GetUplinkRepresentor(vfPciAddress string) (string, error) { | ||
return sriovnet.GetUplinkRepresentor(vfPciAddress) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters