Categorygithub.com/renaldyr/go-ovirt-client/v3
modulepackage
3.0.15
Repository: https://github.com/renaldyr/go-ovirt-client.git
Documentation: pkg.go.dev

# README

go-ovirt-client: an easy-to-use overlay for the oVirt Go SDK

This library provides an easy-to-use overlay for the automatically generated Go SDK for oVirt. It does not replace the Go SDK. It implements the functions of the SDK only partially and is primarily used by the oVirt Terraform provider.

Using this library

To use this library you will have to include it as a Go module dependency:

go get github.com/renaldyr/go-ovirt-client github.com/ovirt/go-ovirt-client-log/v3

You can then create a client instance like this:

package main

import (
	"crypto/x509"

	ovirtclient "github.com/renaldyr/go-ovirt-client/v3"
	ovirtclientlog "github.com/ovirt/go-ovirt-client-log/v3"
)

func main() {
	// Create a logger that logs to the standard Go log here:
	logger := ovirtclientlog.NewGoLogger()

	// Create an ovirtclient.TLSProvider implementation. This allows for simple
	// TLS configuration.
	tls := ovirtclient.TLS()

	// Add certificates from an in-memory byte slice. Certificates must be in PEM format.
	tls.CACertsFromMemory(caCerts)

	// Add certificates from a single file. Certificates must be in PEM format.
	tls.CACertsFromFile("/path/to/file.pem")

	// Add certificates from a directory. Optionally, regular expressions can be passed that must match the file
	// names.
	tls.CACertsFromDir(
		"/path/to/certs",
		regexp.MustCompile(`\.pem`),
	)

	// Add system certificates. This doesn't work on Windows before Go 1.18.
	tls.CACertsFromSystem()

	// Add a custom cert pool as a source of certificates. This option is
	// incompatible with CACertsFromSystem.
	// tls.CACertsFromCertPool(x509.NewCertPool())

	// Disable certificate verification. This is a bad idea, please don't do this.
	tls.Insecure()

	// Create a new goVirt instance:
	client, err := ovirtclient.New(
		// URL to your oVirt engine API here:
		"https://your-ovirt-engine/ovirt-engine/api/",
		// Username here:
		"admin@internal",
		// Password here:
		"password-here",
		// Pass the TLS provider here:
		tls,
		// Pass the logger here:
		logger,
		// Pass in extra settings here. Must implement the ovirtclient.ExtraSettings interface.
		nil,
	)
	if err != nil {
		// Handle error, here in a really crude way:
		panic(err)
	}
	// Use client. Please use the code completion in your IDE to
	// discover the functions. Each is well documented.
	upload, err := client.StartUploadToNewDisk(
		//...
	)
	//....
}

Test helper

The test helper can work in two ways:

Either it sets up test fixtures in the mock client, or it sets up a live connection and identifies a usable storage domain, cluster, etc. for testing purposes.

The ovirtclient.NewMockTestHelper() function can be used to create a test helper with a mock client in the backend:

helper := ovirtclient.NewMockTestHelper(ovirtclientlog.NewNOOPLogger())

The easiest way to set up the test helper for a live connection is by using environment variables. To do that, you can use the ovirtclient.NewLiveTestHelperFromEnv() function:

helper := ovirtclient.NewLiveTestHelperFromEnv(ovirtclientlog.NewNOOPLogger())

This function will inspect environment variables to determine if a connection to a live oVirt engine can be estabilshed. The following environment variables are supported:

  • OVIRT_URL: URL of the oVirt engine API.
  • OVIRT_USERNAME: The username for the oVirt engine.
  • OVIRT_PASSWORD: The password for the oVirt engine
  • OVIRT_CAFILE: A file containing the CA certificate in PEM format.
  • OVIRT_CA_BUNDLE: Provide the CA certificate in PEM format directly.
  • OVIRT_INSECURE: Disable certificate verification if set. Not recommended.
  • OVIRT_CLUSTER_ID: The cluster to use for testing. Will be automatically chosen if not provided.
  • OVIRT_BLANK_TEMPLATE_ID: ID of the blank template. Will be automatically chosen if not provided.
  • OVIRT_STORAGE_DOMAIN_ID: Storage domain to use for testing. Will be automatically chosen if not provided.
  • OVIRT_VNIC_PROFILE_ID: VNIC profile to use for testing. Will be automatically chosen if not provided.

