managers

package
v0.0.0-...-7cb6a8a Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package managers provides test helpers for checking the configurations for NIC managers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUbuntu1804

func IsUbuntu1804(t *testing.T) bool

IsUbuntu1804 returns true if the image is Ubuntu 18.04.

func IsUbuntu2004

func IsUbuntu2004(t *testing.T) bool

IsUbuntu2004 returns true if the image is Ubuntu 18.04.

func SkipPrimaryRollback

func SkipPrimaryRollback(t *testing.T, singleNIC bool) bool

SkipPrimaryRollback returns true if the primary NIC rollback test should be skipped.

func VerifyNIC

func VerifyNIC(t *testing.T, nic EthernetInterface, exist bool)

VerifyNIC verifies whether the configurations for the given NIC and network manager service exists or not.

Types

type EthernetInterface

type EthernetInterface struct {
	// Name is the name of the interface.
	Name string
	// Index is the index of the interface.
	Index int
	// StackType is the stack type of the NIC.
	StackType NicStackType
	// IPv4Address is the IPv4 address of the interface.
	IPv4Address string
	// IPv6Address is the IPv6 address of the interface.
	IPv6Address string
}

EthernetInterface represents an ethernet interface.

func GetNIC

func GetNIC(t *testing.T, index int) EthernetInterface

GetNIC returns the NIC with the given index.

type NicStackType

type NicStackType int

NicStackType represents the type of a NIC. It can be IPv4-only, IPv4/IPv6, or IPv6-only.

const (
	// Ipv4 represents an IPv4-only NIC.
	Ipv4 NicStackType = 0x1
	// Ipv4Ipv6 represents an IPv4/IPv6 NIC.
	Ipv4Ipv6 NicStackType = 0x3
	// Ipv6 represents an IPv6-only NIC.
	Ipv6 NicStackType = 0x2
)

Jump to

Keyboard shortcuts

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