sriovenv

package
v0.0.0-...-0821b2d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureSecureBoot

func ConfigureSecureBoot(bmcClient *bmc.BMC, action string) error

ConfigureSecureBoot enables or disables a SecureBoot on a BMC machine.

func ConfigureSriovMlnxFirmwareOnWorkers

func ConfigureSriovMlnxFirmwareOnWorkers(
	workerNodes []*nodes.Builder, sriovInterfaceName string, enableSriov bool, numVfs int) error

ConfigureSriovMlnxFirmwareOnWorkers configures SR-IOV firmware on a given Mellanox device.

func ConfigureSriovMlnxFirmwareOnWorkersAndWaitMCP

func ConfigureSriovMlnxFirmwareOnWorkersAndWaitMCP(
	workerNodes []*nodes.Builder, sriovInterfaceName string, enableSriov bool, numVfs int) error

ConfigureSriovMlnxFirmwareOnWorkersAndWaitMCP configures Mellanox firmware and wait for the cluster becomes stable.

func CreateAndWaitTestPodWithSecondaryNetwork

func CreateAndWaitTestPodWithSecondaryNetwork(
	podName string,
	testNodeName string,
	sriovResNameTest string,
	testMac string,
	testIPs []string) (*pod.Builder, error)

CreateAndWaitTestPodWithSecondaryNetwork creates test pod with secondary network and waits until it is in the ready state.

func CreateBMCClient

func CreateBMCClient() (*bmc.BMC, error)

CreateBMCClient creates BMC client instance.

func CreatePodsAndRunTraffic

func CreatePodsAndRunTraffic(
	clientNodeName string,
	serverNodeName string,
	sriovResNameClient string,
	sriovResNameServer string,
	clientMac string,
	serverMac string,
	clientIPs []string,
	serverIPs []string) error

CreatePodsAndRunTraffic creates test pods and verifies connectivity between them.

func CreateSriovPolicyAndWaitUntilItsApplied

func CreateSriovPolicyAndWaitUntilItsApplied(sriovPolicy *sriov.PolicyBuilder, timeout time.Duration) error

CreateSriovPolicyAndWaitUntilItsApplied creates SriovNetworkNodePolicy and waits until it's successfully applied.

func IsMellanoxDevice

func IsMellanoxDevice(intName, nodeName string) bool

IsMellanoxDevice checks if a given network interface on a node is a Mellanox device.

func IsSriovDeployed

func IsSriovDeployed() error

IsSriovDeployed checks SR-IOV deployment in the cluster. Returns nil if SR-IOV is deployed & daemonsets are ready, else returns an error.

func RemoveAllSriovNetworks

func RemoveAllSriovNetworks() error

RemoveAllSriovNetworks removes all SR-IOV networks.

func RemoveSriovConfigurationAndWaitForSriovAndMCPStable

func RemoveSriovConfigurationAndWaitForSriovAndMCPStable() error

RemoveSriovConfigurationAndWaitForSriovAndMCPStable removes all SR-IOV networks and policies in SR-IOV operator namespace.

func ValidateSriovInterfaces

func ValidateSriovInterfaces(workerNodeList []*nodes.Builder, requestedNumber int) error

ValidateSriovInterfaces checks that provided interfaces by env var exist on the nodes.

func WaitUntilVfsCreated

func WaitUntilVfsCreated(
	nodeList []*nodes.Builder, sriovInterfaceName string, numberOfVfs int, timeout time.Duration) error

WaitUntilVfsCreated waits until all expected SR-IOV VFs are created.

Types

type SwitchCredentials

type SwitchCredentials struct {
	User     string
	Password string
	SwitchIP string
}

SwitchCredentials creates the struct to ssh to the lab switch.

func NewSwitchCredentials

func NewSwitchCredentials() (*SwitchCredentials, error)

NewSwitchCredentials is the constructor for the SwitchCredentials object.

Jump to

Keyboard shortcuts

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