You can also create the test helper manually:

import (
	"os"
	"testing"

	ovirtclient "github.com/renaldyr/go-ovirt-client/v3"
	ovirtclientlog "github.com/ovirt/go-ovirt-client-log/v3"
)

func TestSomething(t *testing.T) {
	// Create a logger that logs to the standard Go log here
	logger := ovirtclientlog.NewTestLogger(t)

	// Set to true to use in-memory mock, otherwise this will use a live connection
	isMock := true

	// The following parameters define which infrastructure parts to use for testing
	params := ovirtclient.TestHelperParams().
		WithClusterID(ovirtclient.ClusterID(os.Getenv("OVIRT_CLUSTER_ID"))).
		WithBlankTemplateID(ovirtclient.TemplateID(os.Getenv("OVIRT_BLANK_TEMPLATE_ID"))).
		WithStorageDomainID(ovirtclient.StorageDomainID(os.Getenv("OVIRT_STORAGE_DOMAIN_ID"))).
		WithSecondaryStorageDomainID(ovirtclient.StorageDomainID(os.Getenv("OVIRT_SECONDARY_STORAGE_DOMAIN_ID"))).
		WithVNICProfileID(ovirtclient.VNICProfileID(os.Getenv("OVIRT_VNIC_PROFILE_ID")))

	// Create the test helper
	helper, err := ovirtclient.NewTestHelper(
		"https://localhost/ovirt-engine/api",
		"admin@internal",
		"super-secret",
		// Leave these empty for auto-detection / fixture setup
		params,
		ovirtclient.TLS().CACertsFromSystem(),
		isMock,
		logger,
	)
	if err != nil {
		t.Fatal(err)
	}
	// Fetch the cluster ID for testing
	clusterID := helper.GetClusterID()
	//...
}

Tip: You can use any logger that satisfies the Logger interface described in go-ovirt-client-log

Retries

This library attempts to retry API calls that can be retried if possible. Each function has a sensible retry policy. However, you may want to customize the retries by passing one or more retry flags. The following retry flags are supported:

  • ovirtclient.ContextStrategy(ctx): this strategy will stop retries when the context parameter is canceled.
  • ovirtclient.ExponentialBackoff(factor): this strategy adds a wait time after each time, which is increased by the given factor on each try. The default is a backoff with a factor of 2.
  • ovirtclient.AutoRetry(): this strategy will cancel retries if the error in question is a permanent error. This is enabled by default.
  • ovirtclient.MaxTries(tries): this strategy will abort retries if a maximum number of tries is reached. On complex calls the retries are counted per underlying API call.
  • ovirtclient.Timeout(duration): this strategy will abort retries if a certain time has been elapsed for the higher level call.
  • ovirtclient.CallTimeout(duration): this strategy will abort retries if a certain underlying API call takes longer than the specified duration.

Mock client

This library also provides a mock oVirt client that doesn't need working oVirt engine to function. It stores all information in-memory and simulates a working oVirt system. You can instantiate the mock client like so:

client := ovirtclient.NewMock()

We recommend using the ovirtclient.Client interface as a means to declare it as a dependency in your factory so you can pass both the mock and the real connection as a parameter:

func NewMyoVirtUsingUtility(
    client ovirtclient.Client,
) *myOVirtUsingUtility {
    return &myOVirtUsingUtility{
        client: client,
    }
}

FAQ

Why doesn't the library return the underlying oVirt SDK objects?

It's a painful decision we made. We want to encourage anyone who needs a certain function to submit a PR instead of simply relying on the SDK objects. This will lead to some overhead when a new function needs to be added, but leads to cleaner code in the end and makes this library more comprehensive. It also makes it possible to create the mock client, which would not be possibly if we had to simulate all parts of the oVirt engine.

