network

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMacvlanNetworkAttachmentDefinition

func CreateMacvlanNetworkAttachmentDefinition(name string, namespace string) netattdefv1.NetworkAttachmentDefinition

Return a definition of a macvlan NetworkAttachmentDefinition name name namespace namespace

func CreateSriovNetwork

func CreateSriovNetwork(clientSet *testclient.ClientSet, intf *sriovv1.InterfaceExt, name string, namespace string, operatorNamespace string, resourceName string, ipam string, options ...SriovNetworkOptions) error

func CreateSriovPolicy

func CreateSriovPolicy(clientSet *testclient.ClientSet, generatedName string, operatorNamespace string, sriovDevice string, testNode string, numVfs int, resourceName string, deviceType string, options ...func(*sriovv1.SriovNetworkNodePolicy)) (*sriovv1.SriovNetworkNodePolicy, error)

CreateSriovPolicy creates a SriovNetworkNodePolicy and returns it

func GetNicsByPrefix

func GetNicsByPrefix(pod *k8sv1.Pod, ifcPrefix string) ([]string, error)

GetNicsByPrefix returns a list of pod nic names, filtered by the given nic name prefix ifcPrefix

func GetSriovNicIPs

func GetSriovNicIPs(pod *k8sv1.Pod, ifcName string) ([]string, error)

GetSriovNicIPs returns the list of ip addresses related to the given interface name for the given pod.

Types

type Network

type Network struct {
	Interface string
	Ips       []string
}

Needed for parsing of podinfo

type SriovNetworkOptions

type SriovNetworkOptions func(*sriovv1.SriovNetwork)

Jump to

Keyboard shortcuts

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