kubevirt

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromptExpression = `(\$ |\# )`
	CRLF             = "\r\n"
	UTFPosEscape     = "\u001b\\[[0-9]+;[0-9]+H"
)
View Source
const (
	FedoraVMWithSecondaryNetworkAttachment = `` /* 1466-byte string literal not displayed */

	FedoraVMWithPrimaryUDNAttachment = `` /* 1442-byte string literal not displayed */

	FedoraVMIWithSecondaryNetworkAttachment = `` /* 1225-byte string literal not displayed */

	FedoraVMIWithPrimaryUDNAttachment = `` /* 1204-byte string literal not displayed */

	FedoraVMWithPreconfiguredPrimaryUDNAttachment = `` /* 1714-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func LoginToFedora

func LoginToFedora(virtctlPath, vmiNamespace, vmiName, user, password string) error

func LoginToFedoraWithHostname

func LoginToFedoraWithHostname(virtctlPath, vmiNamespace, vmiName, user, password, hostname string) error

LoginToFedora performs a console login to a Fedora base VM

func RunCommand

func RunCommand(virtctlPath, vmiNamespace, vmiName, command string, timeout time.Duration) (string, error)

Types

type Client

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

func NewClient

func NewClient(oc *exutil.CLI, tmpDir string) (*Client, error)

func (*Client) Apply

func (c *Client) Apply(resource string) error

func (*Client) Console

func (c *Client) Console(vmName, command string) (string, error)

func (*Client) CreateVM

func (c *Client) CreateVM(vmTemplate string, params CreationTemplateParams) error

func (*Client) CreateVMIFromSpec

func (c *Client) CreateVMIFromSpec(vmNamespace, vmName string, vmiSpec map[string]interface{}, opts ...Option) error

func (*Client) CreateVMIM

func (c *Client) CreateVMIM(vmiName string) error

func (*Client) GetEventsForPod

func (c *Client) GetEventsForPod(podName string) ([]string, error)

func (*Client) GetJSONPath

func (c *Client) GetJSONPath(resource, name, jsonPath string) (string, error)

func (*Client) GetPodsByLabel

func (c *Client) GetPodsByLabel(labelKey, labelValue string) ([]string, error)

func (*Client) Login

func (c *Client) Login(vmName, hostname string) error

func (*Client) Restart

func (c *Client) Restart(vmName string) error

type CreationTemplateParams

type CreationTemplateParams struct {
	VMName                    string
	VMNamespace               string
	FedoraContainterDiskImage string
	NetBindingName            string
	NetworkName               string
	PreconfiguredIP           string
	PreconfiguredMAC          string
}

type Option

type Option func(map[string]interface{})

func WithAnnotations

func WithAnnotations(annotations map[string]string) Option

Jump to

Keyboard shortcuts

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