cnidel

package
v3.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2019 License: BSD-3-Clause Imports: 17 Imported by: 4 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateIfaceName

func CalculateIfaceName(chosenName, defaultName string) string

CalculateIfaceName decides what should be the name of a container's interface. If a name is explicitly set in the related DanmNet API object, the NIC will be named accordingly. If a name is not explicitly set, then DANM will name the interface ethX where X=sequence number of the interface

func ConvertCniResult

func ConvertCniResult(rawCniResult types.Result) *current.Result

ConvertCniResult converts a CNI result from an older API version to the latest format Returns nil if conversion is unsuccessful

func DelegateInterfaceDelete

func DelegateInterfaceDelete(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ep *danmtypes.DanmEp) error

DelegateInterfaceDelete delegates Ks8 Pod network interface delete task to the input 3rd party CNI plugin Returns an error if interface creation was unsuccessful, or if the 3rd party CNI config could not be loaded

func DelegateInterfaceSetup

func DelegateInterfaceSetup(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ep *danmtypes.DanmEp) (*current.Result, error)

DelegateInterfaceSetup delegates K8s Pod network interface setup task to the input 3rd party CNI plugin Returns the CNI compatible result object, or an error if interface creation was unsuccessful, or if the 3rd party CNI config could not be loaded

func IsDelegationRequired

func IsDelegationRequired(danmClient danmclientset.Interface, nid, namespace string) (bool, *danmtypes.DanmNet, error)

IsDelegationRequired decides if the interface creation operations should be delegated to a 3rd party CNI, or can be handled by DANM Decision is made based on the NetworkType parameter of the DanmNet object

func IsDeviceNeeded

func IsDeviceNeeded(cniType string) bool

Types

type VfInformation

type VfInformation struct {
	PCIaddr string `json:"pci_addr"`
	Pfname  string `json:"pfname"`
	Vfid    int    `json:"vfid"`
}

VfInformation is a DeviceInfo desctiprtor expected by sriov plugin v1.0.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL