netnmstate

package
v0.0.0-...-195d9e3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreVFsCreated

func AreVFsCreated(nmstateName, sriovInterfaceName string, numberVFs int) error

AreVFsCreated verifies that the specified number of VFs has been created by NMState under the given interface.

func CheckThatWorkersDeployedWithBondVfs

func CheckThatWorkersDeployedWithBondVfs(
	workerNodes []*nodes.Builder, namespace string) (string, []string, error)

CheckThatWorkersDeployedWithBondVfs verifies whether workers have been deployed with the specified configuration of bonded VLAN virtual interfaces (VFs). This function ensures that the network setup adheres to the intended bond and VLAN configurations.

func ConfigureVFsAndWaitUntilItsConfigured

func ConfigureVFsAndWaitUntilItsConfigured(
	policyName string,
	sriovInterfaceName string,
	nodeLabel map[string]string,
	numberOfVFs uint8,
	timeout time.Duration) error

ConfigureVFsAndWaitUntilItsConfigured creates NodeNetworkConfigurationPolicy with VFs configuration and waits until it's successfully configured.

func CreateNewNMStateAndWaitUntilItsRunning

func CreateNewNMStateAndWaitUntilItsRunning(timeout time.Duration) error

CreateNewNMStateAndWaitUntilItsRunning creates or recreates the new NMState instance and waits until all daemonsets and deployments are in Ready state.

func CreatePolicyAndWaitUntilItsAvailable

func CreatePolicyAndWaitUntilItsAvailable(timeout time.Duration, nmstatePolicy *nmstate.PolicyBuilder) error

CreatePolicyAndWaitUntilItsAvailable creates NodeNetworkConfigurationPolicy and waits until it's successfully applied.

func GetBondMode

func GetBondMode(bondName, nodeNetworkStateName string) (string, error)

GetBondMode returns Bond mode under given Bond interface name.

func GetBondSlaves

func GetBondSlaves(bondName, nodeNetworkStateName string) ([]string, error)

GetBondSlaves returns slave ports under given Bond interface name.

func GetPrimaryInterfaceBond

func GetPrimaryInterfaceBond(nodeName string) (string, error)

GetPrimaryInterfaceBond returns master ovs system bond interface.

func UpdatePolicyAndWaitUntilItsAvailable

func UpdatePolicyAndWaitUntilItsAvailable(timeout time.Duration, nmstatePolicy *nmstate.PolicyBuilder) error

UpdatePolicyAndWaitUntilItsAvailable updates NodeNetworkConfigurationPolicy and waits until it's successfully applied.

func WithBondOptionFailOverMac

func WithBondOptionFailOverMac(
	failOverMacValue, bondInterfaceName string) func(*nmstate.PolicyBuilder) (*nmstate.PolicyBuilder, error)

WithBondOptionFailOverMac returns a function that mutates FailOverMac value.

func WithBondOptionMiimon

func WithBondOptionMiimon(
	miimon uint64, bondInterfaceName string) func(*nmstate.PolicyBuilder) (*nmstate.PolicyBuilder, error)

WithBondOptionMiimon returns a function that mutates miimon value.

func WithOptionMaxTxRateOnFirstVf

func WithOptionMaxTxRateOnFirstVf(
	maxTxRate uint64, sriovInterfaceName string) func(*nmstate.PolicyBuilder) (*nmstate.PolicyBuilder, error)

WithOptionMaxTxRateOnFirstVf returns a func that mutate MaxTxRate value on the first VF.

Types

This section is empty.

Jump to

Keyboard shortcuts

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