If you need to access the oVirt SDK client you can do so from the ovirtclient.New() function:

client, err := ovirtclient.New(
    //...
)
if err != nil {
    //...
}
sdkClient := client.GetSDKClient()

You can also get a properly preconfigured HTTP client if you need it:

httpClient := client.GetHTTPClient()

🚧 Warning: If your code relies on the SDK or HTTP clients you will not be able to use the mock functionality described above for testing.

Contributing

You want to help out? Awesome! Please head over to our contribution guide, which explains how this library is built in detail.

# Packages

No description provided by the author

# Functions

AutoRetry retries an action only if it doesn't return a non-retryable error.
CallTimeout is a strategy that will timeout individual API call retries.
ContextStrategy provides a timeout based on a context in the ctx parameter.
CPUModeValues lists all valid CPU modes.
CreateAffinityGroupParams creates a buildable set of parameters for creating an affinity group.
CreateDiskAttachmentParams creates a buildable set of parameters for creating a disk attachment.
CreateDiskParams creates a buildable set of CreateDiskOptionalParameters for use with Client.CreateDisk.
CreateNICParams returns a buildable structure of OptionalNICParameters.
CreateVMParams creates a set of BuildableVMParameters that can be used to construct the optional VM parameters.
CreateVNICProfileParams creats a buildable set of optional parameters for VNICProfile creation.
DiskInterfaceValues returns all possible DiskInterface values.
DiskStatusValues returns all possible values for DiskStatus.
ExponentialBackoff is a retry strategy that increases the wait time after each call by the specified factor.
FileStorageDomainTypeValues returns all the StorageDomainTypes values which are considered file storage.
HasErrorCode returns true if the specified error has the specified error code.
HostStatusValues returns all possible HostStatus values.
ImageFormatValues returns all possible ImageFormat values.
MaxTries is a strategy that will timeout individual API calls based on a maximum number of retries.
MustNewBuildableVMDiskParameters is identical to NewBuildableVMDiskParameters but panics instead of returning an error.
MustNewTestHelper is identical to NewTestHelper, but panics instead of returning an error.
MustNewVMCPUTopo is equivalent to NewVMCPUTopo, but panics instead of returning an error.
New creates a new copy of the enhanced oVirt client.
NewBuildableVMDiskParameters creates a new buildable OptionalVMDiskParameters.
NewCreateTagParams creates a buildable set of CreateTagParams to pass to the CreateTag function.
NewCreateVMParams creates a set of BuildableVMParameters that can be used to construct the optional VM parameters.
NewExtraSettings creates a builder for ExtraSettings.
NewInitialization creates a new Initialization from the specified parameters.
NewLiveTestHelperFromEnv is a function that creates a test helper working against a live (not mock) oVirt engine using environment variables.
NewMemoryPolicyParameters creates a new instance of BuildableMemoryPolicyParameters.
NewMock creates a new in-memory mock client.
NewMockTestHelper creates a test helper with a mocked oVirt engine in the backend.
NewMockWithLogger is identical to NewMock, but accepts a logger.
NewNicConfiguration creates a new NicConfiguration from the specified parameters.
NewTestHelper creates a helper for executing tests.
NewVMCPUParams creates a new VMCPUParams object.
NewVMCPUTopo creates a new VMCPUTopo from the specified parameters.
NewVMCPUTopoParams creates a new BuildableVMCPUTopoParams.
NewVMIPSearchParams returns a buildable parameter set for VM IP searches.
NewVMOSParameters creates a new VMOSParameters structure.
NewVMPlacementPolicyParameters creates a new BuildableVMPlacementPolicyParameters for use on VM creation.
NewWithVerify is equivalent to New, but allows customizing the verification function for the connection.
ReconnectStrategy triggers the client to reconnect if an EInvalidGrant error is encountered.
StorageDomainExternalStatusValues returns all possible StorageDomainExternalStatus values.
StorageDomainStatusValues returns all possible StorageDomainStatus values.
StorageDomainTypeValues returns all possible StorageDomainTypeValues values.
TemplateCreateParams creates a builder for the parameters of the template creation.
TestHelperParams creates a new copy of BuildableTestHelperParameters usable for building test parameters.
Timeout is a strategy that will time out complex calls based on a timeout from the time the strategy factory was created.
TLS creates a BuildableTLSProvider that can be used to easily add trusted CA certificates and generally follows best practices in terms of TLS settings.
UpdateDiskParams creates a builder for the params for updating a disk.
UpdateNICParams creates a buildable UpdateNICParameters.
UpdateVMParams returns a buildable set of update parameters.
VMAffinityValues returns a list of all valid VMAffinity values.
VMHugePagesValues returns all possible VMHugepages values.
VMSearchParams creates a buildable set of search parameters for easier use.
VMStatusValues returns all possible VMStatus values.
VMTypeValues returns all possible values for VM types.

