Documentation ¶
Index ¶
- Constants
- func GetNodeDrainState(clients *testclient.ClientSet, operatorNamespace string) (bool, error)
- func GetNodeSecureBootState(clients *testclient.ClientSet, nodeName, namespace string) (bool, error)
- func IsClusterStable(clients *testclient.ClientSet) (bool, error)
- func IsPFDriverSupported(driver string) bool
- func IsSingleNode(clients *testclient.ClientSet) (bool, error)
- func IsVFDriverSupported(driver string) bool
- func SetDisableNodeDrainState(clients *testclient.ClientSet, operatorNamespace string, state bool) error
- func SriovStable(operatorNamespace string, clients *testclient.ClientSet) (bool, error)
- func VirtualCluster() bool
- type EnabledNodes
- func (n *EnabledNodes) FindOneMellanoxSriovDevice(node string) (*sriovv1.InterfaceExt, error)
- func (n *EnabledNodes) FindOneSriovDevice(node string) (*sriovv1.InterfaceExt, error)
- func (n *EnabledNodes) FindOneSriovNodeAndDevice() (string, *sriovv1.InterfaceExt, error)
- func (n *EnabledNodes) FindOneVfioSriovDevice() (string, sriovv1.InterfaceExt)
- func (n *EnabledNodes) FindSriovDevices(node string) ([]*sriovv1.InterfaceExt, error)
- func (n *EnabledNodes) FindSriovDevicesIgnoreFilters(node string) ([]*sriovv1.InterfaceExt, error)
Constants ¶
const NodeAndDeviceNameFilterEnvVar string = "SRIOV_NODE_AND_DEVICE_NAME_FILTER"
Name of environment variable to filter which decives can be discovered by FindSriovDevices and FindOneSriovDevice. The filter is a regexp matched against node names and device name in the form <node_name>:<device_name>
For example, given the following devices in the cluster:
worker-0:eno1 worker-0:eno2 worker-1:eno1 worker-1:eno2 worker-1:ens1f0 worker-1:ens1f1
Values: - `.*:eno1` matches `worker-0:eno1,worker-1:eno1` - `worker-0:eno.*` matches `worker-0:eno1,worker-0:eno2` - `worker-0:eno1|worker-1:eno2` matches `worker-0:eno1,worker-1:eno2`
Variables ¶
This section is empty.
Functions ¶
func GetNodeDrainState ¶
func GetNodeDrainState(clients *testclient.ClientSet, operatorNamespace string) (bool, error)
func GetNodeSecureBootState ¶ added in v1.1.0
func GetNodeSecureBootState(clients *testclient.ClientSet, nodeName, namespace string) (bool, error)
func IsClusterStable ¶
func IsClusterStable(clients *testclient.ClientSet) (bool, error)
func IsPFDriverSupported ¶
func IsSingleNode ¶
func IsSingleNode(clients *testclient.ClientSet) (bool, error)
IsSingleNode validates if the environment is single node cluster This is done by checking numer of nodes, it can later be substituted by an env variable if needed
func IsVFDriverSupported ¶
func SetDisableNodeDrainState ¶
func SetDisableNodeDrainState(clients *testclient.ClientSet, operatorNamespace string, state bool) error
func SriovStable ¶
func SriovStable(operatorNamespace string, clients *testclient.ClientSet) (bool, error)
SriovStable tells if all the node states are in sync (and the cluster is ready for another round of tests)
func VirtualCluster ¶ added in v1.3.0
func VirtualCluster() bool
Types ¶
type EnabledNodes ¶
type EnabledNodes struct { Nodes []string States map[string]sriovv1.SriovNetworkNodeState IsSecureBootEnabled map[string]bool }
EnabledNodes provides info on sriov enabled nodes of the cluster.
func DiscoverSriov ¶
func DiscoverSriov(clients *testclient.ClientSet, operatorNamespace string) (*EnabledNodes, error)
DiscoverSriov retrieves Sriov related information of a given cluster.
func (*EnabledNodes) FindOneMellanoxSriovDevice ¶
func (n *EnabledNodes) FindOneMellanoxSriovDevice(node string) (*sriovv1.InterfaceExt, error)
FindOneMellanoxSriovDevice retrieves a valid sriov device for the given node.
func (*EnabledNodes) FindOneSriovDevice ¶
func (n *EnabledNodes) FindOneSriovDevice(node string) (*sriovv1.InterfaceExt, error)
FindOneSriovDevice retrieves a valid sriov device for the given node, filtered by `SRIOV_NODE_AND_DEVICE_NAME_FILTER` environment variable.
func (*EnabledNodes) FindOneSriovNodeAndDevice ¶ added in v1.3.0
func (n *EnabledNodes) FindOneSriovNodeAndDevice() (string, *sriovv1.InterfaceExt, error)
FindOneSriovNodeAndDevice finds a cluster node with one SR-IOV devices respecting the `SRIOV_NODE_AND_DEVICE_NAME_FILTER` filter.
func (*EnabledNodes) FindOneVfioSriovDevice ¶
func (n *EnabledNodes) FindOneVfioSriovDevice() (string, sriovv1.InterfaceExt)
FindOneVfioSriovDevice retrieves a node with a valid sriov device for vfio
func (*EnabledNodes) FindSriovDevices ¶
func (n *EnabledNodes) FindSriovDevices(node string) ([]*sriovv1.InterfaceExt, error)
FindSriovDevices retrieves all valid sriov devices for the given node, filtered by `SRIOV_NODE_AND_DEVICE_NAME_FILTER` environment variable.
func (*EnabledNodes) FindSriovDevicesIgnoreFilters ¶ added in v1.3.0
func (n *EnabledNodes) FindSriovDevicesIgnoreFilters(node string) ([]*sriovv1.InterfaceExt, error)
FindSriovDevicesIgnoreFilters retrieves all valid sriov devices for the given node.