config

package
v0.0.0-...-efd2147 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultVirtualMachineClassName = "generic-for-e2e"
View Source
const PostCleanUpEnv = "POST_CLEANUP"

PostCleanUpEnv defines an environment variable used to explicitly request the deletion of created/used resources.

View Source
const SkipImmediateStorageClassCheckEnv = "SKIP_IMMEDIATE_SC_CHECK"

An immediate storage class is required for test cases where a `VirtualDisk` might not be attached to a `VirtualMachine` but should be in the Ready phase to operate with it. If a test case does not require the immediate storage class, this check can be skipped.

Variables

This section is empty.

Functions

func CheckDefaultVMClass

func CheckDefaultVMClass(virtClient virtclient.Client) error

func CheckStorageClassOption

func CheckStorageClassOption() error

func CheckWithPostCleanUpOption

func CheckWithPostCleanUpOption() error

func IsCleanUpNeeded

func IsCleanUpNeeded() bool

func SkipImmediateStorageClassCheck

func SkipImmediateStorageClassCheck() bool

Types

type ClusterTransport

type ClusterTransport struct {
	KubeConfig           string `yaml:"kubeConfig"`
	Token                string `yaml:"token"`
	Endpoint             string `yaml:"endpoint"`
	CertificateAuthority string `yaml:"certificateAuthority"`
	InsecureTLS          bool   `yaml:"insecureTls"`
}

func (ClusterTransport) RestConfig

func (c ClusterTransport) RestConfig() (*rest.Config, error)

type Config

type Config struct {
	ClusterTransport ClusterTransport `yaml:"clusterTransport"`
	Disks            DisksConf        `yaml:"disks"`
	VM               VMConf           `yaml:"vm"`
	Ipam             IpamConf         `yaml:"ipam"`
	HelperImages     HelperImages     `yaml:"helperImages"`
	NamespaceSuffix  string           `yaml:"namespaceSuffix"`
	TestData         TestData         `yaml:"testData"`
	LogFilter        []string         `yaml:"logFilter"`
	CleanupResources []string         `yaml:"cleanupResources"`
	RegexpLogFilter  []regexp.Regexp  `yaml:"regexpLogFilter"`
	StorageClass     StorageClass
}

func GetConfig

func GetConfig() (*Config, error)

func (*Config) GetTestCases

func (c *Config) GetTestCases() ([]string, error)

type DisksConf

type DisksConf struct {
	UploadHelperImage string `yaml:"uploadHelperImage"`
	CviTestDataDir    string `yaml:"cviTestDataDir"`
	ViTestDataDir     string `yaml:"viTestDataDir"`
	VdTestDataDir     string `yaml:"vdTestDataDir"`
}

type HelperImages

type HelperImages struct {
	CurlImage string `yaml:"curlImage"`
}

type IpamConf

type IpamConf struct {
	TestDataDir string `yaml:"testDataDir"`
}

type Kustomize

type Kustomize struct {
	APIVersion     string           `yaml:"apiVersion"`
	Labels         []KustomizeLabel `yaml:"labels"`
	Configurations []string         `yaml:"configurations"`
	Kind           string           `yaml:"kind"`
	Namespace      string           `yaml:"namespace"`
	NamePrefix     string           `yaml:"namePrefix"`
	Resources      []string         `yaml:"resources"`
}

func (*Kustomize) ExcludeResource

func (k *Kustomize) ExcludeResource(filePath, resourceName string) error

func (*Kustomize) GetNamespace

func (k *Kustomize) GetNamespace(filePath string) (string, error)

func (*Kustomize) SetParams

func (k *Kustomize) SetParams(filePath, namespace, namePrefix string) error

type KustomizeLabel

type KustomizeLabel struct {
	IncludeSelectors bool              `yaml:"includeSelectors"`
	Pairs            map[string]string `yaml:"pairs"`
}

type StorageClass

type StorageClass struct {
	DefaultStorageClass   *storagev1.StorageClass
	ImmediateStorageClass *storagev1.StorageClass
	TemplateStorageClass  *storagev1.StorageClass
}

type TestData

type TestData struct {
	AffinityToleration    string `yaml:"affinityToleration"`
	ComplexTest           string `yaml:"complexTest"`
	Connectivity          string `yaml:"connectivity"`
	DiskResizing          string `yaml:"diskResizing"`
	SizingPolicy          string `yaml:"sizingPolicy"`
	ImporterNetworkPolicy string `yaml:"importerNetworkPolicy"`
	ImageHotplug          string `yaml:"imageHotplug"`
	ImagesCreation        string `yaml:"imagesCreation"`
	VMConfiguration       string `yaml:"vmConfiguration"`
	VMLabelAnnotation     string `yaml:"vmLabelAnnotation"`
	VMMigration           string `yaml:"vmMigration"`
	VMMigrationCancel     string `yaml:"vmMigrationCancel"`
	VMEvacuation          string `yaml:"vmEvacuation"`
	VMDiskAttachment      string `yaml:"vmDiskAttachment"`
	VMRestoreForce        string `yaml:"vmRestoreForce"`
	VMRestoreSafe         string `yaml:"vmRestoreSafe"`
	VMVersions            string `yaml:"vmVersions"`
	VdSnapshots           string `yaml:"vdSnapshots"`
	Sshkey                string `yaml:"sshKey"`
	SSHUser               string `yaml:"sshUser"`
	IPAM                  string `yaml:"ipam"`
	VMVpc                 string `yaml:"vmVpc"`
}

type VMConf

type VMConf struct {
	TestDataDir string `yaml:"testDataDir"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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