# Constants

AffinityNegative pushes VMs from each other, they are placed on different hosts if enforcing is true, or are attempted to place on different hosts if possible in case enforcing is false.
AffinityPositive attracts VMs to each other, they are placed on the same host if enforcing is true, or are attempted to place on the same host if possible in case enforcing is false.
CPUModeCustom contains custom settings for the CPU.
CPUModeHostModel copies the host CPU make and model.
CPUModeHostPassthrough passes through the host CPU for nested virtualization.
DefaultBlankTemplateID returns the ID for the factory-default blank template.
DiskInterfaceIDE is a legacy controller device.
DiskInterfaceSATA is a SATA controller device.
DiskInterfacesPAPRvSCSI is a para-virtualized device supported by the IBM pSeries family of machines, using the SCSI protocol.
DiskInterfaceVirtIO is a virtualization interface where just the guest's device driver knows it is running in a virtual environment.
DiskInterfaceVirtIOSCSI is a para-virtualized SCSI controller device.
DiskStatusIllegal indicates that the disk cannot be accessed by the virtual machine, and the user needs to take action to resolve the issue.
DiskStatusLocked represents a disk status where no operations can be performed on the disk.
DiskStatusOK represents a disk status that operations can be performed on.
EAccessDenied signals that the provided credentials for the oVirt engine were incorrect.
EBadArgument indicates that an input parameter was incorrect.
EBug signals an error that should never happen.
ECannotRunVM indicates an error with the VM configuration which prevents it from being run.
EConflict indicates an error where you tried to create or update a resource which is already in use in a different, conflicting way.
EConnection signals a problem with the connection.
EDiskLocked indicates that the disk in question is locked.
EFieldMissing indicates that the oVirt API did not return a specific field.
EFileReadFailed indicates that reading a local file failed.
EHotPlugFailed indicates that a disk could not be hot plugged.
EInvalidGrant is an error returned from the oVirt Engine when the SSO token expired.
ELocalIO indicates an input/output error on the client side.
EMultipleResults indicates that multiple items were found where only one was expected.
ENotAnOVirtEngine signals that the server did not respond with a proper oVirt response.
ENotFound signals that the resource requested was not found.
EPending signals that the client library is still waiting for an action to be completed.
EPermanentHTTPError indicates a HTTP error code that should not be retried.
ERelatedOperationInProgress means that the engine is busy working on something else on the same resource.
ETimeout signals that the client library has timed out waiting for an action to be completed.
ETLSError signals that the provided CA certificate did not match the server that was attempted to connect.
EUnexpectedDiskStatus indicates that a disk was in a status that was not expected in this state.
EUnexpectedImageTransferPhase indicates that an image transfer was in an unexpected phase.
EUnidentified is an unidentified oVirt error.
EUnsupported signals that an action is not supported.
EUserAccountLocked signals that the provided user account for the oVirt engine has been locked.
EVMLocked indicates that the virtual machine in question is locked.
FeatureAutoPinning is a feature flag for autopinning support in the oVirt Engine supported since 4.4.5.
FeaturePlacementPolicy is a feature flag to indicate placement policy support in the oVirt Engine.
HostStatusConnecting indicates that the engine cannot currently communicate with the host, so it is trying to connect it before fencing it.
HostStatusDown indicates that the host in question is down.
HostStatusError indicates that the specified host failed to perform correctly.
HostStatusInitializing indicates that the host is shortly before being in HostStatusUp.
HostStatusInstallFailed indicates that setting up the host failed.
HostStatusInstalling indicates that the host is currently being set up.
HostStatusInstallingOS indicates that the operating system is being isntalled using Satellite/Foreman.
HostStatusKDumping indicates that the host kernel has crashed and is currently dumping memory.
HostStatusMaintenance indicates that the host is currently under maintenance and can currently not run virtual machines.
HostStatusNonOperational indicates that the host is currently not able to perform due to various reasons, such as a storage not being connected, not supporting a mandatory network, etc.
HostStatusNonResponsive indicates that the host is not responding to the engine.
HostStatusPendingApproval a deprecated status that a vintage ovirt-node/RHV-H hos is pending administrator approval.
HostStatusPreparingForMaintenance indicates that the host is currently being drained of all virtual machines via live migration to other hosts.
HostStatusReboot indicates that the host is currently undergoing a reboot.
HostStatusUnassigned indicates that the host is not yet assigned and is in the activation process.
HostStatusUp indicates that the host is operating normally.
ImageFormatCow is an image conforming to the QCOW2 image format.
ImageFormatRaw is not actually a format, it only contains the raw bytes on the block device.
No description provided by the author
No description provided by the author
MinDiskSizeOVirt defines the minimum size of 1M for disks in oVirt.
StorageDomainExternalStatusError indicates an error state.
StorageDomainExternalStatusFailure indicates a failure state.
StorageDomainExternalStatusInfo indicates an OK status, but there is information available for the administrator that might be relevant.
StorageDomainExternalStatusNA represents an external status that is not applicable.
StorageDomainExternalStatusOk indicates a working status.
StorageDomainExternalStatusWarning indicates that the storage domain has warnings that may be relevant for the administrator.
StorageDomainStatusActivating indicates that the storage domain is currently activating and will soon be active.
StorageDomainStatusActive is the normal status for a storage domain when it's working.
StorageDomainStatusDetaching is the status when it is being disconnected.
StorageDomainStatusInactive is an undocumented status of the storage domain.
StorageDomainStatusLocked is an undocumented status of the storage domain.
StorageDomainStatusMaintenance is an undocumented status of the storage domain.
StorageDomainStatusMixed is an undocumented status of the storage domain.
StorageDomainStatusNA indicates that the storage domain does not have a status.
StorageDomainStatusPreparingForMaintenance is an undocumented status of the storage domain.
StorageDomainStatusUnattached is an undocumented status of the storage domain.
StorageDomainStatusUnknown is an undocumented status of the storage domain.
StorageDomainTypeCinder represents a cinder host storage type.
StorageDomainTypeFCP represents a fcp host storage type.
StorageDomainTypeGlance represents a glance host storage type.
StorageDomainTypeGlusterFS represents a glusterfs host storage type.
StorageDomainTypeISCSI represents a iscsi host storage type.
StorageDomainTypeLocalFS represents a localfs host storage type.
StorageDomainTypeManagedBlockStorage represents a managed block storage host storage type.
StorageDomainTypeNFS represents a nfs host storage type.
StorageDomainTypePosixFS represents a posixfs host storage type.
TemplateStatusIllegal indicates that the template is invalid and cannot be used.
TemplateStatusLocked means that an operation is taking place on the template and cannot be currently modified.
TemplateStatusOK indicates that the template is ready and can be used.
VMAffinityMigratable allows automatic and manual VM migrations to other hosts.
VMAffinityPinned disallows migrating to other hosts.
VMAffinityUserMigratable allows only manual migrations to different hosts by a user.
VMHugePages1G represents the large value of supported huge pages setting which is 1048576 Kib.
VMHugePages2M represents the small value of supported huge pages setting which is 2048 Kib.
VMStatusDown indicates that the VM is not running.
VMStatusImageLocked indicates that the virtual machine process is not running and there is some operation on the disks of the virtual machine that prevents it from being started.
VMStatusMigrating indicates that the virtual machine process is running and the virtual machine is being migrated from one host to another.
VMStatusNotResponding indicates that the hypervisor detected that the virtual machine is not responding.
VMStatusPaused indicates that the virtual machine process is running and the virtual machine is paused.
VMStatusPoweringDown indicates that the virtual machine process is running and it is about to stop running.
VMStatusPoweringUp indicates that the virtual machine process is running and the guest operating system is being loaded.
VMStatusRebooting indicates that the virtual machine process is running and the guest operating system is being rebooted.
VMStatusRestoringState indicates that the virtual machine process is about to run and the virtual machine is going to awake from hibernation.
VMStatusSavingState indicates that the virtual machine process is running and the virtual machine is being hibernated.
VMStatusSuspended indicates that the virtual machine process is not running and a running state of the virtual machine was saved.
VMStatusUnassigned means an invalid status was received.
VMStatusUnknown indicates that the system failed to determine the status of the virtual machine.
VMStatusUp indicates that the virtual machine process is running and the guest operating system is loaded.
VMStatusWaitForLaunch indicates that the virtual machine process is about to run.
VMTypeDesktop indicates that the virtual machine is intended to be used as a desktop and enables the SPICE virtual console, and a sound device will be added to the VM.
VMTypeHighPerformance indicates that the VM should be configured for high performance.
VMTypeServer indicates that the VM will be used as a server.

