kubevirt

package
v0.0.0-...-a525cee Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromptExpression = `(\$ |\# )`
	CRLF             = "\r\n"
	UTFPosEscape     = "\u001b\\[[0-9]+;[0-9]+H"
)
View Source
const (
	FedoraCoreOSContainerDiskImage          = "quay.io/kubevirtci/fedora-coreos-kubevirt:v20230905-be4fa50"
	FedoraWithTestToolingContainerDiskImage = "quay.io/kubevirtci/fedora-with-test-tooling:v20250416-e37573e"
	FedoraContainerDiskImage                = "quay.io/containerdisks/fedora:39"
	FakeLauncherImage                       = "quay.io/nmstate/c10s-nmstate-dev:latest"
)
View Source
const (
	AddressesAnnotation = "network.kubevirt.io/addresses"
)

Variables

This section is empty.

Functions

func ForceKillVirtLauncherAtNode

func ForceKillVirtLauncherAtNode(p infraapi.Provider, nodeName, vmNamespace, vmName string) error

func GenerateAddressDiscoveryConfigurationCommand

func GenerateAddressDiscoveryConfigurationCommand(iface string) string

func GenerateAddressesAnnotations

func GenerateAddressesAnnotations(networkName string, addresses []string) (map[string]string, error)

func GenerateCUDN

func GenerateCUDN(namespace, name string, topology udnv1.NetworkTopology, role udnv1.NetworkRole, subnets udnv1.DualStackCIDRs) (*udnv1.ClusterUserDefinedNetwork, string)

GenerateCUDN creates a new ClusterUserDefinedNetwork (CUDN) object with the specified parameters. Parameters: - namespace: The namespace in which the CUDN will be created. - name: The name of the CUDN. - topology: The network topology for the CUDN. - role: The network role for the CUDN. - subnets: The dual-stack CIDRs for the CUDN. Returns: - A pointer to the created ClusterUserDefinedNetwork object. - A string representation of the CUDN's network name.

func GenerateFakeVirtLauncherPod

func GenerateFakeVirtLauncherPod(namespace, vmName string) *corev1.Pod

func GenerateGatewayIPv6RouterLLA

func GenerateGatewayIPv6RouterLLA(subnets []string) (string, error)

func GenerateGatewayMAC

func GenerateGatewayMAC(subnets []string) (string, error)

func GetLayer2UDNDefaultGWIPs

func GetLayer2UDNDefaultGWIPs(subnets []string) ([]*net.IP, error)

GetLayer2UDNDefaultGWIPs returns the default gateway IPs (.1) for a Layer2 UDN subnet

func RetrieveAllGlobalAddressesFromGuest

func RetrieveAllGlobalAddressesFromGuest(cli *Client, vmi *v1.VirtualMachineInstance) ([]string, error)

func RetrieveCachedGatewayMAC

func RetrieveCachedGatewayMAC(cli *Client, vmi *kubevirtv1.VirtualMachineInstance, dev, cidr string) (string, error)

func RetrieveIPv6Gateways

func RetrieveIPv6Gateways(cli *Client, vmi *v1.VirtualMachineInstance) ([]string, error)

Types

type Address

type Address struct {
	Ip           string `json:"ip"`
	PrefixLength uint   `json:"prefix-length"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cliDir string) (*Client, error)

func (*Client) LoginToFedora

func (virtctl *Client) LoginToFedora(vmi *kubevirtv1.VirtualMachineInstance, user, password string) error

func (*Client) RestartVirtualMachine

func (virtctl *Client) RestartVirtualMachine(vmi *kubevirtv1.VirtualMachineInstance) (string, error)

func (*Client) RunCommand

func (virtctl *Client) RunCommand(vmi *v1.VirtualMachineInstance, command string, timeout time.Duration) (string, error)

type IP

type IP struct {
	Address []Address `json:"address"`
}

type Interface

type Interface struct {
	Name string `json:"name"`
	IPv4 IP     `json:"ipv4"`
	IPv6 IP     `json:"ipv6"`
}

type NetworkState

type NetworkState struct {
	Interfaces []Interface `json:"interfaces"`
}

func RetrieveNetworkState

func RetrieveNetworkState(cli *Client, vmi *v1.VirtualMachineInstance) (*NetworkState, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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