# Structs

Ip Represents the IP configuration of a network interface.

# Interfaces

AffinityGroup labels virtual machines, so they run / don't run on the same host.
AffinityGroupClient describes the methods required for working with affinity groups.
AffinityGroupData contains the base data for the AffinityGroup.
AffinityRule is a rule for either hosts or virtual machines.
BuildableCreateAffinityGroupOptionalParams is a buildable version of CreateAffinityGroupOptionalParams.
BuildableCreateDiskAttachmentParams is a buildable version of CreateDiskAttachmentOptionalParams.
BuildableCreateDiskParameters is a buildable version of CreateDiskOptionalParameters.
BuildableInitialization is a buildable version of Initialization.
BuildableMemoryPolicyParameters is a buildable version of MemoryPolicyParameters.
BuildableNicConfiguration is a buildable version of NicConfiguration.
BuildableNICParameters is a modifiable version of OptionalNICParameters.
BuildableTagParams is an buildable version of CreateTagParams.
BuildableTemplateCreateParameters is a buildable version of OptionalTemplateCreateParameters.
BuildableTestHelperParameters is a buildable version of the TestHelperParameters.
BuildableTLSProvider is a TLSProvider that allows adding configuration options.
BuildableUpdateDiskParameters is a buildable version of UpdateDiskParameters.
BuildableUpdateNICParameters is a buildable version of UpdateNICParameters.
BuildableUpdateVMParameters is a buildable version of UpdateVMParameters.
BuildableVMCPUParams is a buildable version of VMCPUParams.
BuildableVMCPUTopoParams is a buildable version of VMCPUTopoParams.
BuildableVMDiskParameters is a buildable version of OptionalVMDiskParameters.
BuildableVMIPSearchParams is a buildable version of VMIPSearchParams.
BuildableVMOSParameters is a buildable version of VMOSParameters.
BuildableVMParameters is a variant of OptionalVMParameters that can be changed using the supplied builder functions.
BuildableVMPlacementPolicyParameters is a buildable version of the VMPlacementPolicyParameters.
BuildableVMSearchParameters is a buildable version of VMSearchParameters.
BuildableVNICProfileParameters is a buildable version of OptionalVNICProfileParameters.
Client is a simplified client for the oVirt API.
ClientWithLegacySupport is an extension of Client that also offers the ability to retrieve the underlying SDK connection or a configured HTTP client.
Cluster represents a cluster returned from a ListClusters or GetCluster call.
ClusterClient is a part of the Client that deals with clusters in the oVirt Engine.
CreateAffinityGroupOptionalParams is a list of optional parameters that can be passed for affinity group creation.
CreateDiskAttachmentOptionalParams are the optional parameters for creating a disk attachment.
CreateDiskOptionalParameters is a structure that serves to hold the optional parameters for DiskClient.CreateDisk.
CreateTagParams contains the optional parameters for tag creation.
Datacenter is a logical entity that defines the set of resources used in a specific environment.
DatacenterClient contains the functions related to handling datacenter objects in oVirt.
DatacenterData is the core of a Datacenter when client functions are not required.
Disk is a disk in oVirt.
DiskAttachment links together a Disk and a VM.
DiskAttachmentClient contains the methods required for handling disk attachments.
DiskClient is the client interface part that deals with disks.
DiskCreation is a process object that lets you query the status of the disk creation.
DiskData is the core of a Disk, only exposing data functions, but not the client functions.
DiskUpdate is an object to monitor the progress of an update.
EngineError is an error representation for errors received while interacting with the oVirt engine.
ExtraSettings are the optional settings for the oVirt connection.
ExtraSettingsBuilder is a buildable version of ExtraSettings.
FeatureClient provides the functions to determine the capabilities of the oVirt Engine.
GraphicsConsoleClient lists the methods to access and manipulate graphics consoles on VMs.
Host is the representation of a host returned from the oVirt Engine API.
HostClient contains the API portion that deals with hosts.
HostData is the core of Host, providing only data access functions.
ImageDownload represents an image download in progress.
ImageDownloadReader is a special reader for reading image downloads.
Initialization defines to the virtual machine’s initialization configuration.
InstanceType is a data structure that contains preconfigured instance parameters.
InstanceTypeClient lists the methods for working with instance types.
InstanceTypeData is the data segment of the InstanceType type.
Logger is a thin wrapper around ovirtclientlog.Logger for convenience.
MemoryPolicy is the memory policy set on the VM.
MemoryPolicyParameters contain the parameters for the memory policy setting on the VM.
MockClient provides in-memory client functions, and additionally provides the ability to inject information.
Network is the interface defining the fields for networks.
NetworkClient describes the functions related to oVirt networks.
NetworkData is the core of Network, providing only the data access functions, but not the client functions.
NIC represents a network interface.
NICClient defines the methods related to dealing with network interfaces.
NicConfiguration defines a virtual machine’s initialization nic configuration.
NICData is the core of NIC which only provides data-access functions.
OptionalNICParameters is an interface that declares the source of optional parameters for NIC creation.
OptionalTemplateCreateParameters contains the optional parameters for creating a template.
OptionalVMDiskParameters describes the disk parameters that can be given to VM creation.
OptionalVMParameters are a list of parameters that can be, but must not necessarily be added on VM creation.
OptionalVNICProfileParameters is a set of parameters for creating VNICProfiles that are optional.
RetryInstance is an instance created by the RetryStrategy for a single use.
RetryStrategy is a function that creates a new copy of a RetryInstance.
StorageDomain represents a storage domain returned from the oVirt Engine API.
StorageDomainClient contains the portion of the goVirt API that deals with storage domains.
StorageDomainData is the core of StorageDomain, providing only data access functions.
Tag is the interface defining the fields for tag.
TagClient describes the functions related to oVirt tags.
TagData is the core of Tag, providing only the data access functions, but not the client functions.
Template incorporates the TemplateData to provide access to data in a template, but also adds convenience functions to work with templates.
TemplateClient represents the portion of the client that deals with VM templates.
TemplateData is a set of prepared configurations for VMs.
TemplateDiskAttachment contains all methods from TemplateDiskAttachmentData and also convenience functions to fetch and work with template disk attachments.
TemplateDiskAttachmentData contains the methods to get the details of a disk attached to a template.
TemplateDiskClient contains the methods to work with template disk attachments.
TestConnectionClient defines the functions related to testing the connection.
TestHelper is a helper to run tests against an oVirt engine.
TestHelperParameters contains the optional parameters for the test helper.
TLSProvider creates a TLS configuration for use by the oVirt client.
UpdateDiskParameters describes the possible parameters for updating a disk.
UpdateNICParameters is an interface that declares methods of changeable parameters for NIC's.
UpdateVMParameters returns a set of parameters to change on a VM.
UploadImageProgress is a tracker for the upload progress happening in the background.
UploadImageResult represents the completed image upload.
VM is the implementation of the virtual machine in oVirt.
VMClient includes the methods required to deal with virtual machines.
VMCPU is the CPU configuration of a VM.
VMCPUParams contain the CPU parameters for a VM.
VMCPUTopo contains the CPU topology information about a VM.
VMCPUTopoParams contain the CPU topology parameters for a VM.
VMData is the core of VM providing only data access functions.
VMGraphicsConsole is an object representing a graphics console on a virtual machine.
VMGraphicsConsoleData contains the data for VMGraphicsConsole objects.
VMIPSearchParams contains the parameters for searching or waiting for IP addresses on a VM.
VMOS is the structure describing the virtual machine operating system, if set.
VMOSParameters contains the VM parameters pertaining to the operating system.
VMPlacementPolicy is the structure that holds the rules for VM migration to other hosts.
VMPlacementPolicyParameters contains the optional parameters on VM placement.
VMSearchParameters declares the parameters that can be passed to a VM search.
VNICProfile is a collection of settings that can be applied to individual virtual network interface cards in the Engine.
VNICProfileClient defines the methods related to dealing with virtual NIC profiles.
VNICProfileData is the core of VNICProfile, providing only data access functions.

# Type aliases

Affinity signals if the affinity is positive (attracting VMs to each other) or negative (pushing VMs from each other to different hosts).
AffinityGroupID is the identifier for affinity groups.
AffinityGroupPriority is a type alias for the type indicating affinity group priority.
AffinityHostsRule is an alias for hosts rules to avoid mixups.
AffinityVMsRule is an alias for VM rules to avoid mixups.
ClusterID is an identifier for a cluster.
CPUMode is the mode of the CPU on a VM.
DatacenterID is the UUID of a datacenter.
DiskAttachmentID is the identifier for the disk attachment.
DiskID is the identifier for disks.
DiskInterface describes the means by which a disk will appear to the VM.
DiskInterfaceList is a list of DiskInterface.
DiskStatus shows the status of a disk.
DiskStatusList is a list of DiskStatus values.
ErrorCode is a code that can be used to identify error types.
Feature is a specialized type for feature flags.
FileStorageDomainTypeList is a list of possible StorageDomainTypes which are considered file storage.
HostID is the identifier for hosts.
HostStatus represents the complex states an oVirt host can be in.
HostStatusList is a list of HostStatus.
ImageFormat is a constant for representing the format that images can be in.
ImageFormatList is a list of ImageFormat values.
InstanceTypeID is a type alias for instance type IDs.
No description provided by the author
NetworkID is the UUID if the network.
NICID is the ID for a network interface.
StorageDomainExternalStatus represents the status of an external storage domain.
StorageDomainExternalStatusList is a list of StorageDomainStatus.
StorageDomainID is a specialized type for storage domain IDs.
StorageDomainList represents a list of storage domains.
StorageDomainStatus represents the status a domain can be in.
StorageDomainStatusList is a list of StorageDomainStatus.
StorageDomainType represents the type of the storage domain.
StorageDomainTypeList is a list of possible StorageDomainTypes.
TagID is the UUID of a tag.
TemplateDiskAttachmentID is a typed string to ensure that these IDs are only used for template disk attachments.
TemplateID is an identifier for a template.
TemplateStatus represents the status the template is in.
VMAffinity is the affinity used in the placement policy on determining if a VM can be migrated to a different host.
VMGraphicsConsoleID is the identifier for graphics consoles on a VM.
VMHugePages is the hugepages setting of the VM in bytes.
VMHugePagesList is a list of VMHugePages.
VMID is a specific type for virtual machine IDs.
VMStatus represents the status of a VM.
VMStatusList is a list of VMStatus.
VMType contains some preconfigured settings, such as the availability of remote desktop, for the VM.
VNICProfileID is the ID of the VNIC profile.