libvirt

package module
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: MIT Imports: 10 Imported by: 0

README

libvirt-go Build Status GoDoc

Go bindings for libvirt.

Make sure to have libvirt-dev package (or the development files otherwise somewhere in your include path)

Version Support

The libvirt go package provides API coverage for libvirt versions from 1.2.0 onwards, through conditional compilation of newer APIs.

Documentation

Contributing

The libvirt project aims to add support for new APIs to libvirt-go as soon as they are added to the main libvirt C library. If you are submitting changes to the libvirt C library API, please submit a libvirt-go change at the same time.

Bug fixes and other improvements to the libvirt-go library are welcome at any time. The preferred submission method is to use git send-email to submit patches to the libvir-list@redhat.com mailing list. eg. to send a single patch

git send-email --to libvir-list@redhat.com --subject-prefix "PATCH go"
--smtp-server=$HOSTNAME -1

Or to send all patches on the current branch, against master

git send-email --to libvir-list@redhat.com --subject-prefix "PATCH go"
--smtp-server=$HOSTNAME --no-chain-reply-to --cover-letter --annotate
master..

Note the master GIT repository is at

The following automatic read-only mirrors are available as a convenience to allow contributors to "fork" the repository:

While you can send pull-requests to these mirrors, they will be re-submitted via emai to the mailing list for review before being merged, unless they are trivial/obvious bug fixes.

Testing

The core API unit tests are all written to use the built-in test driver (test:///default), so they have no interaction with the host OS environment.

Coverage of libvirt C library APIs / constants is verified using automated tests. These can be run by passing the 'api' build tag. eg go test -tags api

For areas where the test driver lacks functionality, it is possible to use the QEMU or LXC drivers to exercise code. Such tests must be part of the 'integration_test.go' file though, which is only run when passing the 'integration' build tag. eg go test -tags integration

In order to run the unit tests, libvirtd should be configured to allow your user account read-write access with no passwords. This can be easily done using polkit config files

# cat > /etc/polkit-1/localauthority/50-local.d/50-libvirt.pkla  <<EOF
[Passwordless libvirt access]
Identity=unix-group:berrange
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF

(Replace 'berrange' with your UNIX user name).

One of the integration tests also requires that libvirtd is listening for TCP connections on localhost, with sasl auth This can be setup by editing /etc/libvirt/libvirtd.conf to set

  listen_tls=0
  listen_tcp=1
  auth_tcp=sasl
  listen_addr="127.0.0.1"

and then start libvirtd with the --listen flag (this can be set in /etc/sysconfig/libvirtd to make it persistent).

Then create a sasl user

   saslpasswd2 -a libvirt user

and enter "pass" as the password.

Alternatively a Vagrantfile, requiring use of virtualbox, is included to run the integration tests:

  • cd ./vagrant
  • vagrant up to provision the virtual machine
  • vagrant ssh to login to the virtual machine

Once inside, sudo su - and go test -tags integration libvirt.

Documentation

Overview

Package libvirt provides a Go binding to the libvirt C library

Through conditional compilation it supports libvirt versions 1.2.0 onwards. This is done automatically, with no requirement to use magic Go build tags. If an API was not available in the particular version of libvirt this package was built against, an error will be returned with a code of ERR_NO_SUPPORT. This is the same code seen if using a new libvirt library to talk to an old libvirtd lacking the API, or if a hypervisor does not support a given feature, so an application can easily handle all scenarios together.

The Go binding is a fairly direct mapping of the underling C API which seeks to maximise the use of the Go type system to allow strong compiler type checking. The following rules describe how APIs/constants are mapped from C to Go

For structs, the 'vir' prefix and 'Ptr' suffix are removed from the name. e.g. virConnectPtr in C becomes 'Connect' in Go.

For structs which are reference counted at the C level, it is neccessary to explicitly release the reference at the Go level. e.g. if a Go method returns a '* Domain' struct, it is neccessary to call 'Free' on this when no longer required. The use of 'defer' is recommended for this purpose

dom, err := conn.LookupDomainByName("myguest")
if err != nil {
    ...
}
defer dom.Free()

If multiple goroutines are using the same libvirt object struct, it may not be possible to determine which goroutine should call 'Free'. In such scenarios each new goroutine should call 'Ref' to obtain a private reference on the underlying C struct. All goroutines can call 'Free' unconditionally with the final one causing the release of the C object.

For methods, the 'vir' prefix and object name prefix are remove from the name. The C functions become methods with an object receiver. e.g. 'virDomainScreenshot' in C becomes 'Screenshot' with a 'Domain *' receiver.

For methods which accept a 'unsigned int flags' parameter in the C level, the corresponding Go parameter will be a named type corresponding to the C enum that defines the valid flags. For example, the ListAllDomains method takes a 'flags ConnectListAllDomainsFlags' parameter. If there are not currently any flags defined for a method in the C API, then the Go method parameter will be declared as a "flags uint32". Callers should always pass the literal integer value 0 for such parameters, without forcing any specific type. This will allow compatibility with future updates to the libvirt-go binding which may replace the 'uint32' type with a enum type at a later date.

For enums, the VIR_ prefix is removed from the name. The enums get a dedicated type defined in Go. e.g. the VIR_NODE_SUSPEND_TARGET_MEM enum constant in C, becomes NODE_SUSPEND_TARGET_MEM with a type of NodeSuspendTarget.

Methods accepting or returning virTypedParameter arrays in C will map the parameters into a Go struct. The struct will contain two fields for each possible parameter. One boolean field with a suffix of 'Set' indicates whether the parameter has a value set, and the other custom typed field provides the parameter value. This makes it possible to distinguish a parameter with a default value of '0' from a parameter which is 0 because it isn't supported by the hypervisor. If the C API defines additional typed parameters, then the corresponding Go struct will be extended to have further fields. e.g. the GetMemoryStats method in Go (which is backed by virNodeGetMemoryStats in C) will return a NodeMemoryStats struct containing the typed parameter values.

stats, err := conn.GetMemoryParameters()
if err != nil {
   ....
}
if stats.TotalSet {
   fmt.Printf("Total memory: %d KB", stats.Total)
}

Every method that can fail will include an 'error' object as the last return value. This will be an instance of the Error struct if an error occurred. To check for specific libvirt error codes, it is neccessary to cast the error.

err := storage_vol.Wipe(0)
if err != nil {
   lverr, ok := err.(libvirt.Error)
   if ok && lverr.Code == libvirt.ERR_NO_SUPPORT {
       fmt.Println("Wiping storage volumes is not supported");
   } else {
       fmt.Println("Error wiping storage volume: %s", err)
   }
}

Example usage

To connect to libvirt

import (
    libvirt "github.com/libvirt/libvirt-go"
)
conn, err := libvirt.NewConnect("qemu:///system")
if err != nil {
    ...
}
defer conn.Close()

doms, err := conn.ListAllDomains(libvirt.CONNECT_LIST_DOMAINS_ACTIVE)
if err != nil {
    ...
}

fmt.Printf("%d running domains:\n", len(doms))
for _, dom := range doms {
    name, err := dom.GetName()
    if err == nil {
        fmt.Printf("  %s\n", name)
    }
    dom.Free()
}

Index

Constants

View Source
const (
	CONNECT_CLOSE_REASON_ERROR     = ConnectCloseReason(C.VIR_CONNECT_CLOSE_REASON_ERROR)
	CONNECT_CLOSE_REASON_EOF       = ConnectCloseReason(C.VIR_CONNECT_CLOSE_REASON_EOF)
	CONNECT_CLOSE_REASON_KEEPALIVE = ConnectCloseReason(C.VIR_CONNECT_CLOSE_REASON_KEEPALIVE)
	CONNECT_CLOSE_REASON_CLIENT    = ConnectCloseReason(C.VIR_CONNECT_CLOSE_REASON_CLIENT)
)
View Source
const (
	CONNECT_LIST_STORAGE_POOLS_INACTIVE     = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE)
	CONNECT_LIST_STORAGE_POOLS_ACTIVE       = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)
	CONNECT_LIST_STORAGE_POOLS_PERSISTENT   = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT)
	CONNECT_LIST_STORAGE_POOLS_TRANSIENT    = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT)
	CONNECT_LIST_STORAGE_POOLS_AUTOSTART    = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART)
	CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART)
	CONNECT_LIST_STORAGE_POOLS_DIR          = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_DIR)
	CONNECT_LIST_STORAGE_POOLS_FS           = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_FS)
	CONNECT_LIST_STORAGE_POOLS_NETFS        = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_NETFS)
	CONNECT_LIST_STORAGE_POOLS_LOGICAL      = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL)
	CONNECT_LIST_STORAGE_POOLS_DISK         = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_DISK)
	CONNECT_LIST_STORAGE_POOLS_ISCSI        = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI)
	CONNECT_LIST_STORAGE_POOLS_SCSI         = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_SCSI)
	CONNECT_LIST_STORAGE_POOLS_MPATH        = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_MPATH)
	CONNECT_LIST_STORAGE_POOLS_RBD          = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_RBD)
	CONNECT_LIST_STORAGE_POOLS_SHEEPDOG     = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG)
	CONNECT_LIST_STORAGE_POOLS_GLUSTER      = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER)
	CONNECT_LIST_STORAGE_POOLS_ZFS          = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_ZFS)
	CONNECT_LIST_STORAGE_POOLS_VSTORAGE     = ConnectListAllStoragePoolsFlags(C.VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE)
)
View Source
const (
	CONNECT_BASELINE_CPU_EXPAND_FEATURES = ConnectBaselineCPUFlags(C.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)
	CONNECT_BASELINE_CPU_MIGRATABLE      = ConnectBaselineCPUFlags(C.VIR_CONNECT_BASELINE_CPU_MIGRATABLE)
)
View Source
const (
	CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM        = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM)
	CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV       = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV)
	CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV       = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV)
	CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE)
	CONNECT_LIST_NODE_DEVICES_CAP_NET           = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET)
	CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST     = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST)
	CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET   = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET)
	CONNECT_LIST_NODE_DEVICES_CAP_SCSI          = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI)
	CONNECT_LIST_NODE_DEVICES_CAP_STORAGE       = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE)
	CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST       = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST)
	CONNECT_LIST_NODE_DEVICES_CAP_VPORTS        = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS)
	CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC  = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC)
	CONNECT_LIST_NODE_DEVICES_CAP_DRM           = ConnectListAllNodeDeviceFlags(C.VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM)
)
View Source
const (
	CONNECT_RO         = ConnectFlags(C.VIR_CONNECT_RO)
	CONNECT_NO_ALIASES = ConnectFlags(C.VIR_CONNECT_NO_ALIASES)
)
View Source
const (
	CPU_COMPARE_ERROR        = CPUCompareResult(C.VIR_CPU_COMPARE_ERROR)
	CPU_COMPARE_INCOMPATIBLE = CPUCompareResult(C.VIR_CPU_COMPARE_INCOMPATIBLE)
	CPU_COMPARE_IDENTICAL    = CPUCompareResult(C.VIR_CPU_COMPARE_IDENTICAL)
	CPU_COMPARE_SUPERSET     = CPUCompareResult(C.VIR_CPU_COMPARE_SUPERSET)
)
View Source
const (
	NODE_ALLOC_PAGES_ADD = NodeAllocPagesFlags(C.VIR_NODE_ALLOC_PAGES_ADD)
	NODE_ALLOC_PAGES_SET = NodeAllocPagesFlags(C.VIR_NODE_ALLOC_PAGES_SET)
)
View Source
const (
	NODE_SUSPEND_TARGET_MEM    = NodeSuspendTarget(C.VIR_NODE_SUSPEND_TARGET_MEM)
	NODE_SUSPEND_TARGET_DISK   = NodeSuspendTarget(C.VIR_NODE_SUSPEND_TARGET_DISK)
	NODE_SUSPEND_TARGET_HYBRID = NodeSuspendTarget(C.VIR_NODE_SUSPEND_TARGET_HYBRID)
)
View Source
const (
	DOMAIN_NOSTATE     = DomainState(C.VIR_DOMAIN_NOSTATE)
	DOMAIN_RUNNING     = DomainState(C.VIR_DOMAIN_RUNNING)
	DOMAIN_BLOCKED     = DomainState(C.VIR_DOMAIN_BLOCKED)
	DOMAIN_PAUSED      = DomainState(C.VIR_DOMAIN_PAUSED)
	DOMAIN_SHUTDOWN    = DomainState(C.VIR_DOMAIN_SHUTDOWN)
	DOMAIN_CRASHED     = DomainState(C.VIR_DOMAIN_CRASHED)
	DOMAIN_PMSUSPENDED = DomainState(C.VIR_DOMAIN_PMSUSPENDED)
	DOMAIN_SHUTOFF     = DomainState(C.VIR_DOMAIN_SHUTOFF)
)
View Source
const (
	DOMAIN_METADATA_DESCRIPTION = DomainMetadataType(C.VIR_DOMAIN_METADATA_DESCRIPTION)
	DOMAIN_METADATA_TITLE       = DomainMetadataType(C.VIR_DOMAIN_METADATA_TITLE)
	DOMAIN_METADATA_ELEMENT     = DomainMetadataType(C.VIR_DOMAIN_METADATA_ELEMENT)
)
View Source
const (
	DOMAIN_VCPU_CONFIG       = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_CONFIG)
	DOMAIN_VCPU_CURRENT      = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_CURRENT)
	DOMAIN_VCPU_LIVE         = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_LIVE)
	DOMAIN_VCPU_MAXIMUM      = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_MAXIMUM)
	DOMAIN_VCPU_GUEST        = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_GUEST)
	DOMAIN_VCPU_HOTPLUGGABLE = DomainVcpuFlags(C.VIR_DOMAIN_VCPU_HOTPLUGGABLE)
)
View Source
const (
	DOMAIN_DESTROY_DEFAULT  = DomainDestroyFlags(C.VIR_DOMAIN_DESTROY_DEFAULT)
	DOMAIN_DESTROY_GRACEFUL = DomainDestroyFlags(C.VIR_DOMAIN_DESTROY_GRACEFUL)
)
View Source
const (
	DOMAIN_SHUTDOWN_DEFAULT        = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_DEFAULT)
	DOMAIN_SHUTDOWN_ACPI_POWER_BTN = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN)
	DOMAIN_SHUTDOWN_GUEST_AGENT    = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_GUEST_AGENT)
	DOMAIN_SHUTDOWN_INITCTL        = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_INITCTL)
	DOMAIN_SHUTDOWN_SIGNAL         = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_SIGNAL)
	DOMAIN_SHUTDOWN_PARAVIRT       = DomainShutdownFlags(C.VIR_DOMAIN_SHUTDOWN_PARAVIRT)
)
View Source
const (
	DOMAIN_UNDEFINE_MANAGED_SAVE       = DomainUndefineFlagsValues(C.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)       // Also remove any managed save
	DOMAIN_UNDEFINE_SNAPSHOTS_METADATA = DomainUndefineFlagsValues(C.VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA) // If last use of domain, then also remove any snapshot metadata
	DOMAIN_UNDEFINE_NVRAM              = DomainUndefineFlagsValues(C.VIR_DOMAIN_UNDEFINE_NVRAM)              // Also remove any nvram file
	DOMAIN_UNDEFINE_KEEP_NVRAM         = DomainUndefineFlagsValues(C.VIR_DOMAIN_UNDEFINE_KEEP_NVRAM)         // Keep nvram file
)
View Source
const (
	DOMAIN_EVENT_DEFINED     = DomainEventType(C.VIR_DOMAIN_EVENT_DEFINED)
	DOMAIN_EVENT_UNDEFINED   = DomainEventType(C.VIR_DOMAIN_EVENT_UNDEFINED)
	DOMAIN_EVENT_STARTED     = DomainEventType(C.VIR_DOMAIN_EVENT_STARTED)
	DOMAIN_EVENT_SUSPENDED   = DomainEventType(C.VIR_DOMAIN_EVENT_SUSPENDED)
	DOMAIN_EVENT_RESUMED     = DomainEventType(C.VIR_DOMAIN_EVENT_RESUMED)
	DOMAIN_EVENT_STOPPED     = DomainEventType(C.VIR_DOMAIN_EVENT_STOPPED)
	DOMAIN_EVENT_SHUTDOWN    = DomainEventType(C.VIR_DOMAIN_EVENT_SHUTDOWN)
	DOMAIN_EVENT_PMSUSPENDED = DomainEventType(C.VIR_DOMAIN_EVENT_PMSUSPENDED)
	DOMAIN_EVENT_CRASHED     = DomainEventType(C.VIR_DOMAIN_EVENT_CRASHED)
)
View Source
const (
	// No action, watchdog ignored
	DOMAIN_EVENT_WATCHDOG_NONE = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_NONE)

	// Guest CPUs are paused
	DOMAIN_EVENT_WATCHDOG_PAUSE = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_PAUSE)

	// Guest CPUs are reset
	DOMAIN_EVENT_WATCHDOG_RESET = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_RESET)

	// Guest is forcibly powered off
	DOMAIN_EVENT_WATCHDOG_POWEROFF = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF)

	// Guest is requested to gracefully shutdown
	DOMAIN_EVENT_WATCHDOG_SHUTDOWN = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN)

	// No action, a debug message logged
	DOMAIN_EVENT_WATCHDOG_DEBUG = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_DEBUG)

	// Inject a non-maskable interrupt into guest
	DOMAIN_EVENT_WATCHDOG_INJECTNMI = DomainEventWatchdogAction(C.VIR_DOMAIN_EVENT_WATCHDOG_INJECTNMI)
)

The action that is to be taken due to the watchdog device firing

View Source
const (
	// No action, IO error ignored
	DOMAIN_EVENT_IO_ERROR_NONE = DomainEventIOErrorAction(C.VIR_DOMAIN_EVENT_IO_ERROR_NONE)

	// Guest CPUs are paused
	DOMAIN_EVENT_IO_ERROR_PAUSE = DomainEventIOErrorAction(C.VIR_DOMAIN_EVENT_IO_ERROR_PAUSE)

	// IO error reported to guest OS
	DOMAIN_EVENT_IO_ERROR_REPORT = DomainEventIOErrorAction(C.VIR_DOMAIN_EVENT_IO_ERROR_REPORT)
)

The action that is to be taken due to an IO error occurring

View Source
const (
	// Initial socket connection established
	DOMAIN_EVENT_GRAPHICS_CONNECT = DomainEventGraphicsPhase(C.VIR_DOMAIN_EVENT_GRAPHICS_CONNECT)

	// Authentication & setup completed
	DOMAIN_EVENT_GRAPHICS_INITIALIZE = DomainEventGraphicsPhase(C.VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE)

	// Final socket disconnection
	DOMAIN_EVENT_GRAPHICS_DISCONNECT = DomainEventGraphicsPhase(C.VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT)
)

The phase of the graphics client connection

View Source
const (
	// IPv4 address
	DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 = DomainEventGraphicsAddressType(C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4)

	// IPv6 address
	DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 = DomainEventGraphicsAddressType(C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6)

	// UNIX socket path
	DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX = DomainEventGraphicsAddressType(C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX)
)
View Source
const (
	// Placeholder
	DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = DomainBlockJobType(C.VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN)

	// Block Pull (virDomainBlockPull, or virDomainBlockRebase without
	// flags), job ends on completion
	DOMAIN_BLOCK_JOB_TYPE_PULL = DomainBlockJobType(C.VIR_DOMAIN_BLOCK_JOB_TYPE_PULL)

	// Block Copy (virDomainBlockCopy, or virDomainBlockRebase with
	// flags), job exists as long as mirroring is active
	DOMAIN_BLOCK_JOB_TYPE_COPY = DomainBlockJobType(C.VIR_DOMAIN_BLOCK_JOB_TYPE_COPY)

	// Block Commit (virDomainBlockCommit without flags), job ends on
	// completion
	DOMAIN_BLOCK_JOB_TYPE_COMMIT = DomainBlockJobType(C.VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT)

	// Active Block Commit (virDomainBlockCommit with flags), job
	// exists as long as sync is active
	DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = DomainBlockJobType(C.VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT)
)
View Source
const (
	DOMAIN_RUNNING_UNKNOWN            = DomainRunningReason(C.VIR_DOMAIN_RUNNING_UNKNOWN)
	DOMAIN_RUNNING_BOOTED             = DomainRunningReason(C.VIR_DOMAIN_RUNNING_BOOTED)             /* normal startup from boot */
	DOMAIN_RUNNING_MIGRATED           = DomainRunningReason(C.VIR_DOMAIN_RUNNING_MIGRATED)           /* migrated from another host */
	DOMAIN_RUNNING_RESTORED           = DomainRunningReason(C.VIR_DOMAIN_RUNNING_RESTORED)           /* restored from a state file */
	DOMAIN_RUNNING_FROM_SNAPSHOT      = DomainRunningReason(C.VIR_DOMAIN_RUNNING_FROM_SNAPSHOT)      /* restored from snapshot */
	DOMAIN_RUNNING_UNPAUSED           = DomainRunningReason(C.VIR_DOMAIN_RUNNING_UNPAUSED)           /* returned from paused state */
	DOMAIN_RUNNING_MIGRATION_CANCELED = DomainRunningReason(C.VIR_DOMAIN_RUNNING_MIGRATION_CANCELED) /* returned from migration */
	DOMAIN_RUNNING_SAVE_CANCELED      = DomainRunningReason(C.VIR_DOMAIN_RUNNING_SAVE_CANCELED)      /* returned from failed save process */
	DOMAIN_RUNNING_WAKEUP             = DomainRunningReason(C.VIR_DOMAIN_RUNNING_WAKEUP)             /* returned from pmsuspended due to wakeup event */
	DOMAIN_RUNNING_CRASHED            = DomainRunningReason(C.VIR_DOMAIN_RUNNING_CRASHED)            /* resumed from crashed */
	DOMAIN_RUNNING_POSTCOPY           = DomainRunningReason(C.VIR_DOMAIN_RUNNING_POSTCOPY)           /* running in post-copy migration mode */
)
View Source
const (
	DOMAIN_PAUSED_UNKNOWN         = DomainPausedReason(C.VIR_DOMAIN_PAUSED_UNKNOWN)         /* the reason is unknown */
	DOMAIN_PAUSED_USER            = DomainPausedReason(C.VIR_DOMAIN_PAUSED_USER)            /* paused on user request */
	DOMAIN_PAUSED_MIGRATION       = DomainPausedReason(C.VIR_DOMAIN_PAUSED_MIGRATION)       /* paused for offline migration */
	DOMAIN_PAUSED_SAVE            = DomainPausedReason(C.VIR_DOMAIN_PAUSED_SAVE)            /* paused for save */
	DOMAIN_PAUSED_DUMP            = DomainPausedReason(C.VIR_DOMAIN_PAUSED_DUMP)            /* paused for offline core dump */
	DOMAIN_PAUSED_IOERROR         = DomainPausedReason(C.VIR_DOMAIN_PAUSED_IOERROR)         /* paused due to a disk I/O error */
	DOMAIN_PAUSED_WATCHDOG        = DomainPausedReason(C.VIR_DOMAIN_PAUSED_WATCHDOG)        /* paused due to a watchdog event */
	DOMAIN_PAUSED_FROM_SNAPSHOT   = DomainPausedReason(C.VIR_DOMAIN_PAUSED_FROM_SNAPSHOT)   /* paused after restoring from snapshot */
	DOMAIN_PAUSED_SHUTTING_DOWN   = DomainPausedReason(C.VIR_DOMAIN_PAUSED_SHUTTING_DOWN)   /* paused during shutdown process */
	DOMAIN_PAUSED_SNAPSHOT        = DomainPausedReason(C.VIR_DOMAIN_PAUSED_SNAPSHOT)        /* paused while creating a snapshot */
	DOMAIN_PAUSED_CRASHED         = DomainPausedReason(C.VIR_DOMAIN_PAUSED_CRASHED)         /* paused due to a guest crash */
	DOMAIN_PAUSED_STARTING_UP     = DomainPausedReason(C.VIR_DOMAIN_PAUSED_STARTING_UP)     /* the domainis being started */
	DOMAIN_PAUSED_POSTCOPY        = DomainPausedReason(C.VIR_DOMAIN_PAUSED_POSTCOPY)        /* paused for post-copy migration */
	DOMAIN_PAUSED_POSTCOPY_FAILED = DomainPausedReason(C.VIR_DOMAIN_PAUSED_POSTCOPY_FAILED) /* paused after failed post-copy */
)
View Source
const (
	DOMAIN_XML_SECURE     = DomainXMLFlags(C.VIR_DOMAIN_XML_SECURE)     /* dump security sensitive information too */
	DOMAIN_XML_INACTIVE   = DomainXMLFlags(C.VIR_DOMAIN_XML_INACTIVE)   /* dump inactive domain information */
	DOMAIN_XML_UPDATE_CPU = DomainXMLFlags(C.VIR_DOMAIN_XML_UPDATE_CPU) /* update guest CPU requirements according to host CPU */
	DOMAIN_XML_MIGRATABLE = DomainXMLFlags(C.VIR_DOMAIN_XML_MIGRATABLE) /* dump XML suitable for migration */
)
View Source
const (
	DOMAIN_CPU_STATS_CPUTIME    = DomainCPUStatsTags(C.VIR_DOMAIN_CPU_STATS_CPUTIME)
	DOMAIN_CPU_STATS_SYSTEMTIME = DomainCPUStatsTags(C.VIR_DOMAIN_CPU_STATS_SYSTEMTIME)
	DOMAIN_CPU_STATS_USERTIME   = DomainCPUStatsTags(C.VIR_DOMAIN_CPU_STATS_USERTIME)
	DOMAIN_CPU_STATS_VCPUTIME   = DomainCPUStatsTags(C.VIR_DOMAIN_CPU_STATS_VCPUTIME)
)
View Source
const (
	KEYCODE_SET_LINUX  = KeycodeSet(C.VIR_KEYCODE_SET_LINUX)
	KEYCODE_SET_XT     = KeycodeSet(C.VIR_KEYCODE_SET_XT)
	KEYCODE_SET_ATSET1 = KeycodeSet(C.VIR_KEYCODE_SET_ATSET1)
	KEYCODE_SET_ATSET2 = KeycodeSet(C.VIR_KEYCODE_SET_ATSET2)
	KEYCODE_SET_ATSET3 = KeycodeSet(C.VIR_KEYCODE_SET_ATSET3)
	KEYCODE_SET_OSX    = KeycodeSet(C.VIR_KEYCODE_SET_OSX)
	KEYCODE_SET_XT_KBD = KeycodeSet(C.VIR_KEYCODE_SET_XT_KBD)
	KEYCODE_SET_USB    = KeycodeSet(C.VIR_KEYCODE_SET_USB)
	KEYCODE_SET_WIN32  = KeycodeSet(C.VIR_KEYCODE_SET_WIN32)
	KEYCODE_SET_RFB    = KeycodeSet(C.VIR_KEYCODE_SET_RFB)
)
View Source
const (
	// OldSrcPath is set
	DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START = ConnectDomainEventDiskChangeReason(C.VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START)
	DOMAIN_EVENT_DISK_DROP_MISSING_ON_START   = ConnectDomainEventDiskChangeReason(C.VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START)
)
View Source
const (
	DOMAIN_PROCESS_SIGNAL_NOP  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_NOP)
	DOMAIN_PROCESS_SIGNAL_HUP  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_HUP)
	DOMAIN_PROCESS_SIGNAL_INT  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_INT)
	DOMAIN_PROCESS_SIGNAL_QUIT = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_QUIT)
	DOMAIN_PROCESS_SIGNAL_ILL  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_ILL)
	DOMAIN_PROCESS_SIGNAL_TRAP = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_TRAP)
	DOMAIN_PROCESS_SIGNAL_ABRT = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_ABRT)
	DOMAIN_PROCESS_SIGNAL_BUS  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_BUS)
	DOMAIN_PROCESS_SIGNAL_FPE  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_FPE)
	DOMAIN_PROCESS_SIGNAL_KILL = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_KILL)

	DOMAIN_PROCESS_SIGNAL_USR1   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_USR1)
	DOMAIN_PROCESS_SIGNAL_SEGV   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_SEGV)
	DOMAIN_PROCESS_SIGNAL_USR2   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_USR2)
	DOMAIN_PROCESS_SIGNAL_PIPE   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_PIPE)
	DOMAIN_PROCESS_SIGNAL_ALRM   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_ALRM)
	DOMAIN_PROCESS_SIGNAL_TERM   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_TERM)
	DOMAIN_PROCESS_SIGNAL_STKFLT = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_STKFLT)
	DOMAIN_PROCESS_SIGNAL_CHLD   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_CHLD)
	DOMAIN_PROCESS_SIGNAL_CONT   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_CONT)
	DOMAIN_PROCESS_SIGNAL_STOP   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_STOP)

	DOMAIN_PROCESS_SIGNAL_TSTP   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_TSTP)
	DOMAIN_PROCESS_SIGNAL_TTIN   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_TTIN)
	DOMAIN_PROCESS_SIGNAL_TTOU   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_TTOU)
	DOMAIN_PROCESS_SIGNAL_URG    = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_URG)
	DOMAIN_PROCESS_SIGNAL_XCPU   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_XCPU)
	DOMAIN_PROCESS_SIGNAL_XFSZ   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_XFSZ)
	DOMAIN_PROCESS_SIGNAL_VTALRM = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_VTALRM)
	DOMAIN_PROCESS_SIGNAL_PROF   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_PROF)
	DOMAIN_PROCESS_SIGNAL_WINCH  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_WINCH)
	DOMAIN_PROCESS_SIGNAL_POLL   = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_POLL)

	DOMAIN_PROCESS_SIGNAL_PWR = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_PWR)
	DOMAIN_PROCESS_SIGNAL_SYS = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_SYS)
	DOMAIN_PROCESS_SIGNAL_RT0 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT0)
	DOMAIN_PROCESS_SIGNAL_RT1 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT1)
	DOMAIN_PROCESS_SIGNAL_RT2 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT2)
	DOMAIN_PROCESS_SIGNAL_RT3 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT3)
	DOMAIN_PROCESS_SIGNAL_RT4 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT4)
	DOMAIN_PROCESS_SIGNAL_RT5 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT5)
	DOMAIN_PROCESS_SIGNAL_RT6 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT6)
	DOMAIN_PROCESS_SIGNAL_RT7 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT7)

	DOMAIN_PROCESS_SIGNAL_RT8  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT8)
	DOMAIN_PROCESS_SIGNAL_RT9  = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT9)
	DOMAIN_PROCESS_SIGNAL_RT10 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT10)
	DOMAIN_PROCESS_SIGNAL_RT11 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT11)
	DOMAIN_PROCESS_SIGNAL_RT12 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT12)
	DOMAIN_PROCESS_SIGNAL_RT13 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT13)
	DOMAIN_PROCESS_SIGNAL_RT14 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT14)
	DOMAIN_PROCESS_SIGNAL_RT15 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT15)
	DOMAIN_PROCESS_SIGNAL_RT16 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT16)
	DOMAIN_PROCESS_SIGNAL_RT17 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT17)
	DOMAIN_PROCESS_SIGNAL_RT18 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT18)

	DOMAIN_PROCESS_SIGNAL_RT19 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT19)
	DOMAIN_PROCESS_SIGNAL_RT20 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT20)
	DOMAIN_PROCESS_SIGNAL_RT21 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT21)
	DOMAIN_PROCESS_SIGNAL_RT22 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT22)
	DOMAIN_PROCESS_SIGNAL_RT23 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT23)
	DOMAIN_PROCESS_SIGNAL_RT24 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT24)
	DOMAIN_PROCESS_SIGNAL_RT25 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT25)
	DOMAIN_PROCESS_SIGNAL_RT26 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT26)
	DOMAIN_PROCESS_SIGNAL_RT27 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT27)

	DOMAIN_PROCESS_SIGNAL_RT28 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT28)
	DOMAIN_PROCESS_SIGNAL_RT29 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT29)
	DOMAIN_PROCESS_SIGNAL_RT30 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT30)
	DOMAIN_PROCESS_SIGNAL_RT31 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT31)
	DOMAIN_PROCESS_SIGNAL_RT32 = DomainProcessSignal(C.VIR_DOMAIN_PROCESS_SIGNAL_RT32)
)
View Source
const (
	DOMAIN_CONTROL_ERROR_REASON_NONE     = DomainControlErrorReason(C.VIR_DOMAIN_CONTROL_ERROR_REASON_NONE)
	DOMAIN_CONTROL_ERROR_REASON_UNKNOWN  = DomainControlErrorReason(C.VIR_DOMAIN_CONTROL_ERROR_REASON_UNKNOWN)
	DOMAIN_CONTROL_ERROR_REASON_MONITOR  = DomainControlErrorReason(C.VIR_DOMAIN_CONTROL_ERROR_REASON_MONITOR)
	DOMAIN_CONTROL_ERROR_REASON_INTERNAL = DomainControlErrorReason(C.VIR_DOMAIN_CONTROL_ERROR_REASON_INTERNAL)
)
View Source
const (
	DOMAIN_CRASHED_UNKNOWN  = DomainCrashedReason(C.VIR_DOMAIN_CRASHED_UNKNOWN)
	DOMAIN_CRASHED_PANICKED = DomainCrashedReason(C.VIR_DOMAIN_CRASHED_PANICKED)
)
View Source
const (
	DOMAIN_BLOCK_COPY_SHALLOW   = DomainBlockCopyFlags(C.VIR_DOMAIN_BLOCK_COPY_SHALLOW)
	DOMAIN_BLOCK_COPY_REUSE_EXT = DomainBlockCopyFlags(C.VIR_DOMAIN_BLOCK_COPY_REUSE_EXT)
)
View Source
const (
	DOMAIN_CONSOLE_FORCE = DomainConsoleFlags(C.VIR_DOMAIN_CONSOLE_FORCE)
	DOMAIN_CONSOLE_SAFE  = DomainConsoleFlags(C.VIR_DOMAIN_CONSOLE_SAFE)
)
View Source
const (
	DOMAIN_CORE_DUMP_FORMAT_RAW          = DomainCoreDumpFormat(C.VIR_DOMAIN_CORE_DUMP_FORMAT_RAW)
	DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB   = DomainCoreDumpFormat(C.VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB)
	DOMAIN_CORE_DUMP_FORMAT_KDUMP_LZO    = DomainCoreDumpFormat(C.VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_LZO)
	DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPY = DomainCoreDumpFormat(C.VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPY)
)
View Source
const (
	DOMAIN_JOB_NONE      = DomainJobType(C.VIR_DOMAIN_JOB_NONE)
	DOMAIN_JOB_BOUNDED   = DomainJobType(C.VIR_DOMAIN_JOB_BOUNDED)
	DOMAIN_JOB_UNBOUNDED = DomainJobType(C.VIR_DOMAIN_JOB_UNBOUNDED)
	DOMAIN_JOB_COMPLETED = DomainJobType(C.VIR_DOMAIN_JOB_COMPLETED)
	DOMAIN_JOB_FAILED    = DomainJobType(C.VIR_DOMAIN_JOB_FAILED)
	DOMAIN_JOB_CANCELLED = DomainJobType(C.VIR_DOMAIN_JOB_CANCELLED)
)
View Source
const (
	DOMAIN_NUMATUNE_MEM_STRICT     = DomainNumatuneMemMode(C.VIR_DOMAIN_NUMATUNE_MEM_STRICT)
	DOMAIN_NUMATUNE_MEM_PREFERRED  = DomainNumatuneMemMode(C.VIR_DOMAIN_NUMATUNE_MEM_PREFERRED)
	DOMAIN_NUMATUNE_MEM_INTERLEAVE = DomainNumatuneMemMode(C.VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE)
)
View Source
const (
	DOMAIN_DISK_ERROR_NONE     = DomainDiskErrorCode(C.VIR_DOMAIN_DISK_ERROR_NONE)
	DOMAIN_DISK_ERROR_UNSPEC   = DomainDiskErrorCode(C.VIR_DOMAIN_DISK_ERROR_UNSPEC)
	DOMAIN_DISK_ERROR_NO_SPACE = DomainDiskErrorCode(C.VIR_DOMAIN_DISK_ERROR_NO_SPACE)
)
View Source
const (
	DOMAIN_STATS_STATE     = DomainStatsTypes(C.VIR_DOMAIN_STATS_STATE)
	DOMAIN_STATS_CPU_TOTAL = DomainStatsTypes(C.VIR_DOMAIN_STATS_CPU_TOTAL)
	DOMAIN_STATS_BALLOON   = DomainStatsTypes(C.VIR_DOMAIN_STATS_BALLOON)
	DOMAIN_STATS_VCPU      = DomainStatsTypes(C.VIR_DOMAIN_STATS_VCPU)
	DOMAIN_STATS_INTERFACE = DomainStatsTypes(C.VIR_DOMAIN_STATS_INTERFACE)
	DOMAIN_STATS_BLOCK     = DomainStatsTypes(C.VIR_DOMAIN_STATS_BLOCK)
	DOMAIN_STATS_PERF      = DomainStatsTypes(C.VIR_DOMAIN_STATS_PERF)
)
View Source
const (
	VCPU_OFFLINE = VcpuState(C.VIR_VCPU_OFFLINE)
	VCPU_RUNNING = VcpuState(C.VIR_VCPU_RUNNING)
	VCPU_BLOCKED = VcpuState(C.VIR_VCPU_BLOCKED)
)
View Source
const (
	DOMAIN_SNAPSHOT_DELETE_CHILDREN      = DomainSnapshotDeleteFlags(C.VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN)
	DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY = DomainSnapshotDeleteFlags(C.VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY)
	DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY = DomainSnapshotDeleteFlags(C.VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY)
)
View Source
const (
	ERR_NONE    = ErrorLevel(C.VIR_ERR_NONE)
	ERR_WARNING = ErrorLevel(C.VIR_ERR_WARNING)
	ERR_ERROR   = ErrorLevel(C.VIR_ERR_ERROR)
)
View Source
const (
	ERR_OK = ErrorNumber(C.VIR_ERR_OK)

	// internal error
	ERR_INTERNAL_ERROR = ErrorNumber(C.VIR_ERR_INTERNAL_ERROR)

	// memory allocation failure
	ERR_NO_MEMORY = ErrorNumber(C.VIR_ERR_NO_MEMORY)

	// no support for this function
	ERR_NO_SUPPORT = ErrorNumber(C.VIR_ERR_NO_SUPPORT)

	// could not resolve hostname
	ERR_UNKNOWN_HOST = ErrorNumber(C.VIR_ERR_UNKNOWN_HOST)

	// can't connect to hypervisor
	ERR_NO_CONNECT = ErrorNumber(C.VIR_ERR_NO_CONNECT)

	// invalid connection object
	ERR_INVALID_CONN = ErrorNumber(C.VIR_ERR_INVALID_CONN)

	// invalid domain object
	ERR_INVALID_DOMAIN = ErrorNumber(C.VIR_ERR_INVALID_DOMAIN)

	// invalid function argument
	ERR_INVALID_ARG = ErrorNumber(C.VIR_ERR_INVALID_ARG)

	// a command to hypervisor failed
	ERR_OPERATION_FAILED = ErrorNumber(C.VIR_ERR_OPERATION_FAILED)

	// a HTTP GET command to failed
	ERR_GET_FAILED = ErrorNumber(C.VIR_ERR_GET_FAILED)

	// a HTTP POST command to failed
	ERR_POST_FAILED = ErrorNumber(C.VIR_ERR_POST_FAILED)

	// unexpected HTTP error code
	ERR_HTTP_ERROR = ErrorNumber(C.VIR_ERR_HTTP_ERROR)

	// failure to serialize an S-Expr
	ERR_SEXPR_SERIAL = ErrorNumber(C.VIR_ERR_SEXPR_SERIAL)

	// could not open Xen hypervisor control
	ERR_NO_XEN = ErrorNumber(C.VIR_ERR_NO_XEN)

	// failure doing an hypervisor call
	ERR_XEN_CALL = ErrorNumber(C.VIR_ERR_XEN_CALL)

	// unknown OS type
	ERR_OS_TYPE = ErrorNumber(C.VIR_ERR_OS_TYPE)

	// missing kernel information
	ERR_NO_KERNEL = ErrorNumber(C.VIR_ERR_NO_KERNEL)

	// missing root device information
	ERR_NO_ROOT = ErrorNumber(C.VIR_ERR_NO_ROOT)

	// missing source device information
	ERR_NO_SOURCE = ErrorNumber(C.VIR_ERR_NO_SOURCE)

	// missing target device information
	ERR_NO_TARGET = ErrorNumber(C.VIR_ERR_NO_TARGET)

	// missing domain name information
	ERR_NO_NAME = ErrorNumber(C.VIR_ERR_NO_NAME)

	// missing domain OS information
	ERR_NO_OS = ErrorNumber(C.VIR_ERR_NO_OS)

	// missing domain devices information
	ERR_NO_DEVICE = ErrorNumber(C.VIR_ERR_NO_DEVICE)

	// could not open Xen Store control
	ERR_NO_XENSTORE = ErrorNumber(C.VIR_ERR_NO_XENSTORE)

	// too many drivers registered
	ERR_DRIVER_FULL = ErrorNumber(C.VIR_ERR_DRIVER_FULL)

	// not supported by the drivers (DEPRECATED)
	ERR_CALL_FAILED = ErrorNumber(C.VIR_ERR_CALL_FAILED)

	// an XML description is not well formed or broken
	ERR_XML_ERROR = ErrorNumber(C.VIR_ERR_XML_ERROR)

	// the domain already exist
	ERR_DOM_EXIST = ErrorNumber(C.VIR_ERR_DOM_EXIST)

	// operation forbidden on read-only connections
	ERR_OPERATION_DENIED = ErrorNumber(C.VIR_ERR_OPERATION_DENIED)

	// failed to open a conf file
	ERR_OPEN_FAILED = ErrorNumber(C.VIR_ERR_OPEN_FAILED)

	// failed to read a conf file
	ERR_READ_FAILED = ErrorNumber(C.VIR_ERR_READ_FAILED)

	// failed to parse a conf file
	ERR_PARSE_FAILED = ErrorNumber(C.VIR_ERR_PARSE_FAILED)

	// failed to parse the syntax of a conf file
	ERR_CONF_SYNTAX = ErrorNumber(C.VIR_ERR_CONF_SYNTAX)

	// failed to write a conf file
	ERR_WRITE_FAILED = ErrorNumber(C.VIR_ERR_WRITE_FAILED)

	// detail of an XML error
	ERR_XML_DETAIL = ErrorNumber(C.VIR_ERR_XML_DETAIL)

	// invalid network object
	ERR_INVALID_NETWORK = ErrorNumber(C.VIR_ERR_INVALID_NETWORK)

	// the network already exist
	ERR_NETWORK_EXIST = ErrorNumber(C.VIR_ERR_NETWORK_EXIST)

	// general system call failure
	ERR_SYSTEM_ERROR = ErrorNumber(C.VIR_ERR_SYSTEM_ERROR)

	// some sort of RPC error
	ERR_RPC = ErrorNumber(C.VIR_ERR_RPC)

	// error from a GNUTLS call
	ERR_GNUTLS_ERROR = ErrorNumber(C.VIR_ERR_GNUTLS_ERROR)

	// failed to start network
	WAR_NO_NETWORK = ErrorNumber(C.VIR_WAR_NO_NETWORK)

	// domain not found or unexpectedly disappeared
	ERR_NO_DOMAIN = ErrorNumber(C.VIR_ERR_NO_DOMAIN)

	// network not found
	ERR_NO_NETWORK = ErrorNumber(C.VIR_ERR_NO_NETWORK)

	// invalid MAC address
	ERR_INVALID_MAC = ErrorNumber(C.VIR_ERR_INVALID_MAC)

	// authentication failed
	ERR_AUTH_FAILED = ErrorNumber(C.VIR_ERR_AUTH_FAILED)

	// invalid storage pool object
	ERR_INVALID_STORAGE_POOL = ErrorNumber(C.VIR_ERR_INVALID_STORAGE_POOL)

	// invalid storage vol object
	ERR_INVALID_STORAGE_VOL = ErrorNumber(C.VIR_ERR_INVALID_STORAGE_VOL)

	// failed to start storage
	WAR_NO_STORAGE = ErrorNumber(C.VIR_WAR_NO_STORAGE)

	// storage pool not found
	ERR_NO_STORAGE_POOL = ErrorNumber(C.VIR_ERR_NO_STORAGE_POOL)

	// storage volume not found
	ERR_NO_STORAGE_VOL = ErrorNumber(C.VIR_ERR_NO_STORAGE_VOL)

	// failed to start node driver
	WAR_NO_NODE = ErrorNumber(C.VIR_WAR_NO_NODE)

	// invalid node device object
	ERR_INVALID_NODE_DEVICE = ErrorNumber(C.VIR_ERR_INVALID_NODE_DEVICE)

	// node device not found
	ERR_NO_NODE_DEVICE = ErrorNumber(C.VIR_ERR_NO_NODE_DEVICE)

	// security model not found
	ERR_NO_SECURITY_MODEL = ErrorNumber(C.VIR_ERR_NO_SECURITY_MODEL)

	// operation is not applicable at this time
	ERR_OPERATION_INVALID = ErrorNumber(C.VIR_ERR_OPERATION_INVALID)

	// failed to start interface driver
	WAR_NO_INTERFACE = ErrorNumber(C.VIR_WAR_NO_INTERFACE)

	// interface driver not running
	ERR_NO_INTERFACE = ErrorNumber(C.VIR_ERR_NO_INTERFACE)

	// invalid interface object
	ERR_INVALID_INTERFACE = ErrorNumber(C.VIR_ERR_INVALID_INTERFACE)

	// more than one matching interface found
	ERR_MULTIPLE_INTERFACES = ErrorNumber(C.VIR_ERR_MULTIPLE_INTERFACES)

	// failed to start nwfilter driver
	WAR_NO_NWFILTER = ErrorNumber(C.VIR_WAR_NO_NWFILTER)

	// invalid nwfilter object
	ERR_INVALID_NWFILTER = ErrorNumber(C.VIR_ERR_INVALID_NWFILTER)

	// nw filter pool not found
	ERR_NO_NWFILTER = ErrorNumber(C.VIR_ERR_NO_NWFILTER)

	// nw filter pool not found
	ERR_BUILD_FIREWALL = ErrorNumber(C.VIR_ERR_BUILD_FIREWALL)

	// failed to start secret storage
	WAR_NO_SECRET = ErrorNumber(C.VIR_WAR_NO_SECRET)

	// invalid secret
	ERR_INVALID_SECRET = ErrorNumber(C.VIR_ERR_INVALID_SECRET)

	// secret not found
	ERR_NO_SECRET = ErrorNumber(C.VIR_ERR_NO_SECRET)

	// unsupported configuration construct
	ERR_CONFIG_UNSUPPORTED = ErrorNumber(C.VIR_ERR_CONFIG_UNSUPPORTED)

	// timeout occurred during operation
	ERR_OPERATION_TIMEOUT = ErrorNumber(C.VIR_ERR_OPERATION_TIMEOUT)

	// a migration worked, but making the VM persist on the dest host failed
	ERR_MIGRATE_PERSIST_FAILED = ErrorNumber(C.VIR_ERR_MIGRATE_PERSIST_FAILED)

	// a synchronous hook script failed
	ERR_HOOK_SCRIPT_FAILED = ErrorNumber(C.VIR_ERR_HOOK_SCRIPT_FAILED)

	// invalid domain snapshot
	ERR_INVALID_DOMAIN_SNAPSHOT = ErrorNumber(C.VIR_ERR_INVALID_DOMAIN_SNAPSHOT)

	// domain snapshot not found
	ERR_NO_DOMAIN_SNAPSHOT = ErrorNumber(C.VIR_ERR_NO_DOMAIN_SNAPSHOT)

	// stream pointer not valid
	ERR_INVALID_STREAM = ErrorNumber(C.VIR_ERR_INVALID_STREAM)

	// valid API use but unsupported by the given driver
	ERR_ARGUMENT_UNSUPPORTED = ErrorNumber(C.VIR_ERR_ARGUMENT_UNSUPPORTED)

	// storage pool probe failed
	ERR_STORAGE_PROBE_FAILED = ErrorNumber(C.VIR_ERR_STORAGE_PROBE_FAILED)

	// storage pool already built
	ERR_STORAGE_POOL_BUILT = ErrorNumber(C.VIR_ERR_STORAGE_POOL_BUILT)

	// force was not requested for a risky domain snapshot revert
	ERR_SNAPSHOT_REVERT_RISKY = ErrorNumber(C.VIR_ERR_SNAPSHOT_REVERT_RISKY)

	// operation on a domain was canceled/aborted by user
	ERR_OPERATION_ABORTED = ErrorNumber(C.VIR_ERR_OPERATION_ABORTED)

	// authentication cancelled
	ERR_AUTH_CANCELLED = ErrorNumber(C.VIR_ERR_AUTH_CANCELLED)

	// The metadata is not present
	ERR_NO_DOMAIN_METADATA = ErrorNumber(C.VIR_ERR_NO_DOMAIN_METADATA)

	// Migration is not safe
	ERR_MIGRATE_UNSAFE = ErrorNumber(C.VIR_ERR_MIGRATE_UNSAFE)

	// integer overflow
	ERR_OVERFLOW = ErrorNumber(C.VIR_ERR_OVERFLOW)

	// action prevented by block copy job
	ERR_BLOCK_COPY_ACTIVE = ErrorNumber(C.VIR_ERR_BLOCK_COPY_ACTIVE)

	// The requested operation is not supported
	ERR_OPERATION_UNSUPPORTED = ErrorNumber(C.VIR_ERR_OPERATION_UNSUPPORTED)

	// error in ssh transport driver
	ERR_SSH = ErrorNumber(C.VIR_ERR_SSH)

	// guest agent is unresponsive, not running or not usable
	ERR_AGENT_UNRESPONSIVE = ErrorNumber(C.VIR_ERR_AGENT_UNRESPONSIVE)

	// resource is already in use
	ERR_RESOURCE_BUSY = ErrorNumber(C.VIR_ERR_RESOURCE_BUSY)

	// operation on the object/resource was denied
	ERR_ACCESS_DENIED = ErrorNumber(C.VIR_ERR_ACCESS_DENIED)

	// error from a dbus service
	ERR_DBUS_SERVICE = ErrorNumber(C.VIR_ERR_DBUS_SERVICE)

	// the storage vol already exists
	ERR_STORAGE_VOL_EXIST = ErrorNumber(C.VIR_ERR_STORAGE_VOL_EXIST)

	// given CPU is incompatible with host CPU
	ERR_CPU_INCOMPATIBLE = ErrorNumber(C.VIR_ERR_CPU_INCOMPATIBLE)

	// XML document doesn't validate against schema
	ERR_XML_INVALID_SCHEMA = ErrorNumber(C.VIR_ERR_XML_INVALID_SCHEMA)

	// Finish API succeeded but it is expected to return NULL */
	ERR_MIGRATE_FINISH_OK = ErrorNumber(C.VIR_ERR_MIGRATE_FINISH_OK)

	// authentication unavailable
	ERR_AUTH_UNAVAILABLE = ErrorNumber(C.VIR_ERR_AUTH_UNAVAILABLE)

	// Server was not found
	ERR_NO_SERVER = ErrorNumber(C.VIR_ERR_NO_SERVER)

	// Client was not found
	ERR_NO_CLIENT = ErrorNumber(C.VIR_ERR_NO_CLIENT)

	// guest agent replies with wrong id to guest sync command
	ERR_AGENT_UNSYNCED = ErrorNumber(C.VIR_ERR_AGENT_UNSYNCED)

	// error in libssh transport driver
	ERR_LIBSSH = ErrorNumber(C.VIR_ERR_LIBSSH)
)
View Source
const (
	FROM_NONE = ErrorDomain(C.VIR_FROM_NONE)

	// Error at Xen hypervisor layer
	FROM_XEN = ErrorDomain(C.VIR_FROM_XEN)

	// Error at connection with xend daemon
	FROM_XEND = ErrorDomain(C.VIR_FROM_XEND)

	// Error at connection with xen store
	FROM_XENSTORE = ErrorDomain(C.VIR_FROM_XENSTORE)

	// Error in the S-Expression code
	FROM_SEXPR = ErrorDomain(C.VIR_FROM_SEXPR)

	// Error in the XML code
	FROM_XML = ErrorDomain(C.VIR_FROM_XML)

	// Error when operating on a domain
	FROM_DOM = ErrorDomain(C.VIR_FROM_DOM)

	// Error in the XML-RPC code
	FROM_RPC = ErrorDomain(C.VIR_FROM_RPC)

	// Error in the proxy code; unused since 0.8.6
	FROM_PROXY = ErrorDomain(C.VIR_FROM_PROXY)

	// Error in the configuration file handling
	FROM_CONF = ErrorDomain(C.VIR_FROM_CONF)

	// Error at the QEMU daemon
	FROM_QEMU = ErrorDomain(C.VIR_FROM_QEMU)

	// Error when operating on a network
	FROM_NET = ErrorDomain(C.VIR_FROM_NET)

	// Error from test driver
	FROM_TEST = ErrorDomain(C.VIR_FROM_TEST)

	// Error from remote driver
	FROM_REMOTE = ErrorDomain(C.VIR_FROM_REMOTE)

	// Error from OpenVZ driver
	FROM_OPENVZ = ErrorDomain(C.VIR_FROM_OPENVZ)

	// Error at Xen XM layer
	FROM_XENXM = ErrorDomain(C.VIR_FROM_XENXM)

	// Error in the Linux Stats code
	FROM_STATS_LINUX = ErrorDomain(C.VIR_FROM_STATS_LINUX)

	// Error from Linux Container driver
	FROM_LXC = ErrorDomain(C.VIR_FROM_LXC)

	// Error from storage driver
	FROM_STORAGE = ErrorDomain(C.VIR_FROM_STORAGE)

	// Error from network config
	FROM_NETWORK = ErrorDomain(C.VIR_FROM_NETWORK)

	// Error from domain config
	FROM_DOMAIN = ErrorDomain(C.VIR_FROM_DOMAIN)

	// Error at the UML driver
	FROM_UML = ErrorDomain(C.VIR_FROM_UML)

	// Error from node device monitor
	FROM_NODEDEV = ErrorDomain(C.VIR_FROM_NODEDEV)

	// Error from xen inotify layer
	FROM_XEN_INOTIFY = ErrorDomain(C.VIR_FROM_XEN_INOTIFY)

	// Error from security framework
	FROM_SECURITY = ErrorDomain(C.VIR_FROM_SECURITY)

	// Error from VirtualBox driver
	FROM_VBOX = ErrorDomain(C.VIR_FROM_VBOX)

	// Error when operating on an interface
	FROM_INTERFACE = ErrorDomain(C.VIR_FROM_INTERFACE)

	// The OpenNebula driver no longer exists. Retained for ABI/API compat only
	FROM_ONE = ErrorDomain(C.VIR_FROM_ONE)

	// Error from ESX driver
	FROM_ESX = ErrorDomain(C.VIR_FROM_ESX)

	// Error from IBM power hypervisor
	FROM_PHYP = ErrorDomain(C.VIR_FROM_PHYP)

	// Error from secret storage
	FROM_SECRET = ErrorDomain(C.VIR_FROM_SECRET)

	// Error from CPU driver
	FROM_CPU = ErrorDomain(C.VIR_FROM_CPU)

	// Error from XenAPI
	FROM_XENAPI = ErrorDomain(C.VIR_FROM_XENAPI)

	// Error from network filter driver
	FROM_NWFILTER = ErrorDomain(C.VIR_FROM_NWFILTER)

	// Error from Synchronous hooks
	FROM_HOOK = ErrorDomain(C.VIR_FROM_HOOK)

	// Error from domain snapshot
	FROM_DOMAIN_SNAPSHOT = ErrorDomain(C.VIR_FROM_DOMAIN_SNAPSHOT)

	// Error from auditing subsystem
	FROM_AUDIT = ErrorDomain(C.VIR_FROM_AUDIT)

	// Error from sysinfo/SMBIOS
	FROM_SYSINFO = ErrorDomain(C.VIR_FROM_SYSINFO)

	// Error from I/O streams
	FROM_STREAMS = ErrorDomain(C.VIR_FROM_STREAMS)

	// Error from VMware driver
	FROM_VMWARE = ErrorDomain(C.VIR_FROM_VMWARE)

	// Error from event loop impl
	FROM_EVENT = ErrorDomain(C.VIR_FROM_EVENT)

	// Error from libxenlight driver
	FROM_LIBXL = ErrorDomain(C.VIR_FROM_LIBXL)

	// Error from lock manager
	FROM_LOCKING = ErrorDomain(C.VIR_FROM_LOCKING)

	// Error from Hyper-V driver
	FROM_HYPERV = ErrorDomain(C.VIR_FROM_HYPERV)

	// Error from capabilities
	FROM_CAPABILITIES = ErrorDomain(C.VIR_FROM_CAPABILITIES)

	// Error from URI handling
	FROM_URI = ErrorDomain(C.VIR_FROM_URI)

	// Error from auth handling
	FROM_AUTH = ErrorDomain(C.VIR_FROM_AUTH)

	// Error from DBus
	FROM_DBUS = ErrorDomain(C.VIR_FROM_DBUS)

	// Error from Parallels
	FROM_PARALLELS = ErrorDomain(C.VIR_FROM_PARALLELS)

	// Error from Device
	FROM_DEVICE = ErrorDomain(C.VIR_FROM_DEVICE)

	// Error from libssh2 connection transport
	FROM_SSH = ErrorDomain(C.VIR_FROM_SSH)

	// Error from lockspace
	FROM_LOCKSPACE = ErrorDomain(C.VIR_FROM_LOCKSPACE)

	// Error from initctl device communication
	FROM_INITCTL = ErrorDomain(C.VIR_FROM_INITCTL)

	// Error from identity code
	FROM_IDENTITY = ErrorDomain(C.VIR_FROM_IDENTITY)

	// Error from cgroups
	FROM_CGROUP = ErrorDomain(C.VIR_FROM_CGROUP)

	// Error from access control manager
	FROM_ACCESS = ErrorDomain(C.VIR_FROM_ACCESS)

	// Error from systemd code
	FROM_SYSTEMD = ErrorDomain(C.VIR_FROM_SYSTEMD)

	// Error from bhyve driver
	FROM_BHYVE = ErrorDomain(C.VIR_FROM_BHYVE)

	// Error from crypto code
	FROM_CRYPTO = ErrorDomain(C.VIR_FROM_CRYPTO)

	// Error from firewall
	FROM_FIREWALL = ErrorDomain(C.VIR_FROM_FIREWALL)

	// Erorr from polkit code
	FROM_POLKIT = ErrorDomain(C.VIR_FROM_POLKIT)

	// Error from thread utils
	FROM_THREAD = ErrorDomain(C.VIR_FROM_THREAD)

	// Error from admin backend
	FROM_ADMIN = ErrorDomain(C.VIR_FROM_ADMIN)

	// Error from log manager
	FROM_LOGGING = ErrorDomain(C.VIR_FROM_LOGGING)

	// Error from Xen xl config code
	FROM_XENXL = ErrorDomain(C.VIR_FROM_XENXL)

	// Error from perf
	FROM_PERF = ErrorDomain(C.VIR_FROM_PERF)

	// Error from libssh
	FROM_LIBSSH = ErrorDomain(C.VIR_FROM_LIBSSH)
)
View Source
const (
	EVENT_HANDLE_READABLE = EventHandleType(C.VIR_EVENT_HANDLE_READABLE)
	EVENT_HANDLE_WRITABLE = EventHandleType(C.VIR_EVENT_HANDLE_WRITABLE)
	EVENT_HANDLE_ERROR    = EventHandleType(C.VIR_EVENT_HANDLE_ERROR)
	EVENT_HANDLE_HANGUP   = EventHandleType(C.VIR_EVENT_HANDLE_HANGUP)
)
View Source
const (
	IP_ADDR_TYPE_IPV4 = IPAddrType(C.VIR_IP_ADDR_TYPE_IPV4)
	IP_ADDR_TYPE_IPV6 = IPAddrType(C.VIR_IP_ADDR_TYPE_IPV6)
)
View Source
const (
	NETWORK_UPDATE_COMMAND_NONE      = NetworkUpdateCommand(C.VIR_NETWORK_UPDATE_COMMAND_NONE)
	NETWORK_UPDATE_COMMAND_MODIFY    = NetworkUpdateCommand(C.VIR_NETWORK_UPDATE_COMMAND_MODIFY)
	NETWORK_UPDATE_COMMAND_DELETE    = NetworkUpdateCommand(C.VIR_NETWORK_UPDATE_COMMAND_DELETE)
	NETWORK_UPDATE_COMMAND_ADD_LAST  = NetworkUpdateCommand(C.VIR_NETWORK_UPDATE_COMMAND_ADD_LAST)
	NETWORK_UPDATE_COMMAND_ADD_FIRST = NetworkUpdateCommand(C.VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST)
)
View Source
const (
	NETWORK_UPDATE_AFFECT_CURRENT = NetworkUpdateFlags(C.VIR_NETWORK_UPDATE_AFFECT_CURRENT)
	NETWORK_UPDATE_AFFECT_LIVE    = NetworkUpdateFlags(C.VIR_NETWORK_UPDATE_AFFECT_LIVE)
	NETWORK_UPDATE_AFFECT_CONFIG  = NetworkUpdateFlags(C.VIR_NETWORK_UPDATE_AFFECT_CONFIG)
)
View Source
const (
	NODE_DEVICE_EVENT_ID_LIFECYCLE = NodeDeviceEventID(C.VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE)
	NODE_DEVICE_EVENT_ID_UPDATE    = NodeDeviceEventID(C.VIR_NODE_DEVICE_EVENT_ID_UPDATE)
)
View Source
const (
	SECRET_USAGE_TYPE_NONE   = SecretUsageType(C.VIR_SECRET_USAGE_TYPE_NONE)
	SECRET_USAGE_TYPE_VOLUME = SecretUsageType(C.VIR_SECRET_USAGE_TYPE_VOLUME)
	SECRET_USAGE_TYPE_CEPH   = SecretUsageType(C.VIR_SECRET_USAGE_TYPE_CEPH)
	SECRET_USAGE_TYPE_ISCSI  = SecretUsageType(C.VIR_SECRET_USAGE_TYPE_ISCSI)
	SECRET_USAGE_TYPE_TLS    = SecretUsageType(C.VIR_SECRET_USAGE_TYPE_TLS)
)
View Source
const (
	SECRET_EVENT_ID_LIFECYCLE     = SecretEventID(C.VIR_SECRET_EVENT_ID_LIFECYCLE)
	SECRET_EVENT_ID_VALUE_CHANGED = SecretEventID(C.VIR_SECRET_EVENT_ID_VALUE_CHANGED)
)
View Source
const (
	STORAGE_POOL_INACTIVE     = StoragePoolState(C.VIR_STORAGE_POOL_INACTIVE)     // Not running
	STORAGE_POOL_BUILDING     = StoragePoolState(C.VIR_STORAGE_POOL_BUILDING)     // Initializing pool,not available
	STORAGE_POOL_RUNNING      = StoragePoolState(C.VIR_STORAGE_POOL_RUNNING)      // Running normally
	STORAGE_POOL_DEGRADED     = StoragePoolState(C.VIR_STORAGE_POOL_DEGRADED)     // Running degraded
	STORAGE_POOL_INACCESSIBLE = StoragePoolState(C.VIR_STORAGE_POOL_INACCESSIBLE) // Running,but not accessible
)
View Source
const (
	STORAGE_POOL_BUILD_NEW          = StoragePoolBuildFlags(C.VIR_STORAGE_POOL_BUILD_NEW)          // Regular build from scratch
	STORAGE_POOL_BUILD_REPAIR       = StoragePoolBuildFlags(C.VIR_STORAGE_POOL_BUILD_REPAIR)       // Repair / reinitialize
	STORAGE_POOL_BUILD_RESIZE       = StoragePoolBuildFlags(C.VIR_STORAGE_POOL_BUILD_RESIZE)       // Extend existing pool
	STORAGE_POOL_BUILD_NO_OVERWRITE = StoragePoolBuildFlags(C.VIR_STORAGE_POOL_BUILD_NO_OVERWRITE) // Do not overwrite existing pool
	STORAGE_POOL_BUILD_OVERWRITE    = StoragePoolBuildFlags(C.VIR_STORAGE_POOL_BUILD_OVERWRITE)    // Overwrite data
)
View Source
const (
	STORAGE_POOL_CREATE_NORMAL                  = StoragePoolCreateFlags(C.VIR_STORAGE_POOL_CREATE_NORMAL)
	STORAGE_POOL_CREATE_WITH_BUILD              = StoragePoolCreateFlags(C.VIR_STORAGE_POOL_CREATE_WITH_BUILD)
	STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE    = StoragePoolCreateFlags(C.VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE)
	STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE = StoragePoolCreateFlags(C.VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE)
)
View Source
const (
	STORAGE_POOL_DELETE_NORMAL = StoragePoolDeleteFlags(C.VIR_STORAGE_POOL_DELETE_NORMAL)
	STORAGE_POOL_DELETE_ZEROED = StoragePoolDeleteFlags(C.VIR_STORAGE_POOL_DELETE_ZEROED)
)
View Source
const (
	STORAGE_POOL_EVENT_ID_LIFECYCLE = StoragePoolEventID(C.VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE)
	STORAGE_POOL_EVENT_ID_REFRESH   = StoragePoolEventID(C.VIR_STORAGE_POOL_EVENT_ID_REFRESH)
)
View Source
const (
	STORAGE_VOL_CREATE_PREALLOC_METADATA = StorageVolCreateFlags(C.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA)
	STORAGE_VOL_CREATE_REFLINK           = StorageVolCreateFlags(C.VIR_STORAGE_VOL_CREATE_REFLINK)
)
View Source
const (
	STORAGE_VOL_DELETE_NORMAL         = StorageVolDeleteFlags(C.VIR_STORAGE_VOL_DELETE_NORMAL)         // Delete metadata only (fast)
	STORAGE_VOL_DELETE_ZEROED         = StorageVolDeleteFlags(C.VIR_STORAGE_VOL_DELETE_ZEROED)         // Clear all data to zeros (slow)
	STORAGE_VOL_DELETE_WITH_SNAPSHOTS = StorageVolDeleteFlags(C.VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS) // Force removal of volume, even if in use
)
View Source
const (
	STORAGE_VOL_RESIZE_ALLOCATE = StorageVolResizeFlags(C.VIR_STORAGE_VOL_RESIZE_ALLOCATE) // force allocation of new size
	STORAGE_VOL_RESIZE_DELTA    = StorageVolResizeFlags(C.VIR_STORAGE_VOL_RESIZE_DELTA)    // size is relative to current
	STORAGE_VOL_RESIZE_SHRINK   = StorageVolResizeFlags(C.VIR_STORAGE_VOL_RESIZE_SHRINK)   // allow decrease in capacity
)
View Source
const (
	STORAGE_VOL_FILE    = StorageVolType(C.VIR_STORAGE_VOL_FILE)    // Regular file based volumes
	STORAGE_VOL_BLOCK   = StorageVolType(C.VIR_STORAGE_VOL_BLOCK)   // Block based volumes
	STORAGE_VOL_DIR     = StorageVolType(C.VIR_STORAGE_VOL_DIR)     // Directory-passthrough based volume
	STORAGE_VOL_NETWORK = StorageVolType(C.VIR_STORAGE_VOL_NETWORK) //Network volumes like RBD (RADOS Block Device)
	STORAGE_VOL_NETDIR  = StorageVolType(C.VIR_STORAGE_VOL_NETDIR)  // Network accessible directory that can contain other network volumes
	STORAGE_VOL_PLOOP   = StorageVolType(C.VIR_STORAGE_VOL_PLOOP)   // Ploop directory based volumes
)
View Source
const (
	STORAGE_VOL_WIPE_ALG_ZERO       = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_ZERO)       // 1-pass, all zeroes
	STORAGE_VOL_WIPE_ALG_NNSA       = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_NNSA)       // 4-pass NNSA Policy Letter NAP-14.1-C (XVI-8)
	STORAGE_VOL_WIPE_ALG_DOD        = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_DOD)        // 4-pass DoD 5220.22-M section 8-306 procedure
	STORAGE_VOL_WIPE_ALG_BSI        = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_BSI)        // 9-pass method recommended by the German Center of Security in Information Technologies
	STORAGE_VOL_WIPE_ALG_GUTMANN    = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_GUTMANN)    // The canonical 35-pass sequence
	STORAGE_VOL_WIPE_ALG_SCHNEIER   = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER)   // 7-pass method described by Bruce Schneier in "Applied Cryptography" (1996)
	STORAGE_VOL_WIPE_ALG_PFITZNER7  = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7)  // 7-pass random
	STORAGE_VOL_WIPE_ALG_PFITZNER33 = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33) // 33-pass random
	STORAGE_VOL_WIPE_ALG_RANDOM     = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_RANDOM)     // 1-pass random
	STORAGE_VOL_WIPE_ALG_TRIM       = StorageVolWipeAlgorithm(C.VIR_STORAGE_VOL_WIPE_ALG_TRIM)       // Trim the underlying storage
)
View Source
const (
	STORAGE_VOL_USE_ALLOCATION = StorageVolInfoFlags(C.VIR_STORAGE_VOL_USE_ALLOCATION)
	STORAGE_VOL_GET_PHYSICAL   = StorageVolInfoFlags(C.VIR_STORAGE_VOL_GET_PHYSICAL)
)
View Source
const (
	STREAM_EVENT_READABLE = StreamEventType(C.VIR_STREAM_EVENT_READABLE)
	STREAM_EVENT_WRITABLE = StreamEventType(C.VIR_STREAM_EVENT_WRITABLE)
	STREAM_EVENT_ERROR    = StreamEventType(C.VIR_STREAM_EVENT_ERROR)
	STREAM_EVENT_HANGUP   = StreamEventType(C.VIR_STREAM_EVENT_HANGUP)
)
View Source
const (
	CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE = ConnectCompareCPUFlags(C.VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE)
)
View Source
const (
	DOMAIN_BLOCKED_UNKNOWN = DomainBlockedReason(C.VIR_DOMAIN_BLOCKED_UNKNOWN)
)
View Source
const (
	DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES = DomainBlockJobInfoFlags(C.VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES)
)
View Source
const (
	DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES = DomainBlockJobSetSpeedFlags(C.VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES)
)
View Source
const (
	DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES = DomainBlockPullFlags(C.VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES)
)
View Source
const (
	DOMAIN_BLOCK_RESIZE_BYTES = DomainBlockResizeFlags(C.VIR_DOMAIN_BLOCK_RESIZE_BYTES)
)
View Source
const (
	DOMAIN_CHANNEL_FORCE = DomainChannelFlags(C.VIR_DOMAIN_CHANNEL_FORCE)
)
View Source
const (
	DOMAIN_DEFINE_VALIDATE = DomainDefineFlags(C.VIR_DOMAIN_DEFINE_VALIDATE)
)
View Source
const (
	DOMAIN_JOB_STATS_COMPLETED = DomainGetJobStatsFlags(C.VIR_DOMAIN_JOB_STATS_COMPLETED)
)
View Source
const DOMAIN_MEMORY_PARAM_UNLIMITED = C.VIR_DOMAIN_MEMORY_PARAM_UNLIMITED
View Source
const (
	DOMAIN_NOSTATE_UNKNOWN = DomainNostateReason(C.VIR_DOMAIN_NOSTATE_UNKNOWN)
)
View Source
const (
	DOMAIN_OPEN_GRAPHICS_SKIPAUTH = DomainOpenGraphicsFlags(C.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH)
)
View Source
const (
	DOMAIN_PMSUSPENDED_DISK_UNKNOWN = DomainPMSuspendedDiskReason(C.VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWN)
)
View Source
const (
	DOMAIN_PMSUSPENDED_UNKNOWN = DomainPMSuspendedReason(C.VIR_DOMAIN_PMSUSPENDED_UNKNOWN)
)
View Source
const (
	DOMAIN_SEND_KEY_MAX_KEYS = uint32(C.VIR_DOMAIN_SEND_KEY_MAX_KEYS)
)
View Source
const (
	DOMAIN_TIME_SYNC = DomainSetTimeFlags(C.VIR_DOMAIN_TIME_SYNC)
)
View Source
const (
	INTERFACE_XML_INACTIVE = InterfaceXMLFlags(C.VIR_INTERFACE_XML_INACTIVE)
)
View Source
const (
	NETWORK_EVENT_ID_LIFECYCLE = NetworkEventID(C.VIR_NETWORK_EVENT_ID_LIFECYCLE)
)
View Source
const (
	NETWORK_XML_INACTIVE = NetworkXMLFlags(C.VIR_NETWORK_XML_INACTIVE)
)
View Source
const (
	NODE_CPU_STATS_ALL_CPUS = NodeGetCPUStatsAllCPUs(C.VIR_NODE_CPU_STATS_ALL_CPUS)
)
View Source
const (
	NODE_MEMORY_STATS_ALL_CELLS = int(C.VIR_NODE_MEMORY_STATS_ALL_CELLS)
)
View Source
const (
	STORAGE_XML_INACTIVE = StorageXMLFlags(C.VIR_STORAGE_XML_INACTIVE)
)
View Source
const (
	STREAM_NONBLOCK = StreamFlags(C.VIR_STREAM_NONBLOCK)
)
View Source
const (
	VERSION_NUMBER = uint32(C.LIBVIR_VERSION_NUMBER)
)

Variables

This section is empty.

Functions

func EventAddHandle

func EventAddHandle(fd int, events EventHandleType, callback EventHandleCallback) (int, error)

func EventAddTimeout

func EventAddTimeout(freq int, callback EventTimeoutCallback) (int, error)

func EventRegisterDefaultImpl

func EventRegisterDefaultImpl() error

func EventRegisterImpl

func EventRegisterImpl(impl EventLoop)

func EventRemoveHandle

func EventRemoveHandle(watch int)

func EventRemoveTimeout

func EventRemoveTimeout(timer int)

func EventRunDefaultImpl

func EventRunDefaultImpl() error

func EventUpdateHandle

func EventUpdateHandle(watch int, events EventHandleType)

func EventUpdateTimeout

func EventUpdateTimeout(timer int, freq int)

func GetVersion

func GetVersion() (uint32, error)

Types

type CPUCompareResult

type CPUCompareResult int

type CloseCallback

type CloseCallback func(conn *Connect, reason ConnectCloseReason)

type Connect

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

func NewConnect

func NewConnect(uri string) (*Connect, error)

func NewConnectReadOnly

func NewConnectReadOnly(uri string) (*Connect, error)

func NewConnectWithAuth

func NewConnectWithAuth(uri string, auth *ConnectAuth, flags ConnectFlags) (*Connect, error)

func (*Connect) AllocPages

func (c *Connect) AllocPages(pageSizes map[int]int64, startCell int, cellCount uint, flags NodeAllocPagesFlags) (int, error)

func (*Connect) BaselineCPU

func (c *Connect) BaselineCPU(xmlCPUs []string, flags ConnectBaselineCPUFlags) (string, error)

func (*Connect) Close

func (c *Connect) Close() (int, error)

func (*Connect) CompareCPU

func (c *Connect) CompareCPU(xmlDesc string, flags ConnectCompareCPUFlags) (CPUCompareResult, error)

func (*Connect) DeviceCreateXML

func (c *Connect) DeviceCreateXML(xmlConfig string, flags uint32) (*NodeDevice, error)

func (*Connect) DomainCreateXML

func (c *Connect) DomainCreateXML(xmlConfig string, flags DomainCreateFlags) (*Domain, error)

func (*Connect) DomainCreateXMLWithFiles

func (c *Connect) DomainCreateXMLWithFiles(xmlConfig string, files []os.File, flags DomainCreateFlags) (*Domain, error)

func (*Connect) DomainDefineXML

func (c *Connect) DomainDefineXML(xmlConfig string) (*Domain, error)

func (*Connect) DomainDefineXMLFlags

func (c *Connect) DomainDefineXMLFlags(xmlConfig string, flags DomainDefineFlags) (*Domain, error)

func (*Connect) DomainEventAgentLifecycleRegister

func (c *Connect) DomainEventAgentLifecycleRegister(dom *Domain, callback DomainEventAgentLifecycleCallback) (int, error)

func (*Connect) DomainEventBalloonChangeRegister

func (c *Connect) DomainEventBalloonChangeRegister(dom *Domain, callback DomainEventBalloonChangeCallback) (int, error)

func (*Connect) DomainEventBlockJob2Register

func (c *Connect) DomainEventBlockJob2Register(dom *Domain, callback DomainEventBlockJobCallback) (int, error)

func (*Connect) DomainEventBlockJobRegister

func (c *Connect) DomainEventBlockJobRegister(dom *Domain, callback DomainEventBlockJobCallback) (int, error)

func (*Connect) DomainEventBlockThresholdRegister

func (c *Connect) DomainEventBlockThresholdRegister(dom *Domain, callback DomainEventBlockThresholdCallback) (int, error)

func (*Connect) DomainEventControlErrorRegister

func (c *Connect) DomainEventControlErrorRegister(dom *Domain, callback DomainEventGenericCallback) (int, error)

func (*Connect) DomainEventDeregister

func (c *Connect) DomainEventDeregister(callbackId int) error

func (*Connect) DomainEventDeviceAddedRegister

func (c *Connect) DomainEventDeviceAddedRegister(dom *Domain, callback DomainEventDeviceAddedCallback) (int, error)

func (*Connect) DomainEventDeviceRemovalFailedRegister

func (c *Connect) DomainEventDeviceRemovalFailedRegister(dom *Domain, callback DomainEventDeviceRemovalFailedCallback) (int, error)

func (*Connect) DomainEventDeviceRemovedRegister

func (c *Connect) DomainEventDeviceRemovedRegister(dom *Domain, callback DomainEventDeviceRemovedCallback) (int, error)

func (*Connect) DomainEventDiskChangeRegister

func (c *Connect) DomainEventDiskChangeRegister(dom *Domain, callback DomainEventDiskChangeCallback) (int, error)

func (*Connect) DomainEventGraphicsRegister

func (c *Connect) DomainEventGraphicsRegister(dom *Domain, callback DomainEventGraphicsCallback) (int, error)

func (*Connect) DomainEventIOErrorReasonRegister

func (c *Connect) DomainEventIOErrorReasonRegister(dom *Domain, callback DomainEventIOErrorReasonCallback) (int, error)

func (*Connect) DomainEventIOErrorRegister

func (c *Connect) DomainEventIOErrorRegister(dom *Domain, callback DomainEventIOErrorCallback) (int, error)

func (*Connect) DomainEventJobCompletedRegister

func (c *Connect) DomainEventJobCompletedRegister(dom *Domain, callback DomainEventJobCompletedCallback) (int, error)

func (*Connect) DomainEventLifecycleRegister

func (c *Connect) DomainEventLifecycleRegister(dom *Domain, callback DomainEventLifecycleCallback) (int, error)

func (*Connect) DomainEventMetadataChangeRegister

func (c *Connect) DomainEventMetadataChangeRegister(dom *Domain, callback DomainEventMetadataChangeCallback) (int, error)

func (*Connect) DomainEventMigrationIterationRegister

func (c *Connect) DomainEventMigrationIterationRegister(dom *Domain, callback DomainEventMigrationIterationCallback) (int, error)

func (*Connect) DomainEventPMSuspendDiskRegister

func (c *Connect) DomainEventPMSuspendDiskRegister(dom *Domain, callback DomainEventPMSuspendDiskCallback) (int, error)

func (*Connect) DomainEventPMSuspendRegister

func (c *Connect) DomainEventPMSuspendRegister(dom *Domain, callback DomainEventPMSuspendCallback) (int, error)

func (*Connect) DomainEventPMWakeupRegister

func (c *Connect) DomainEventPMWakeupRegister(dom *Domain, callback DomainEventPMWakeupCallback) (int, error)

func (*Connect) DomainEventRTCChangeRegister

func (c *Connect) DomainEventRTCChangeRegister(dom *Domain, callback DomainEventRTCChangeCallback) (int, error)

func (*Connect) DomainEventRebootRegister

func (c *Connect) DomainEventRebootRegister(dom *Domain, callback DomainEventGenericCallback) (int, error)

func (*Connect) DomainEventTrayChangeRegister

func (c *Connect) DomainEventTrayChangeRegister(dom *Domain, callback DomainEventTrayChangeCallback) (int, error)

func (*Connect) DomainEventTunableRegister

func (c *Connect) DomainEventTunableRegister(dom *Domain, callback DomainEventTunableCallback) (int, error)

func (*Connect) DomainEventWatchdogRegister

func (c *Connect) DomainEventWatchdogRegister(dom *Domain, callback DomainEventWatchdogCallback) (int, error)

func (*Connect) DomainRestore

func (c *Connect) DomainRestore(srcFile string) error

func (*Connect) DomainRestoreFlags

func (c *Connect) DomainRestoreFlags(srcFile, xmlConf string, flags DomainSaveRestoreFlags) error

func (*Connect) DomainSaveImageDefineXML

func (c *Connect) DomainSaveImageDefineXML(file string, xml string, flags DomainSaveRestoreFlags) error

func (*Connect) DomainSaveImageGetXMLDesc

func (c *Connect) DomainSaveImageGetXMLDesc(file string, flags DomainXMLFlags) (string, error)

func (*Connect) DomainXMLFromNative

func (c *Connect) DomainXMLFromNative(nativeFormat string, nativeConfig string, flags uint32) (string, error)

func (*Connect) DomainXMLToNative

func (c *Connect) DomainXMLToNative(nativeFormat string, domainXml string, flags uint32) (string, error)

func (*Connect) FindStoragePoolSources

func (c *Connect) FindStoragePoolSources(pooltype string, srcSpec string, flags uint32) (string, error)

func (*Connect) GetAllDomainStats

func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes, flags ConnectGetAllDomainStatsFlags) ([]DomainStats, error)

func (*Connect) GetCPUMap

func (c *Connect) GetCPUMap(flags uint32) (map[int]bool, uint, error)

func (*Connect) GetCPUModelNames

func (c *Connect) GetCPUModelNames(arch string, flags uint32) ([]string, error)

func (*Connect) GetCPUStats

func (c *Connect) GetCPUStats(cpuNum int, flags uint32) (*NodeCPUStats, error)

func (*Connect) GetCapabilities

func (c *Connect) GetCapabilities() (string, error)

func (*Connect) GetCellsFreeMemory

func (c *Connect) GetCellsFreeMemory(startCell int, maxCells int) ([]uint64, error)

func (*Connect) GetDomainCapabilities

func (c *Connect) GetDomainCapabilities(emulatorbin string, arch string, machine string, virttype string, flags uint32) (string, error)

func (*Connect) GetFreeMemory

func (c *Connect) GetFreeMemory() (uint64, error)

func (*Connect) GetFreePages

func (c *Connect) GetFreePages(pageSizes []uint64, startCell int, maxCells uint, flags uint32) ([]uint64, error)

func (*Connect) GetHostname

func (c *Connect) GetHostname() (string, error)

func (*Connect) GetLibVersion

func (c *Connect) GetLibVersion() (uint32, error)

func (*Connect) GetMaxVcpus

func (c *Connect) GetMaxVcpus(typeAttr string) (int, error)

func (*Connect) GetMemoryParameters

func (c *Connect) GetMemoryParameters(flags uint32) (*NodeMemoryParameters, error)

func (*Connect) GetMemoryStats

func (c *Connect) GetMemoryStats(cellNum int, flags uint32) (*NodeMemoryStats, error)

func (*Connect) GetNodeInfo

func (c *Connect) GetNodeInfo() (*NodeInfo, error)

func (*Connect) GetSecurityModel

func (c *Connect) GetSecurityModel() (*NodeSecurityModel, error)

func (*Connect) GetSysinfo

func (c *Connect) GetSysinfo(flags uint32) (string, error)

func (*Connect) GetType

func (c *Connect) GetType() (string, error)

func (*Connect) GetURI

func (c *Connect) GetURI() (string, error)

func (*Connect) GetVersion

func (c *Connect) GetVersion() (uint32, error)

func (*Connect) InterfaceChangeBegin

func (c *Connect) InterfaceChangeBegin(flags uint32) error

func (*Connect) InterfaceChangeCommit

func (c *Connect) InterfaceChangeCommit(flags uint32) error

func (*Connect) InterfaceChangeRollback

func (c *Connect) InterfaceChangeRollback(flags uint32) error

func (*Connect) InterfaceDefineXML

func (c *Connect) InterfaceDefineXML(xmlConfig string, flags uint32) (*Interface, error)

func (*Connect) IsAlive

func (c *Connect) IsAlive() (bool, error)

func (*Connect) IsEncrypted

func (c *Connect) IsEncrypted() (bool, error)

func (*Connect) IsSecure

func (c *Connect) IsSecure() (bool, error)

func (*Connect) ListAllDomains

func (c *Connect) ListAllDomains(flags ConnectListAllDomainsFlags) ([]Domain, error)

func (*Connect) ListAllInterfaces

func (c *Connect) ListAllInterfaces(flags ConnectListAllInterfacesFlags) ([]Interface, error)

func (*Connect) ListAllNWFilters

func (c *Connect) ListAllNWFilters(flags uint32) ([]NWFilter, error)

func (*Connect) ListAllNetworks

func (c *Connect) ListAllNetworks(flags ConnectListAllNetworksFlags) ([]Network, error)

func (*Connect) ListAllNodeDevices

func (c *Connect) ListAllNodeDevices(flags ConnectListAllNodeDeviceFlags) ([]NodeDevice, error)

func (*Connect) ListAllSecrets

func (c *Connect) ListAllSecrets(flags ConnectListAllSecretsFlags) ([]Secret, error)

func (*Connect) ListAllStoragePools

func (c *Connect) ListAllStoragePools(flags ConnectListAllStoragePoolsFlags) ([]StoragePool, error)

func (*Connect) ListDefinedDomains

func (c *Connect) ListDefinedDomains() ([]string, error)

func (*Connect) ListDefinedInterfaces

func (c *Connect) ListDefinedInterfaces() ([]string, error)

func (*Connect) ListDefinedNetworks

func (c *Connect) ListDefinedNetworks() ([]string, error)

func (*Connect) ListDefinedStoragePools

func (c *Connect) ListDefinedStoragePools() ([]string, error)

func (*Connect) ListDevices

func (c *Connect) ListDevices(cap string, flags uint32) ([]string, error)

func (*Connect) ListDomains

func (c *Connect) ListDomains() ([]uint32, error)

func (*Connect) ListInterfaces

func (c *Connect) ListInterfaces() ([]string, error)

func (*Connect) ListNWFilters

func (c *Connect) ListNWFilters() ([]string, error)

func (*Connect) ListNetworks

func (c *Connect) ListNetworks() ([]string, error)

func (*Connect) ListSecrets

func (c *Connect) ListSecrets() ([]string, error)

func (*Connect) ListStoragePools

func (c *Connect) ListStoragePools() ([]string, error)

func (*Connect) LookupDeviceByName

func (c *Connect) LookupDeviceByName(id string) (*NodeDevice, error)

func (*Connect) LookupDeviceSCSIHostByWWN

func (c *Connect) LookupDeviceSCSIHostByWWN(wwnn, wwpn string, flags uint32) (*NodeDevice, error)

func (*Connect) LookupDomainById

func (c *Connect) LookupDomainById(id uint32) (*Domain, error)

func (*Connect) LookupDomainByName

func (c *Connect) LookupDomainByName(id string) (*Domain, error)

func (*Connect) LookupDomainByUUID

func (c *Connect) LookupDomainByUUID(uuid []byte) (*Domain, error)

func (*Connect) LookupDomainByUUIDString

func (c *Connect) LookupDomainByUUIDString(uuid string) (*Domain, error)

func (*Connect) LookupInterfaceByMACString

func (c *Connect) LookupInterfaceByMACString(mac string) (*Interface, error)

func (*Connect) LookupInterfaceByName

func (c *Connect) LookupInterfaceByName(name string) (*Interface, error)

func (*Connect) LookupNWFilterByName

func (c *Connect) LookupNWFilterByName(name string) (*NWFilter, error)

func (*Connect) LookupNWFilterByUUID

func (c *Connect) LookupNWFilterByUUID(uuid []byte) (*NWFilter, error)

func (*Connect) LookupNWFilterByUUIDString

func (c *Connect) LookupNWFilterByUUIDString(uuid string) (*NWFilter, error)

func (*Connect) LookupNetworkByName

func (c *Connect) LookupNetworkByName(name string) (*Network, error)

func (*Connect) LookupNetworkByUUID

func (c *Connect) LookupNetworkByUUID(uuid []byte) (*Network, error)

func (*Connect) LookupNetworkByUUIDString

func (c *Connect) LookupNetworkByUUIDString(uuid string) (*Network, error)

func (*Connect) LookupSecretByUUID

func (c *Connect) LookupSecretByUUID(uuid []byte) (*Secret, error)

func (*Connect) LookupSecretByUUIDString

func (c *Connect) LookupSecretByUUIDString(uuid string) (*Secret, error)

func (*Connect) LookupSecretByUsage

func (c *Connect) LookupSecretByUsage(usageType SecretUsageType, usageID string) (*Secret, error)

func (*Connect) LookupStoragePoolByName

func (c *Connect) LookupStoragePoolByName(name string) (*StoragePool, error)

func (*Connect) LookupStoragePoolByUUID

func (c *Connect) LookupStoragePoolByUUID(uuid []byte) (*StoragePool, error)

func (*Connect) LookupStoragePoolByUUIDString

func (c *Connect) LookupStoragePoolByUUIDString(uuid string) (*StoragePool, error)

func (*Connect) LookupStorageVolByKey

func (c *Connect) LookupStorageVolByKey(key string) (*StorageVol, error)

func (*Connect) LookupStorageVolByPath

func (c *Connect) LookupStorageVolByPath(path string) (*StorageVol, error)

func (*Connect) NWFilterDefineXML

func (c *Connect) NWFilterDefineXML(xmlConfig string) (*NWFilter, error)

func (*Connect) NetworkCreateXML

func (c *Connect) NetworkCreateXML(xmlConfig string) (*Network, error)

func (*Connect) NetworkDefineXML

func (c *Connect) NetworkDefineXML(xmlConfig string) (*Network, error)

func (*Connect) NetworkEventDeregister

func (c *Connect) NetworkEventDeregister(callbackId int) error

func (*Connect) NetworkEventLifecycleRegister

func (c *Connect) NetworkEventLifecycleRegister(net *Network, callback NetworkEventLifecycleCallback) (int, error)

func (*Connect) NewStream

func (c *Connect) NewStream(flags StreamFlags) (*Stream, error)

func (*Connect) NodeDeviceEventDeregister

func (c *Connect) NodeDeviceEventDeregister(callbackId int) error

func (*Connect) NodeDeviceEventLifecycleRegister

func (c *Connect) NodeDeviceEventLifecycleRegister(device *NodeDevice, callback NodeDeviceEventLifecycleCallback) (int, error)

func (*Connect) NodeDeviceEventUpdateRegister

func (c *Connect) NodeDeviceEventUpdateRegister(device *NodeDevice, callback NodeDeviceEventGenericCallback) (int, error)

func (*Connect) NumOfDefinedDomains

func (c *Connect) NumOfDefinedDomains() (int, error)

func (*Connect) NumOfDefinedInterfaces

func (c *Connect) NumOfDefinedInterfaces() (int, error)

func (*Connect) NumOfDefinedNetworks

func (c *Connect) NumOfDefinedNetworks() (int, error)

func (*Connect) NumOfDefinedStoragePools

func (c *Connect) NumOfDefinedStoragePools() (int, error)

func (*Connect) NumOfDevices

func (c *Connect) NumOfDevices(cap string, flags uint32) (int, error)

func (*Connect) NumOfDomains

func (c *Connect) NumOfDomains() (int, error)

func (*Connect) NumOfInterfaces

func (c *Connect) NumOfInterfaces() (int, error)

func (*Connect) NumOfNWFilters

func (c *Connect) NumOfNWFilters() (int, error)

func (*Connect) NumOfNetworks

func (c *Connect) NumOfNetworks() (int, error)

func (*Connect) NumOfSecrets

func (c *Connect) NumOfSecrets() (int, error)

func (*Connect) NumOfStoragePools

func (c *Connect) NumOfStoragePools() (int, error)

func (*Connect) Ref

func (c *Connect) Ref() error

func (*Connect) RegisterCloseCallback

func (c *Connect) RegisterCloseCallback(callback CloseCallback) error

Register a close callback for the given destination. Only one callback per connection is allowed. Setting a callback will remove the previous one.

func (*Connect) SecretDefineXML

func (c *Connect) SecretDefineXML(xmlConfig string, flags uint32) (*Secret, error)

func (*Connect) SecretEventDeregister

func (c *Connect) SecretEventDeregister(callbackId int) error

func (*Connect) SecretEventLifecycleRegister

func (c *Connect) SecretEventLifecycleRegister(secret *Secret, callback SecretEventLifecycleCallback) (int, error)

func (*Connect) SecretEventValueChangedRegister

func (c *Connect) SecretEventValueChangedRegister(secret *Secret, callback SecretEventGenericCallback) (int, error)

func (*Connect) SetKeepAlive

func (c *Connect) SetKeepAlive(interval int, count uint) error

func (*Connect) SetMemoryParameters

func (c *Connect) SetMemoryParameters(params *NodeMemoryParameters, flags uint32) error

func (*Connect) StoragePoolCreateXML

func (c *Connect) StoragePoolCreateXML(xmlConfig string, flags StoragePoolCreateFlags) (*StoragePool, error)

func (*Connect) StoragePoolDefineXML

func (c *Connect) StoragePoolDefineXML(xmlConfig string, flags uint32) (*StoragePool, error)

func (*Connect) StoragePoolEventDeregister

func (c *Connect) StoragePoolEventDeregister(callbackId int) error

func (*Connect) StoragePoolEventLifecycleRegister

func (c *Connect) StoragePoolEventLifecycleRegister(pool *StoragePool, callback StoragePoolEventLifecycleCallback) (int, error)

func (*Connect) StoragePoolEventRefreshRegister

func (c *Connect) StoragePoolEventRefreshRegister(pool *StoragePool, callback StoragePoolEventGenericCallback) (int, error)

func (*Connect) SuspendForDuration

func (c *Connect) SuspendForDuration(target NodeSuspendTarget, duration uint64, flags uint32) error

func (*Connect) UnregisterCloseCallback

func (c *Connect) UnregisterCloseCallback() error

type ConnectAuth

type ConnectAuth struct {
	CredType []ConnectCredentialType
	Callback ConnectAuthCallback
}

type ConnectAuthCallback

type ConnectAuthCallback func(creds []*ConnectCredential)

type ConnectBaselineCPUFlags

type ConnectBaselineCPUFlags int

type ConnectCloseReason

type ConnectCloseReason int

type ConnectCompareCPUFlags

type ConnectCompareCPUFlags int

type ConnectCredential

type ConnectCredential struct {
	Type      ConnectCredentialType
	Prompt    string
	Challenge string
	DefResult string
	Result    string
	ResultLen int
}

type ConnectCredentialType

type ConnectCredentialType int

type ConnectDomainEventAgentLifecycleReason

type ConnectDomainEventAgentLifecycleReason int

type ConnectDomainEventAgentLifecycleState

type ConnectDomainEventAgentLifecycleState int

type ConnectDomainEventBlockJobStatus

type ConnectDomainEventBlockJobStatus int

type ConnectDomainEventDiskChangeReason

type ConnectDomainEventDiskChangeReason int

type ConnectDomainEventTrayChangeReason

type ConnectDomainEventTrayChangeReason int

type ConnectFlags

type ConnectFlags int

type ConnectGetAllDomainStatsFlags

type ConnectGetAllDomainStatsFlags int

type ConnectListAllDomainsFlags

type ConnectListAllDomainsFlags int

type ConnectListAllInterfacesFlags

type ConnectListAllInterfacesFlags int

type ConnectListAllNetworksFlags

type ConnectListAllNetworksFlags int

type ConnectListAllNodeDeviceFlags

type ConnectListAllNodeDeviceFlags int

type ConnectListAllSecretsFlags

type ConnectListAllSecretsFlags int

type ConnectListAllStoragePoolsFlags

type ConnectListAllStoragePoolsFlags int

type Domain

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

func (*Domain) AbortJob

func (d *Domain) AbortJob() error

func (*Domain) AddIOThread

func (d *Domain) AddIOThread(id uint, flags DomainModificationImpact) error

func (*Domain) AttachDevice

func (d *Domain) AttachDevice(xml string) error

func (*Domain) AttachDeviceFlags

func (d *Domain) AttachDeviceFlags(xml string, flags DomainDeviceModifyFlags) error

func (*Domain) BlockCommit

func (d *Domain) BlockCommit(disk string, base string, top string, bandwidth uint64, flags DomainBlockCommitFlags) error

func (*Domain) BlockCopy

func (d *Domain) BlockCopy(disk string, destxml string, params *DomainBlockCopyParameters, flags DomainBlockCopyFlags) error

func (*Domain) BlockJobAbort

func (d *Domain) BlockJobAbort(disk string, flags DomainBlockJobAbortFlags) error

func (*Domain) BlockJobSetSpeed

func (d *Domain) BlockJobSetSpeed(disk string, bandwidth uint64, flags DomainBlockJobSetSpeedFlags) error

func (*Domain) BlockPeek

func (d *Domain) BlockPeek(disk string, offset uint64, size uint64, flags uint32) ([]byte, error)

func (*Domain) BlockPull

func (d *Domain) BlockPull(disk string, bandwidth uint64, flags DomainBlockPullFlags) error

func (*Domain) BlockRebase

func (d *Domain) BlockRebase(disk string, base string, bandwidth uint64, flags DomainBlockRebaseFlags) error

func (*Domain) BlockResize

func (d *Domain) BlockResize(disk string, size uint64, flags DomainBlockResizeFlags) error

func (*Domain) BlockStats

func (d *Domain) BlockStats(path string) (*DomainBlockStats, error)

func (*Domain) BlockStatsFlags

func (d *Domain) BlockStatsFlags(disk string, flags uint32) (*DomainBlockStats, error)

func (*Domain) CoreDump

func (d *Domain) CoreDump(to string, flags DomainCoreDumpFlags) error

func (*Domain) CoreDumpWithFormat

func (d *Domain) CoreDumpWithFormat(to string, format DomainCoreDumpFormat, flags DomainCoreDumpFlags) error

func (*Domain) Create

func (d *Domain) Create() error

func (*Domain) CreateSnapshotXML

func (d *Domain) CreateSnapshotXML(xml string, flags DomainSnapshotCreateFlags) (*DomainSnapshot, error)

func (*Domain) CreateWithFiles

func (d *Domain) CreateWithFiles(files []os.File, flags DomainCreateFlags) error

func (*Domain) CreateWithFlags

func (d *Domain) CreateWithFlags(flags DomainCreateFlags) error

func (*Domain) DelIOThread

func (d *Domain) DelIOThread(id uint, flags DomainModificationImpact) error

func (*Domain) Destroy

func (d *Domain) Destroy() error

func (*Domain) DestroyFlags

func (d *Domain) DestroyFlags(flags DomainDestroyFlags) error

func (*Domain) DetachDevice

func (d *Domain) DetachDevice(xml string) error

func (*Domain) DetachDeviceFlags

func (d *Domain) DetachDeviceFlags(xml string, flags DomainDeviceModifyFlags) error

func (*Domain) FSFreeze

func (d *Domain) FSFreeze(mounts []string, flags uint32) error

func (*Domain) FSThaw

func (d *Domain) FSThaw(mounts []string, flags uint32) error

func (*Domain) FSTrim

func (d *Domain) FSTrim(mount string, minimum uint64, flags uint32) error

func (*Domain) Free

func (d *Domain) Free() error

func (*Domain) GetAutostart

func (d *Domain) GetAutostart() (bool, error)

func (*Domain) GetBlkioParameters

func (d *Domain) GetBlkioParameters(flags DomainModificationImpact) (*DomainBlkioParameters, error)

func (*Domain) GetBlockInfo

func (d *Domain) GetBlockInfo(disk string, flag uint) (*DomainBlockInfo, error)

func (*Domain) GetBlockIoTune

func (d *Domain) GetBlockIoTune(disk string, flags DomainModificationImpact) (*DomainBlockIoTuneParameters, error)

func (*Domain) GetBlockJobInfo

func (d *Domain) GetBlockJobInfo(disk string, flags DomainBlockJobInfoFlags) (*DomainBlockJobInfo, error)

func (*Domain) GetCPUStats

func (d *Domain) GetCPUStats(startCpu int, nCpus uint, flags uint32) ([]DomainCPUStats, error)

func (*Domain) GetControlInfo

func (d *Domain) GetControlInfo(flags uint32) (*DomainControlInfo, error)

func (*Domain) GetDiskErrors

func (d *Domain) GetDiskErrors(flags uint32) ([]DomainDiskError, error)

func (*Domain) GetEmulatorPinInfo

func (d *Domain) GetEmulatorPinInfo(flags DomainModificationImpact) ([]bool, error)

func (*Domain) GetFSInfo

func (d *Domain) GetFSInfo(flags uint32) ([]DomainFSInfo, error)

func (*Domain) GetGuestVcpus

func (d *Domain) GetGuestVcpus(flags uint32) (*DomainGuestVcpus, error)

func (*Domain) GetHostname

func (d *Domain) GetHostname(flags uint32) (string, error)

func (*Domain) GetID

func (d *Domain) GetID() (uint, error)

func (*Domain) GetIOThreadInfo

func (d *Domain) GetIOThreadInfo(flags DomainModificationImpact) ([]DomainIOThreadInfo, error)

func (*Domain) GetInfo

func (d *Domain) GetInfo() (*DomainInfo, error)

func (*Domain) GetInterfaceParameters

func (d *Domain) GetInterfaceParameters(device string, flags DomainModificationImpact) (*DomainInterfaceParameters, error)

func (*Domain) GetJobInfo

func (d *Domain) GetJobInfo() (*DomainJobInfo, error)

func (*Domain) GetJobStats

func (d *Domain) GetJobStats(flags DomainGetJobStatsFlags) (*DomainJobInfo, error)

func (*Domain) GetMaxMemory

func (d *Domain) GetMaxMemory() (uint64, error)

func (*Domain) GetMaxVcpus

func (d *Domain) GetMaxVcpus() (uint, error)

func (*Domain) GetMemoryParameters

func (d *Domain) GetMemoryParameters(flags DomainModificationImpact) (*DomainMemoryParameters, error)

func (*Domain) GetMetadata

func (d *Domain) GetMetadata(tipus DomainMetadataType, uri string, flags DomainModificationImpact) (string, error)

func (*Domain) GetName

func (d *Domain) GetName() (string, error)

func (*Domain) GetNumaParameters

func (d *Domain) GetNumaParameters(flags DomainModificationImpact) (*DomainNumaParameters, error)

func (*Domain) GetOSType

func (d *Domain) GetOSType() (string, error)

func (*Domain) GetPerfEvents

func (d *Domain) GetPerfEvents(flags DomainModificationImpact) (*DomainPerfEvents, error)

func (*Domain) GetSchedulerParameters

func (d *Domain) GetSchedulerParameters() (*DomainSchedulerParameters, error)

func (*Domain) GetSchedulerParametersFlags

func (d *Domain) GetSchedulerParametersFlags(flags DomainModificationImpact) (*DomainSchedulerParameters, error)

func (*Domain) GetSecurityLabel

func (d *Domain) GetSecurityLabel() (*SecurityLabel, error)

func (*Domain) GetSecurityLabelList

func (d *Domain) GetSecurityLabelList() ([]SecurityLabel, error)

func (*Domain) GetState

func (d *Domain) GetState() (DomainState, int, error)

func (*Domain) GetTime

func (d *Domain) GetTime(flags uint32) (int64, uint, error)

func (*Domain) GetUUID

func (d *Domain) GetUUID() ([]byte, error)

func (*Domain) GetUUIDString

func (d *Domain) GetUUIDString() (string, error)

func (*Domain) GetVcpuPinInfo

func (d *Domain) GetVcpuPinInfo(flags DomainModificationImpact) ([][]bool, error)

func (*Domain) GetVcpus

func (d *Domain) GetVcpus() ([]DomainVcpuInfo, error)

func (*Domain) GetVcpusFlags

func (d *Domain) GetVcpusFlags(flags DomainVcpuFlags) (int32, error)

func (*Domain) GetXMLDesc

func (d *Domain) GetXMLDesc(flags DomainXMLFlags) (string, error)

func (*Domain) HasCurrentSnapshot

func (d *Domain) HasCurrentSnapshot(flags uint32) (bool, error)

func (*Domain) HasManagedSaveImage

func (d *Domain) HasManagedSaveImage(flags uint32) (bool, error)

func (*Domain) InjectNMI

func (d *Domain) InjectNMI(flags uint32) error

func (*Domain) InterfaceStats

func (d *Domain) InterfaceStats(path string) (*DomainInterfaceStats, error)

func (*Domain) IsActive

func (d *Domain) IsActive() (bool, error)

func (*Domain) IsPersistent

func (d *Domain) IsPersistent() (bool, error)

func (*Domain) IsUpdated

func (d *Domain) IsUpdated() (bool, error)

func (*Domain) ListAllInterfaceAddresses

func (d *Domain) ListAllInterfaceAddresses(src uint) ([]DomainInterface, error)

func (*Domain) ListAllSnapshots

func (d *Domain) ListAllSnapshots(flags DomainSnapshotListFlags) ([]DomainSnapshot, error)

func (*Domain) ManagedSave

func (d *Domain) ManagedSave(flags DomainSaveRestoreFlags) error

func (*Domain) ManagedSaveRemove

func (d *Domain) ManagedSaveRemove(flags uint32) error

func (*Domain) MemoryPeek

func (d *Domain) MemoryPeek(start uint64, size uint64, flags DomainMemoryFlags) ([]byte, error)

func (*Domain) MemoryStats

func (d *Domain) MemoryStats(nrStats uint32, flags uint32) ([]DomainMemoryStat, error)

func (*Domain) Migrate

func (d *Domain) Migrate(dconn *Connect, flags DomainMigrateFlags, dname string, uri string, bandwidth uint64) (*Domain, error)

func (*Domain) Migrate2

func (d *Domain) Migrate2(dconn *Connect, dxml string, flags DomainMigrateFlags, dname string, uri string, bandwidth uint64) (*Domain, error)

func (*Domain) Migrate3

func (d *Domain) Migrate3(dconn *Connect, params *DomainMigrateParameters, flags DomainMigrateFlags) (*Domain, error)

func (*Domain) MigrateGetCompressionCache

func (d *Domain) MigrateGetCompressionCache(flags uint32) (uint64, error)

func (*Domain) MigrateGetMaxSpeed

func (d *Domain) MigrateGetMaxSpeed(flags uint32) (uint64, error)

func (*Domain) MigrateSetCompressionCache

func (d *Domain) MigrateSetCompressionCache(size uint64, flags uint32) error

func (*Domain) MigrateSetMaxDowntime

func (d *Domain) MigrateSetMaxDowntime(downtime uint64, flags uint32) error

func (*Domain) MigrateSetMaxSpeed

func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags uint32) error

func (*Domain) MigrateStartPostCopy

func (d *Domain) MigrateStartPostCopy(flags uint32) error

func (*Domain) MigrateToURI

func (d *Domain) MigrateToURI(duri string, flags DomainMigrateFlags, dname string, bandwidth uint64) error

func (*Domain) MigrateToURI2

func (d *Domain) MigrateToURI2(dconnuri string, miguri string, dxml string, flags DomainMigrateFlags, dname string, bandwidth uint64) error

func (*Domain) MigrateToURI3

func (d *Domain) MigrateToURI3(dconnuri string, params *DomainMigrateParameters, flags DomainMigrateFlags) error

func (*Domain) OpenChannel

func (d *Domain) OpenChannel(name string, stream *Stream, flags DomainChannelFlags) error

func (*Domain) OpenConsole

func (d *Domain) OpenConsole(devname string, stream *Stream, flags DomainConsoleFlags) error

func (*Domain) OpenGraphics

func (d *Domain) OpenGraphics(idx uint, file os.File, flags DomainOpenGraphicsFlags) error

func (*Domain) OpenGraphicsFD

func (d *Domain) OpenGraphicsFD(idx uint, flags DomainOpenGraphicsFlags) (*os.File, error)

func (*Domain) PMSuspendForDuration

func (d *Domain) PMSuspendForDuration(target NodeSuspendTarget, duration uint64, flags uint32) error

func (*Domain) PMWakeup

func (d *Domain) PMWakeup(flags uint32) error

func (*Domain) PinEmulator

func (d *Domain) PinEmulator(cpumap []bool, flags DomainModificationImpact) error

func (*Domain) PinIOThread

func (d *Domain) PinIOThread(iothreadid uint, cpumap []bool, flags DomainModificationImpact) error

func (*Domain) PinVcpu

func (d *Domain) PinVcpu(vcpu uint, cpuMap []bool) error

func (*Domain) PinVcpuFlags

func (d *Domain) PinVcpuFlags(vcpu uint, cpuMap []bool, flags DomainModificationImpact) error

func (*Domain) QemuMonitorCommand

func (d *Domain) QemuMonitorCommand(command string, flags DomainQemuMonitorCommandFlags) (string, error)

func (*Domain) Reboot

func (d *Domain) Reboot(flags DomainRebootFlagValues) error

func (*Domain) Ref

func (c *Domain) Ref() error

func (*Domain) Rename

func (d *Domain) Rename(name string, flags uint32) error

func (*Domain) Reset

func (d *Domain) Reset(flags uint32) error

func (*Domain) Resume

func (d *Domain) Resume() error

func (*Domain) Save

func (d *Domain) Save(destFile string) error

func (*Domain) SaveFlags

func (d *Domain) SaveFlags(destFile string, destXml string, flags DomainSaveRestoreFlags) error

func (*Domain) Screenshot

func (d *Domain) Screenshot(stream *Stream, screen, flags uint32) (string, error)

func (*Domain) SendKey

func (d *Domain) SendKey(codeset, holdtime uint, keycodes []uint, flags uint32) error

func (*Domain) SendProcessSignal

func (d *Domain) SendProcessSignal(pid int64, signum DomainProcessSignal, flags uint32) error

func (*Domain) SetAutostart

func (d *Domain) SetAutostart(autostart bool) error

func (*Domain) SetBlkioParameters

func (d *Domain) SetBlkioParameters(params *DomainBlkioParameters, flags DomainModificationImpact) error

func (*Domain) SetBlockIoTune

func (d *Domain) SetBlockIoTune(disk string, params *DomainBlockIoTuneParameters, flags DomainModificationImpact) error

func (*Domain) SetBlockThreshold

func (d *Domain) SetBlockThreshold(dev string, threshold uint64, flags uint32) error

func (*Domain) SetGuestVcpus

func (d *Domain) SetGuestVcpus(cpus []bool, state bool, flags uint32) error

func (*Domain) SetInterfaceParameters

func (d *Domain) SetInterfaceParameters(device string, params *DomainInterfaceParameters, flags DomainModificationImpact) error

func (*Domain) SetMaxMemory

func (d *Domain) SetMaxMemory(memory uint) error

func (*Domain) SetMemory

func (d *Domain) SetMemory(memory uint64) error

func (*Domain) SetMemoryFlags

func (d *Domain) SetMemoryFlags(memory uint64, flags DomainMemoryModFlags) error

func (*Domain) SetMemoryParameters

func (d *Domain) SetMemoryParameters(params *DomainMemoryParameters, flags DomainModificationImpact) error

func (*Domain) SetMemoryStatsPeriod

func (d *Domain) SetMemoryStatsPeriod(period int, flags DomainMemoryModFlags) error

func (*Domain) SetMetadata

func (d *Domain) SetMetadata(metaDataType DomainMetadataType, metaDataCont, uriKey, uri string, flags DomainModificationImpact) error

func (*Domain) SetNumaParameters

func (d *Domain) SetNumaParameters(params *DomainNumaParameters, flags DomainModificationImpact) error

func (*Domain) SetPerfEvents

func (d *Domain) SetPerfEvents(params *DomainPerfEvents, flags DomainModificationImpact) error

func (*Domain) SetSchedulerParameters

func (d *Domain) SetSchedulerParameters(params *DomainSchedulerParameters) error

func (*Domain) SetSchedulerParametersFlags

func (d *Domain) SetSchedulerParametersFlags(params *DomainSchedulerParameters, flags DomainModificationImpact) error

func (*Domain) SetTime

func (d *Domain) SetTime(secs int64, nsecs uint, flags DomainSetTimeFlags) error

func (*Domain) SetUserPassword

func (d *Domain) SetUserPassword(user string, password string, flags DomainSetUserPasswordFlags) error

func (*Domain) SetVcpu

func (d *Domain) SetVcpu(cpus []bool, state bool, flags uint32) error

func (*Domain) SetVcpus

func (d *Domain) SetVcpus(vcpu uint) error

func (*Domain) SetVcpusFlags

func (d *Domain) SetVcpusFlags(vcpu uint, flags DomainVcpuFlags) error

func (*Domain) Shutdown

func (d *Domain) Shutdown() error

func (*Domain) ShutdownFlags

func (d *Domain) ShutdownFlags(flags DomainShutdownFlags) error

func (*Domain) SnapshotCurrent

func (d *Domain) SnapshotCurrent(flags uint32) (*DomainSnapshot, error)

func (*Domain) SnapshotListNames

func (d *Domain) SnapshotListNames(flags DomainSnapshotListFlags) ([]string, error)

func (*Domain) SnapshotLookupByName

func (d *Domain) SnapshotLookupByName(name string, flags uint32) (*DomainSnapshot, error)

func (*Domain) SnapshotNum

func (d *Domain) SnapshotNum(flags DomainSnapshotListFlags) (int, error)

func (*Domain) Suspend

func (d *Domain) Suspend() error

func (*Domain) Undefine

func (d *Domain) Undefine() error

func (*Domain) UndefineFlags

func (d *Domain) UndefineFlags(flags DomainUndefineFlagsValues) error

func (*Domain) UpdateDeviceFlags

func (d *Domain) UpdateDeviceFlags(xml string, flags DomainDeviceModifyFlags) error

type DomainBlkioParameters

type DomainBlkioParameters struct {
	WeightSet          bool
	Weight             uint
	DeviceWeightSet    bool
	DeviceWeight       string
	DeviceReadIopsSet  bool
	DeviceReadIops     string
	DeviceWriteIopsSet bool
	DeviceWriteIops    string
	DeviceReadBpsSet   bool
	DeviceReadBps      string
	DeviceWriteBpsSet  bool
	DeviceWriteBps     string
}

type DomainBlockCommitFlags

type DomainBlockCommitFlags int

type DomainBlockCopyFlags

type DomainBlockCopyFlags int

type DomainBlockCopyParameters

type DomainBlockCopyParameters struct {
	BandwidthSet   bool
	Bandwidth      uint64
	GranularitySet bool
	Granularity    uint
	BufSizeSet     bool
	BufSize        uint64
}

type DomainBlockInfo

type DomainBlockInfo struct {
	Capacity   uint64
	Allocation uint64
	Physical   uint64
}

type DomainBlockIoTuneParameters

type DomainBlockIoTuneParameters struct {
	TotalBytesSecSet          bool
	TotalBytesSec             uint64
	ReadBytesSecSet           bool
	ReadBytesSec              uint64
	WriteBytesSecSet          bool
	WriteBytesSec             uint64
	TotalIopsSecSet           bool
	TotalIopsSec              uint64
	ReadIopsSecSet            bool
	ReadIopsSec               uint64
	WriteIopsSecSet           bool
	WriteIopsSec              uint64
	TotalBytesSecMaxSet       bool
	TotalBytesSecMax          uint64
	ReadBytesSecMaxSet        bool
	ReadBytesSecMax           uint64
	WriteBytesSecMaxSet       bool
	WriteBytesSecMax          uint64
	TotalIopsSecMaxSet        bool
	TotalIopsSecMax           uint64
	ReadIopsSecMaxSet         bool
	ReadIopsSecMax            uint64
	WriteIopsSecMaxSet        bool
	WriteIopsSecMax           uint64
	TotalBytesSecMaxLengthSet bool
	TotalBytesSecMaxLength    uint64
	ReadBytesSecMaxLengthSet  bool
	ReadBytesSecMaxLength     uint64
	WriteBytesSecMaxLengthSet bool
	WriteBytesSecMaxLength    uint64
	TotalIopsSecMaxLengthSet  bool
	TotalIopsSecMaxLength     uint64
	ReadIopsSecMaxLengthSet   bool
	ReadIopsSecMaxLength      uint64
	WriteIopsSecMaxLengthSet  bool
	WriteIopsSecMaxLength     uint64
	SizeIopsSecSet            bool
	SizeIopsSec               uint64
	GroupNameSet              bool
	GroupName                 string
}

type DomainBlockJobAbortFlags

type DomainBlockJobAbortFlags int

type DomainBlockJobInfo

type DomainBlockJobInfo struct {
	Type      DomainBlockJobType
	Bandwidth uint64
	Cur       uint64
	End       uint64
}

type DomainBlockJobInfoFlags

type DomainBlockJobInfoFlags int

type DomainBlockJobSetSpeedFlags

type DomainBlockJobSetSpeedFlags int

type DomainBlockJobType

type DomainBlockJobType int

type DomainBlockPullFlags

type DomainBlockPullFlags int

type DomainBlockRebaseFlags

type DomainBlockRebaseFlags int

type DomainBlockResizeFlags

type DomainBlockResizeFlags int

type DomainBlockStats

type DomainBlockStats struct {
	RdBytesSet         bool
	RdBytes            int64
	RdReqSet           bool
	RdReq              int64
	RdTotalTimesSet    bool
	RdTotalTimes       int64
	WrBytesSet         bool
	WrBytes            int64
	WrReqSet           bool
	WrReq              int64
	WrTotalTimesSet    bool
	WrTotalTimes       int64
	FlushReqSet        bool
	FlushReq           int64
	FlushTotalTimesSet bool
	FlushTotalTimes    int64
	ErrsSet            bool
	Errs               int64
}

type DomainBlockedReason

type DomainBlockedReason int

type DomainCPUStats

type DomainCPUStats struct {
	CpuTimeSet    bool
	CpuTime       uint64
	UserTimeSet   bool
	UserTime      uint64
	SystemTimeSet bool
	SystemTime    uint64
	VcpuTimeSet   bool
	VcpuTime      uint64
}

type DomainCPUStatsTags

type DomainCPUStatsTags string

type DomainChannelFlags

type DomainChannelFlags int

type DomainConsoleFlags

type DomainConsoleFlags int

type DomainControlErrorReason

type DomainControlErrorReason int

type DomainControlInfo

type DomainControlInfo struct {
	State     DomainControlState
	Details   int
	StateTime uint64
}

type DomainControlState

type DomainControlState int

type DomainCoreDumpFlags

type DomainCoreDumpFlags int

type DomainCoreDumpFormat

type DomainCoreDumpFormat int

type DomainCrashedReason

type DomainCrashedReason int

type DomainCreateFlags

type DomainCreateFlags int

type DomainDefineFlags

type DomainDefineFlags int

type DomainDestroyFlags

type DomainDestroyFlags int

type DomainDeviceModifyFlags

type DomainDeviceModifyFlags int

type DomainDiskError

type DomainDiskError struct {
	Disk  string
	Error DomainDiskErrorCode
}

type DomainDiskErrorCode

type DomainDiskErrorCode int

type DomainEventAgentLifecycleCallback

type DomainEventAgentLifecycleCallback func(c *Connect, d *Domain, event *DomainEventAgentLifecycle)

type DomainEventBalloonChange

type DomainEventBalloonChange struct {
	Actual uint64
}

func (DomainEventBalloonChange) String

func (e DomainEventBalloonChange) String() string

type DomainEventBalloonChangeCallback

type DomainEventBalloonChangeCallback func(c *Connect, d *Domain, event *DomainEventBalloonChange)

type DomainEventBlockJob

type DomainEventBlockJob struct {
	Disk   string
	Type   DomainBlockJobType
	Status ConnectDomainEventBlockJobStatus
}

func (DomainEventBlockJob) String

func (e DomainEventBlockJob) String() string

type DomainEventBlockJobCallback

type DomainEventBlockJobCallback func(c *Connect, d *Domain, event *DomainEventBlockJob)

type DomainEventBlockThreshold

type DomainEventBlockThreshold struct {
	Dev       string
	Path      string
	Threshold uint64
	Excess    uint64
}

type DomainEventBlockThresholdCallback

type DomainEventBlockThresholdCallback func(c *Connect, d *Domain, event *DomainEventBlockThreshold)

type DomainEventCrashedDetailType

type DomainEventCrashedDetailType int

type DomainEventDefinedDetailType

type DomainEventDefinedDetailType int

type DomainEventDeviceAdded

type DomainEventDeviceAdded struct {
	DevAlias string
}

type DomainEventDeviceAddedCallback

type DomainEventDeviceAddedCallback func(c *Connect, d *Domain, event *DomainEventDeviceAdded)

type DomainEventDeviceRemovalFailed

type DomainEventDeviceRemovalFailed struct {
	DevAlias string
}

type DomainEventDeviceRemovalFailedCallback

type DomainEventDeviceRemovalFailedCallback func(c *Connect, d *Domain, event *DomainEventDeviceRemovalFailed)

type DomainEventDeviceRemoved

type DomainEventDeviceRemoved struct {
	DevAlias string
}

func (DomainEventDeviceRemoved) String

func (e DomainEventDeviceRemoved) String() string

type DomainEventDeviceRemovedCallback

type DomainEventDeviceRemovedCallback func(c *Connect, d *Domain, event *DomainEventDeviceRemoved)

type DomainEventDiskChange

type DomainEventDiskChange struct {
	OldSrcPath string
	NewSrcPath string
	DevAlias   string
	Reason     ConnectDomainEventDiskChangeReason
}

func (DomainEventDiskChange) String

func (e DomainEventDiskChange) String() string

type DomainEventDiskChangeCallback

type DomainEventDiskChangeCallback func(c *Connect, d *Domain, event *DomainEventDiskChange)

type DomainEventGenericCallback

type DomainEventGenericCallback func(c *Connect, d *Domain)

type DomainEventGraphics

type DomainEventGraphics struct {
	Phase      DomainEventGraphicsPhase
	Local      DomainEventGraphicsAddress
	Remote     DomainEventGraphicsAddress
	AuthScheme string
	Subject    []DomainEventGraphicsSubjectIdentity
}

func (DomainEventGraphics) String

func (e DomainEventGraphics) String() string

type DomainEventGraphicsAddress

type DomainEventGraphicsAddress struct {
	Family  DomainEventGraphicsAddressType
	Node    string
	Service string
}

type DomainEventGraphicsAddressType

type DomainEventGraphicsAddressType int

type DomainEventGraphicsCallback

type DomainEventGraphicsCallback func(c *Connect, d *Domain, event *DomainEventGraphics)

type DomainEventGraphicsPhase

type DomainEventGraphicsPhase int

type DomainEventGraphicsSubjectIdentity

type DomainEventGraphicsSubjectIdentity struct {
	Type string
	Name string
}

type DomainEventIOError

type DomainEventIOError struct {
	SrcPath  string
	DevAlias string
	Action   DomainEventIOErrorAction
}

func (DomainEventIOError) String

func (e DomainEventIOError) String() string

type DomainEventIOErrorAction

type DomainEventIOErrorAction int

type DomainEventIOErrorCallback

type DomainEventIOErrorCallback func(c *Connect, d *Domain, event *DomainEventIOError)

type DomainEventIOErrorReason

type DomainEventIOErrorReason struct {
	SrcPath  string
	DevAlias string
	Action   DomainEventIOErrorAction
	Reason   string
}

func (DomainEventIOErrorReason) String

func (e DomainEventIOErrorReason) String() string

type DomainEventIOErrorReasonCallback

type DomainEventIOErrorReasonCallback func(c *Connect, d *Domain, event *DomainEventIOErrorReason)

type DomainEventJobCompleted

type DomainEventJobCompleted struct {
	Info DomainJobInfo
}

type DomainEventJobCompletedCallback

type DomainEventJobCompletedCallback func(c *Connect, d *Domain, event *DomainEventJobCompleted)

type DomainEventLifecycle

type DomainEventLifecycle struct {
	Event DomainEventType
	// TODO: we can make Detail typesafe somehow ?
	Detail int
}

func (DomainEventLifecycle) String

func (e DomainEventLifecycle) String() string

type DomainEventLifecycleCallback

type DomainEventLifecycleCallback func(c *Connect, d *Domain, event *DomainEventLifecycle)

type DomainEventMetadataChange

type DomainEventMetadataChange struct {
	Type  int
	NSURI string
}

type DomainEventMetadataChangeCallback

type DomainEventMetadataChangeCallback func(c *Connect, d *Domain, event *DomainEventMetadataChange)

type DomainEventMigrationIteration

type DomainEventMigrationIteration struct {
	Iteration int
}

type DomainEventMigrationIterationCallback

type DomainEventMigrationIterationCallback func(c *Connect, d *Domain, event *DomainEventMigrationIteration)

type DomainEventPMSuspend

type DomainEventPMSuspend struct {
	Reason int
}

type DomainEventPMSuspendCallback

type DomainEventPMSuspendCallback func(c *Connect, d *Domain, event *DomainEventPMSuspend)

type DomainEventPMSuspendDisk

type DomainEventPMSuspendDisk struct {
	Reason int
}

type DomainEventPMSuspendDiskCallback

type DomainEventPMSuspendDiskCallback func(c *Connect, d *Domain, event *DomainEventPMSuspendDisk)

type DomainEventPMSuspendedDetailType

type DomainEventPMSuspendedDetailType int

type DomainEventPMWakeup

type DomainEventPMWakeup struct {
	Reason int
}

type DomainEventPMWakeupCallback

type DomainEventPMWakeupCallback func(c *Connect, d *Domain, event *DomainEventPMWakeup)

type DomainEventRTCChange

type DomainEventRTCChange struct {
	Utcoffset int64
}

func (DomainEventRTCChange) String

func (e DomainEventRTCChange) String() string

type DomainEventRTCChangeCallback

type DomainEventRTCChangeCallback func(c *Connect, d *Domain, event *DomainEventRTCChange)

type DomainEventResumedDetailType

type DomainEventResumedDetailType int

type DomainEventShutdownDetailType

type DomainEventShutdownDetailType int

type DomainEventStartedDetailType

type DomainEventStartedDetailType int

type DomainEventStoppedDetailType

type DomainEventStoppedDetailType int

type DomainEventSuspendedDetailType

type DomainEventSuspendedDetailType int

type DomainEventTrayChange

type DomainEventTrayChange struct {
	DevAlias string
	Reason   ConnectDomainEventTrayChangeReason
}

func (DomainEventTrayChange) String

func (e DomainEventTrayChange) String() string

type DomainEventTrayChangeCallback

type DomainEventTrayChangeCallback func(c *Connect, d *Domain, event *DomainEventTrayChange)

type DomainEventTunable

type DomainEventTunable struct {
	CpuSched      *DomainSchedulerParameters
	CpuPin        *DomainEventTunableCpuPin
	BlkdevDiskSet bool
	BlkdevDisk    string
	BlkdevTune    *DomainBlockIoTuneParameters
}

type DomainEventTunableCallback

type DomainEventTunableCallback func(c *Connect, d *Domain, event *DomainEventTunable)

type DomainEventTunableCpuPin

type DomainEventTunableCpuPin struct {
	VcpuPinSet     bool
	VcpuPin        [][]bool
	EmulatorPinSet bool
	EmulatorPin    []bool
	IOThreadPinSet bool
	IOThreadPin    [][]bool
}

type DomainEventType

type DomainEventType int

type DomainEventUndefinedDetailType

type DomainEventUndefinedDetailType int

type DomainEventWatchdog

type DomainEventWatchdog struct {
	Action DomainEventWatchdogAction
}

func (DomainEventWatchdog) String

func (e DomainEventWatchdog) String() string

type DomainEventWatchdogAction

type DomainEventWatchdogAction int

type DomainEventWatchdogCallback

type DomainEventWatchdogCallback func(c *Connect, d *Domain, event *DomainEventWatchdog)

type DomainFSInfo

type DomainFSInfo struct {
	MountPoint string
	Name       string
	FSType     string
	DevAlias   []string
}

type DomainGetJobStatsFlags

type DomainGetJobStatsFlags int

type DomainGuestVcpus

type DomainGuestVcpus struct {
	Vcpus      []bool
	Online     []bool
	Offlinable []bool
}

type DomainIOThreadInfo

type DomainIOThreadInfo struct {
	IOThreadID uint
	CpuMap     []bool
}

type DomainIPAddress

type DomainIPAddress struct {
	Type   int
	Addr   string
	Prefix uint
}

type DomainInfo

type DomainInfo struct {
	State     DomainState
	MaxMem    uint64
	Memory    uint64
	NrVirtCpu uint
	CpuTime   uint64
}

type DomainInterface

type DomainInterface struct {
	Name   string
	Hwaddr string
	Addrs  []DomainIPAddress
}

type DomainInterfaceAddressesSource

type DomainInterfaceAddressesSource int

type DomainInterfaceParameters

type DomainInterfaceParameters struct {
	BandwidthInAverageSet  bool
	BandwidthInAverage     uint
	BandwidthInPeakSet     bool
	BandwidthInPeak        uint
	BandwidthInBurstSet    bool
	BandwidthInBurst       uint
	BandwidthInFloorSet    bool
	BandwidthInFloor       uint
	BandwidthOutAverageSet bool
	BandwidthOutAverage    uint
	BandwidthOutPeakSet    bool
	BandwidthOutPeak       uint
	BandwidthOutBurstSet   bool
	BandwidthOutBurst      uint
}

type DomainInterfaceStats

type DomainInterfaceStats struct {
	RxBytesSet   bool
	RxBytes      int64
	RxPacketsSet bool
	RxPackets    int64
	RxErrsSet    bool
	RxErrs       int64
	RxDropSet    bool
	RxDrop       int64
	TxBytesSet   bool
	TxBytes      int64
	TxPacketsSet bool
	TxPackets    int64
	TxErrsSet    bool
	TxErrs       int64
	TxDropSet    bool
	TxDrop       int64
}

type DomainJobInfo

type DomainJobInfo struct {
	Type                      DomainJobType
	TimeElapsedSet            bool
	TimeElapsed               uint64
	TimeElapsedNetSet         bool
	TimeElapsedNet            uint64
	TimeRemainingSet          bool
	TimeRemaining             uint64
	DowntimeSet               bool
	Downtime                  uint64
	DowntimeNetSet            bool
	DowntimeNet               uint64
	SetupTimeSet              bool
	SetupTime                 uint64
	DataTotalSet              bool
	DataTotal                 uint64
	DataProcessedSet          bool
	DataProcessed             uint64
	DataRemainingSet          bool
	DataRemaining             uint64
	MemTotalSet               bool
	MemTotal                  uint64
	MemProcessedSet           bool
	MemProcessed              uint64
	MemRemainingSet           bool
	MemRemaining              uint64
	MemConstantSet            bool
	MemConstant               uint64
	MemNormalSet              bool
	MemNormal                 uint64
	MemNormalBytesSet         bool
	MemNormalBytes            uint64
	MemBpsSet                 bool
	MemBps                    uint64
	MemDirtyRateSet           bool
	MemDirtyRate              uint64
	MemIterationSet           bool
	MemIteration              uint64
	DiskTotalSet              bool
	DiskTotal                 uint64
	DiskProcessedSet          bool
	DiskProcessed             uint64
	DiskRemainingSet          bool
	DiskRemaining             uint64
	DiskBpsSet                bool
	DiskBps                   uint64
	CompressionCacheSet       bool
	CompressionCache          uint64
	CompressionBytesSet       bool
	CompressionBytes          uint64
	CompressionPagesSet       bool
	CompressionPages          uint64
	CompressionCacheMissesSet bool
	CompressionCacheMisses    uint64
	CompressionOverflowSet    bool
	CompressionOverflow       uint64
	AutoConvergeThrottleSet   bool
	AutoConvergeThrottle      int
}

type DomainJobType

type DomainJobType int

type DomainMemoryFlags

type DomainMemoryFlags int

type DomainMemoryModFlags

type DomainMemoryModFlags int

type DomainMemoryParameters

type DomainMemoryParameters struct {
	HardLimitSet     bool
	HardLimit        uint64
	SoftLimitSet     bool
	SoftLimit        uint64
	MinGuaranteeSet  bool
	MinGuarantee     uint64
	SwapHardLimitSet bool
	SwapHardLimit    uint64
}

type DomainMemoryStat

type DomainMemoryStat struct {
	Tag int32
	Val uint64
}

type DomainMemoryStatTags

type DomainMemoryStatTags int

type DomainMetadataType

type DomainMetadataType int

type DomainMigrateFlags

type DomainMigrateFlags int

type DomainMigrateParameters

type DomainMigrateParameters struct {
	URISet                    bool
	URI                       string
	DestNameSet               bool
	DestName                  string
	DestXMLSet                bool
	DestXML                   string
	PersistXMLSet             bool
	PersistXML                string
	BandwidthSet              bool
	Bandwidth                 uint64
	GraphicsURISet            bool
	GraphicsURI               string
	ListenAddressSet          bool
	ListenAddress             string
	MigrateDisksSet           bool
	MigrateDisks              []string
	DisksPortSet              bool
	DisksPort                 int
	CompressionSet            bool
	Compression               string
	CompressionMTLevelSet     bool
	CompressionMTLevel        int
	CompressionMTThreadsSet   bool
	CompressionMTThreads      int
	CompressionMTDThreadsSet  bool
	CompressionMTDThreads     int
	CompressionXBZRLECacheSet bool
	CompressionXBZRLECache    uint64
	AutoConvergeInitialSet    bool
	AutoConvergeInitial       int
	AutoConvergeIncrementSet  bool
	AutoConvergeIncrement     int
}

type DomainModificationImpact

type DomainModificationImpact int

type DomainNostateReason

type DomainNostateReason int

type DomainNumaParameters

type DomainNumaParameters struct {
	NodesetSet bool
	Nodeset    string
	ModeSet    bool
	Mode       DomainNumatuneMemMode
}

type DomainNumatuneMemMode

type DomainNumatuneMemMode int

type DomainOpenGraphicsFlags

type DomainOpenGraphicsFlags int

type DomainPMSuspendedDiskReason

type DomainPMSuspendedDiskReason int

type DomainPMSuspendedReason

type DomainPMSuspendedReason int

type DomainPausedReason

type DomainPausedReason int

type DomainPerfEvents

type DomainPerfEvents struct {
	CmtSet                   bool
	Cmt                      bool
	MbmtSet                  bool
	Mbmt                     bool
	MbmlSet                  bool
	Mbml                     bool
	CacheMissesSet           bool
	CacheMisses              bool
	CacheReferencesSet       bool
	CacheReferences          bool
	InstructionsSet          bool
	Instructions             bool
	CpuCyclesSet             bool
	CpuCycles                bool
	BranchInstructionsSet    bool
	BranchInstructions       bool
	BranchMissesSet          bool
	BranchMisses             bool
	BusCyclesSet             bool
	BusCycles                bool
	StalledCyclesFrontendSet bool
	StalledCyclesFrontend    bool
	StalledCyclesBackendSet  bool
	StalledCyclesBackend     bool
	RefCpuCyclesSet          bool
	RefCpuCycles             bool
	CpuClockSet              bool
	CpuClock                 bool
	TaskClockSet             bool
	TaskClock                bool
	PageFaultsSet            bool
	PageFaults               bool
	ContextSwitchesSet       bool
	ContextSwitches          bool
	CpuMigrationsSet         bool
	CpuMigrations            bool
	PageFaultsMinSet         bool
	PageFaultsMin            bool
	PageFaultsMajSet         bool
	PageFaultsMaj            bool
	AlignmentFaultsSet       bool
	AlignmentFaults          bool
	EmulationFaultsSet       bool
	EmulationFaults          bool
}

type DomainProcessSignal

type DomainProcessSignal int

type DomainQemuMonitorCommandFlags

type DomainQemuMonitorCommandFlags int

type DomainRebootFlagValues

type DomainRebootFlagValues int

type DomainRunningReason

type DomainRunningReason int

type DomainSaveRestoreFlags

type DomainSaveRestoreFlags int

type DomainSchedulerParameters

type DomainSchedulerParameters struct {
	Type              string
	CpuSharesSet      bool
	CpuShares         uint64
	GlobalPeriodSet   bool
	GlobalPeriod      uint64
	GlobalQuotaSet    bool
	GlobalQuota       uint64
	VcpuPeriodSet     bool
	VcpuPeriod        uint64
	VcpuQuotaSet      bool
	VcpuQuota         uint64
	EmulatorPeriodSet bool
	EmulatorPeriod    uint64
	EmulatorQuotaSet  bool
	EmulatorQuota     uint64
	IothreadPeriodSet bool
	IothreadPeriod    uint64
	IothreadQuotaSet  bool
	IothreadQuota     uint64
	WeightSet         bool
	Weight            uint
	CapSet            bool
	Cap               uint
	ReservationSet    bool
	Reservation       int64
	LimitSet          bool
	Limit             int64
	SharesSet         bool
	Shares            int
}

type DomainSetTimeFlags

type DomainSetTimeFlags int

type DomainSetUserPasswordFlags

type DomainSetUserPasswordFlags int

type DomainShutdownFlags

type DomainShutdownFlags int

type DomainShutdownReason

type DomainShutdownReason int

type DomainShutoffReason

type DomainShutoffReason int

type DomainSnapshot

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

func (*DomainSnapshot) Delete

func (*DomainSnapshot) Free

func (s *DomainSnapshot) Free() error

func (*DomainSnapshot) GetName

func (s *DomainSnapshot) GetName() (string, error)

func (*DomainSnapshot) GetParent

func (s *DomainSnapshot) GetParent(flags uint32) (*DomainSnapshot, error)

func (*DomainSnapshot) GetXMLDesc

func (s *DomainSnapshot) GetXMLDesc(flags DomainXMLFlags) (string, error)

func (*DomainSnapshot) HasMetadata

func (s *DomainSnapshot) HasMetadata(flags uint32) (bool, error)

func (*DomainSnapshot) IsCurrent

func (s *DomainSnapshot) IsCurrent(flags uint32) (bool, error)

func (*DomainSnapshot) ListAllChildren

func (d *DomainSnapshot) ListAllChildren(flags DomainSnapshotListFlags) ([]DomainSnapshot, error)

func (*DomainSnapshot) ListChildrenNames

func (s *DomainSnapshot) ListChildrenNames(flags DomainSnapshotListFlags) ([]string, error)

func (*DomainSnapshot) NumChildren

func (s *DomainSnapshot) NumChildren(flags DomainSnapshotListFlags) (int, error)

func (*DomainSnapshot) Ref

func (c *DomainSnapshot) Ref() error

func (*DomainSnapshot) RevertToSnapshot

func (s *DomainSnapshot) RevertToSnapshot(flags DomainSnapshotRevertFlags) error

type DomainSnapshotCreateFlags

type DomainSnapshotCreateFlags int

type DomainSnapshotDeleteFlags

type DomainSnapshotDeleteFlags int

type DomainSnapshotListFlags

type DomainSnapshotListFlags int

type DomainSnapshotRevertFlags

type DomainSnapshotRevertFlags int

type DomainState

type DomainState int

type DomainStats

type DomainStats struct {
	Domain  *Domain
	State   *DomainStatsState
	Cpu     *DomainStatsCPU
	Balloon *DomainStatsBalloon
	Vcpu    []DomainStatsVcpu
	Net     []DomainStatsNet
	Block   []DomainStatsBlock
	Perf    *DomainStatsPerf
}

type DomainStatsBalloon

type DomainStatsBalloon struct {
	CurrentSet bool
	Current    uint64
	MaximumSet bool
	Maximum    uint64
}

type DomainStatsBlock

type DomainStatsBlock struct {
	NameSet         bool
	Name            string
	BackingIndexSet bool
	BackingIndex    uint
	PathSet         bool
	Path            string
	RdReqsSet       bool
	RdReqs          uint64
	RdBytesSet      bool
	RdBytes         uint64
	RdTimesSet      bool
	RdTimes         uint64
	WrReqsSet       bool
	WrReqs          uint64
	WrBytesSet      bool
	WrBytes         uint64
	WrTimesSet      bool
	WrTimes         uint64
	FlReqsSet       bool
	FlReqs          uint64
	FlTimesSet      bool
	FlTimes         uint64
	ErrorsSet       bool
	Errors          uint64
	AllocationSet   bool
	Allocation      uint64
	CapacitySet     bool
	Capacity        uint64
	PhysicalSet     bool
	Physical        uint64
}

type DomainStatsCPU

type DomainStatsCPU struct {
	TimeSet   bool
	Time      uint64
	UserSet   bool
	User      uint64
	SystemSet bool
	System    uint64
}

type DomainStatsNet

type DomainStatsNet struct {
	NameSet    bool
	Name       string
	RxBytesSet bool
	RxBytes    uint64
	RxPktsSet  bool
	RxPkts     uint64
	RxErrsSet  bool
	RxErrs     uint64
	RxDropSet  bool
	RxDrop     uint64
	TxBytesSet bool
	TxBytes    uint64
	TxPktsSet  bool
	TxPkts     uint64
	TxErrsSet  bool
	TxErrs     uint64
	TxDropSet  bool
	TxDrop     uint64
}

type DomainStatsPerf

type DomainStatsPerf struct {
	CmtSet                   bool
	Cmt                      uint64
	MbmtSet                  bool
	Mbmt                     uint64
	MbmlSet                  bool
	Mbml                     uint64
	CacheMissesSet           bool
	CacheMisses              uint64
	CacheReferencesSet       bool
	CacheReferences          uint64
	InstructionsSet          bool
	Instructions             uint64
	CpuCyclesSet             bool
	CpuCycles                uint64
	BranchInstructionsSet    bool
	BranchInstructions       uint64
	BranchMissesSet          bool
	BranchMisses             uint64
	BusCyclesSet             bool
	BusCycles                uint64
	StalledCyclesFrontendSet bool
	StalledCyclesFrontend    uint64
	StalledCyclesBackendSet  bool
	StalledCyclesBackend     uint64
	RefCpuCyclesSet          bool
	RefCpuCycles             uint64
	CpuClockSet              bool
	CpuClock                 uint64
	TaskClockSet             bool
	TaskClock                uint64
	PageFaultsSet            bool
	PageFaults               uint64
	ContextSwitchesSet       bool
	ContextSwitches          uint64
	CpuMigrationsSet         bool
	CpuMigrations            uint64
	PageFaultsMinSet         bool
	PageFaultsMin            uint64
	PageFaultsMajSet         bool
	PageFaultsMaj            uint64
	AlignmentFaultsSet       bool
	AlignmentFaults          uint64
	EmulationFaultsSet       bool
	EmulationFaults          uint64
}

type DomainStatsState

type DomainStatsState struct {
	StateSet  bool
	State     DomainState
	ReasonSet bool
	Reason    int
}

type DomainStatsTypes

type DomainStatsTypes int

type DomainStatsVcpu

type DomainStatsVcpu struct {
	StateSet bool
	State    VcpuState
	TimeSet  bool
	Time     uint64
}

type DomainUndefineFlagsValues

type DomainUndefineFlagsValues int

type DomainVcpuFlags

type DomainVcpuFlags int

type DomainVcpuInfo

type DomainVcpuInfo struct {
	Number  uint32
	State   int32
	CpuTime uint64
	Cpu     int32
	CpuMap  []bool
}

type DomainXMLFlags

type DomainXMLFlags int

type Error

type Error struct {
	Code    ErrorNumber
	Domain  ErrorDomain
	Message string
	Level   ErrorLevel
}

func GetLastError

func GetLastError() Error

func GetNotImplementedError

func GetNotImplementedError(apiname string) Error

func (Error) Error

func (err Error) Error() string

type ErrorDomain

type ErrorDomain int

type ErrorLevel

type ErrorLevel int

type ErrorNumber

type ErrorNumber int

type EventHandleCallback

type EventHandleCallback func(watch int, file int, events EventHandleType)

type EventHandleCallbackInfo

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

func (*EventHandleCallbackInfo) Free

func (i *EventHandleCallbackInfo) Free()

func (*EventHandleCallbackInfo) Invoke

func (i *EventHandleCallbackInfo) Invoke(watch int, fd int, event EventHandleType)

type EventHandleType

type EventHandleType int

type EventLoop

type EventLoop interface {
	AddHandleFunc(fd int, event EventHandleType, callback *EventHandleCallbackInfo) int
	UpdateHandleFunc(watch int, event EventHandleType)
	RemoveHandleFunc(watch int) int
	AddTimeoutFunc(freq int, callback *EventTimeoutCallbackInfo) int
	UpdateTimeoutFunc(timer int, freq int)
	RemoveTimeoutFunc(timer int) int
}

type EventTimeoutCallback

type EventTimeoutCallback func(timer int)

type EventTimeoutCallbackInfo

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

func (*EventTimeoutCallbackInfo) Free

func (i *EventTimeoutCallbackInfo) Free()

func (*EventTimeoutCallbackInfo) Invoke

func (i *EventTimeoutCallbackInfo) Invoke(timer int)

type IPAddrType

type IPAddrType int

type Interface

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

func (*Interface) Create

func (n *Interface) Create(flags uint32) error

func (*Interface) Destroy

func (n *Interface) Destroy(flags uint32) error

func (*Interface) Free

func (n *Interface) Free() error

func (*Interface) GetMACString

func (n *Interface) GetMACString() (string, error)

func (*Interface) GetName

func (n *Interface) GetName() (string, error)

func (*Interface) GetXMLDesc

func (n *Interface) GetXMLDesc(flags InterfaceXMLFlags) (string, error)

func (*Interface) IsActive

func (n *Interface) IsActive() (bool, error)

func (*Interface) Ref

func (c *Interface) Ref() error

func (*Interface) Undefine

func (n *Interface) Undefine() error

type InterfaceXMLFlags

type InterfaceXMLFlags int

type KeycodeSet

type KeycodeSet int

type NWFilter

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

func (*NWFilter) Free

func (f *NWFilter) Free() error

func (*NWFilter) GetName

func (f *NWFilter) GetName() (string, error)

func (*NWFilter) GetUUID

func (f *NWFilter) GetUUID() ([]byte, error)

func (*NWFilter) GetUUIDString

func (f *NWFilter) GetUUIDString() (string, error)

func (*NWFilter) GetXMLDesc

func (f *NWFilter) GetXMLDesc(flags uint32) (string, error)

func (*NWFilter) Ref

func (c *NWFilter) Ref() error

func (*NWFilter) Undefine

func (f *NWFilter) Undefine() error

type Network

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

func (*Network) Create

func (n *Network) Create() error

func (*Network) Destroy

func (n *Network) Destroy() error

func (*Network) Free

func (n *Network) Free() error

func (*Network) GetAutostart

func (n *Network) GetAutostart() (bool, error)

func (*Network) GetBridgeName

func (n *Network) GetBridgeName() (string, error)

func (*Network) GetDHCPLeases

func (n *Network) GetDHCPLeases() ([]NetworkDHCPLease, error)

func (*Network) GetName

func (n *Network) GetName() (string, error)

func (*Network) GetUUID

func (n *Network) GetUUID() ([]byte, error)

func (*Network) GetUUIDString

func (n *Network) GetUUIDString() (string, error)

func (*Network) GetXMLDesc

func (n *Network) GetXMLDesc(flags NetworkXMLFlags) (string, error)

func (*Network) IsActive

func (n *Network) IsActive() (bool, error)

func (*Network) IsPersistent

func (n *Network) IsPersistent() (bool, error)

func (*Network) Ref

func (c *Network) Ref() error

func (*Network) SetAutostart

func (n *Network) SetAutostart(autostart bool) error

func (*Network) Undefine

func (n *Network) Undefine() error

func (*Network) Update

func (n *Network) Update(cmd NetworkUpdateCommand, section NetworkUpdateSection, parentIndex int, xml string, flags NetworkUpdateFlags) error

type NetworkDHCPLease

type NetworkDHCPLease struct {
	Iface      string
	ExpiryTime time.Time
	Type       IPAddrType
	Mac        string
	Iaid       string
	IPaddr     string
	Prefix     uint
	Hostname   string
	Clientid   string
}

type NetworkEventID

type NetworkEventID int

type NetworkEventLifecycle

type NetworkEventLifecycle struct {
	Event NetworkEventLifecycleType
	// TODO: we can make Detail typesafe somehow ?
	Detail int
}

func (NetworkEventLifecycle) String

func (e NetworkEventLifecycle) String() string

type NetworkEventLifecycleCallback

type NetworkEventLifecycleCallback func(c *Connect, n *Network, event *NetworkEventLifecycle)

type NetworkEventLifecycleType

type NetworkEventLifecycleType int

type NetworkUpdateCommand

type NetworkUpdateCommand int

type NetworkUpdateFlags

type NetworkUpdateFlags int

type NetworkUpdateSection

type NetworkUpdateSection int

type NetworkXMLFlags

type NetworkXMLFlags int

type NodeAllocPagesFlags

type NodeAllocPagesFlags int

type NodeCPUStats

type NodeCPUStats struct {
	KernelSet      bool
	Kernel         uint64
	UserSet        bool
	User           uint64
	IdleSet        bool
	Idle           uint64
	IowaitSet      bool
	Iowait         uint64
	IntrSet        bool
	Intr           uint64
	UtilizationSet bool
	Utilization    uint64
}

type NodeDevice

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

func (*NodeDevice) Destroy

func (n *NodeDevice) Destroy() error

func (*NodeDevice) Detach

func (n *NodeDevice) Detach() error

func (*NodeDevice) DetachFlags

func (n *NodeDevice) DetachFlags(driverName string, flags uint32) error

func (*NodeDevice) Free

func (n *NodeDevice) Free() error

func (*NodeDevice) GetName

func (n *NodeDevice) GetName() (string, error)

func (*NodeDevice) GetParent

func (n *NodeDevice) GetParent() (string, error)

func (*NodeDevice) GetXMLDesc

func (n *NodeDevice) GetXMLDesc(flags uint32) (string, error)

func (*NodeDevice) ListStorageCaps

func (p *NodeDevice) ListStorageCaps() ([]string, error)

func (*NodeDevice) NumOfStorageCaps

func (p *NodeDevice) NumOfStorageCaps() (int, error)

func (*NodeDevice) ReAttach

func (n *NodeDevice) ReAttach() error

func (*NodeDevice) Ref

func (c *NodeDevice) Ref() error

func (*NodeDevice) Reset

func (n *NodeDevice) Reset() error

type NodeDeviceEventGenericCallback

type NodeDeviceEventGenericCallback func(c *Connect, d *NodeDevice)

type NodeDeviceEventID

type NodeDeviceEventID int

type NodeDeviceEventLifecycle

type NodeDeviceEventLifecycle struct {
	Event NodeDeviceEventLifecycleType
	// TODO: we can make Detail typesafe somehow ?
	Detail int
}

func (NodeDeviceEventLifecycle) String

func (e NodeDeviceEventLifecycle) String() string

type NodeDeviceEventLifecycleCallback

type NodeDeviceEventLifecycleCallback func(c *Connect, n *NodeDevice, event *NodeDeviceEventLifecycle)

type NodeDeviceEventLifecycleType

type NodeDeviceEventLifecycleType int

type NodeGetCPUStatsAllCPUs

type NodeGetCPUStatsAllCPUs int

type NodeInfo

type NodeInfo struct {
	Model   string
	Memory  uint64
	Cpus    uint
	MHz     uint
	Nodes   uint32
	Sockets uint32
	Cores   uint32
	Threads uint32
}

func (*NodeInfo) GetMaxCPUs

func (ni *NodeInfo) GetMaxCPUs() uint32

type NodeMemoryParameters

type NodeMemoryParameters struct {
	ShmPagesToScanSet      bool
	ShmPagesToScan         uint
	ShmSleepMillisecsSet   bool
	ShmSleepMillisecs      uint
	ShmPagesSharedSet      bool
	ShmPagesShared         uint64
	ShmPagesSharingSet     bool
	ShmPagesSharing        uint64
	ShmPagesUnsharedSet    bool
	ShmPagesUnshared       uint64
	ShmPagesVolatileSet    bool
	ShmPagesVolatile       uint64
	ShmFullScansSet        bool
	ShmFullScans           uint64
	ShmMergeAcrossNodesSet bool
	ShmMergeAcrossNodes    uint
}

type NodeMemoryStats

type NodeMemoryStats struct {
	TotalSet   bool
	Total      uint64
	FreeSet    bool
	Free       uint64
	BuffersSet bool
	Buffers    uint64
	CachedSet  bool
	Cached     uint64
}

type NodeSecurityModel

type NodeSecurityModel struct {
	Model string
	Doi   string
}

type NodeSuspendTarget

type NodeSuspendTarget int

type Secret

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

func (*Secret) Free

func (s *Secret) Free() error

func (*Secret) GetUUID

func (s *Secret) GetUUID() ([]byte, error)

func (*Secret) GetUUIDString

func (s *Secret) GetUUIDString() (string, error)

func (*Secret) GetUsageID

func (s *Secret) GetUsageID() (string, error)

func (*Secret) GetUsageType

func (s *Secret) GetUsageType() (SecretUsageType, error)

func (*Secret) GetValue

func (s *Secret) GetValue(flags uint32) ([]byte, error)

func (*Secret) GetXMLDesc

func (s *Secret) GetXMLDesc(flags uint32) (string, error)

func (*Secret) Ref

func (c *Secret) Ref() error

func (*Secret) SetValue

func (s *Secret) SetValue(value []byte, flags uint32) error

func (*Secret) Undefine

func (s *Secret) Undefine() error

type SecretEventGenericCallback

type SecretEventGenericCallback func(c *Connect, n *Secret)

type SecretEventID

type SecretEventID int

type SecretEventLifecycle

type SecretEventLifecycle struct {
	Event SecretEventLifecycleType
	// TODO: we can make Detail typesafe somehow ?
	Detail int
}

func (SecretEventLifecycle) String

func (e SecretEventLifecycle) String() string

type SecretEventLifecycleCallback

type SecretEventLifecycleCallback func(c *Connect, n *Secret, event *SecretEventLifecycle)

type SecretEventLifecycleType

type SecretEventLifecycleType int

type SecretUsageType

type SecretUsageType int

type SecurityLabel

type SecurityLabel struct {
	Label     string
	Enforcing bool
}

type StoragePool

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

func (*StoragePool) Build

func (p *StoragePool) Build(flags StoragePoolBuildFlags) error

func (*StoragePool) Create

func (p *StoragePool) Create(flags StoragePoolCreateFlags) error

func (*StoragePool) Delete

func (p *StoragePool) Delete(flags StoragePoolDeleteFlags) error

func (*StoragePool) Destroy

func (p *StoragePool) Destroy() error

func (*StoragePool) Free

func (p *StoragePool) Free() error

func (*StoragePool) GetAutostart

func (p *StoragePool) GetAutostart() (bool, error)

func (*StoragePool) GetInfo

func (p *StoragePool) GetInfo() (*StoragePoolInfo, error)

func (*StoragePool) GetName

func (p *StoragePool) GetName() (string, error)

func (*StoragePool) GetUUID

func (p *StoragePool) GetUUID() ([]byte, error)

func (*StoragePool) GetUUIDString

func (p *StoragePool) GetUUIDString() (string, error)

func (*StoragePool) GetXMLDesc

func (p *StoragePool) GetXMLDesc(flags StorageXMLFlags) (string, error)

func (*StoragePool) IsActive

func (p *StoragePool) IsActive() (bool, error)

func (*StoragePool) IsPersistent

func (p *StoragePool) IsPersistent() (bool, error)

func (*StoragePool) ListAllStorageVolumes

func (p *StoragePool) ListAllStorageVolumes(flags uint32) ([]StorageVol, error)

func (*StoragePool) ListStorageVolumes

func (p *StoragePool) ListStorageVolumes() ([]string, error)

func (*StoragePool) LookupStorageVolByName

func (p *StoragePool) LookupStorageVolByName(name string) (*StorageVol, error)

func (*StoragePool) NumOfStorageVolumes

func (p *StoragePool) NumOfStorageVolumes() (int, error)

func (*StoragePool) Ref

func (c *StoragePool) Ref() error

func (*StoragePool) Refresh

func (p *StoragePool) Refresh(flags uint32) error

func (*StoragePool) SetAutostart

func (p *StoragePool) SetAutostart(autostart bool) error

func (*StoragePool) StorageVolCreateXML

func (p *StoragePool) StorageVolCreateXML(xmlConfig string, flags StorageVolCreateFlags) (*StorageVol, error)

func (*StoragePool) StorageVolCreateXMLFrom

func (p *StoragePool) StorageVolCreateXMLFrom(xmlConfig string, clonevol *StorageVol, flags StorageVolCreateFlags) (*StorageVol, error)

func (*StoragePool) Undefine

func (p *StoragePool) Undefine() error

type StoragePoolBuildFlags

type StoragePoolBuildFlags int

type StoragePoolCreateFlags

type StoragePoolCreateFlags int

type StoragePoolDeleteFlags

type StoragePoolDeleteFlags int

type StoragePoolEventGenericCallback

type StoragePoolEventGenericCallback func(c *Connect, n *StoragePool)

type StoragePoolEventID

type StoragePoolEventID int

type StoragePoolEventLifecycle

type StoragePoolEventLifecycle struct {
	Event StoragePoolEventLifecycleType
	// TODO: we can make Detail typesafe somehow ?
	Detail int
}

func (StoragePoolEventLifecycle) String

func (e StoragePoolEventLifecycle) String() string

type StoragePoolEventLifecycleCallback

type StoragePoolEventLifecycleCallback func(c *Connect, n *StoragePool, event *StoragePoolEventLifecycle)

type StoragePoolEventLifecycleType

type StoragePoolEventLifecycleType int

type StoragePoolInfo

type StoragePoolInfo struct {
	State      StoragePoolState
	Capacity   uint64
	Allocation uint64
	Available  uint64
}

type StoragePoolState

type StoragePoolState int

type StorageVol

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

func (*StorageVol) Delete

func (v *StorageVol) Delete(flags StorageVolDeleteFlags) error

func (*StorageVol) Download

func (v *StorageVol) Download(stream *Stream, offset, length uint64, flags uint32) error

func (*StorageVol) Free

func (v *StorageVol) Free() error

func (*StorageVol) GetInfo

func (v *StorageVol) GetInfo() (*StorageVolInfo, error)

func (*StorageVol) GetInfoFlags

func (v *StorageVol) GetInfoFlags(flags StorageVolInfoFlags) (*StorageVolInfo, error)

func (*StorageVol) GetKey

func (v *StorageVol) GetKey() (string, error)

func (*StorageVol) GetName

func (v *StorageVol) GetName() (string, error)

func (*StorageVol) GetPath

func (v *StorageVol) GetPath() (string, error)

func (*StorageVol) GetXMLDesc

func (v *StorageVol) GetXMLDesc(flags uint32) (string, error)

func (*StorageVol) LookupPoolByVolume

func (v *StorageVol) LookupPoolByVolume() (*StoragePool, error)

func (*StorageVol) Ref

func (c *StorageVol) Ref() error

func (*StorageVol) Resize

func (v *StorageVol) Resize(capacity uint64, flags StorageVolResizeFlags) error

func (*StorageVol) Upload

func (v *StorageVol) Upload(stream *Stream, offset, length uint64, flags uint32) error

func (*StorageVol) Wipe

func (v *StorageVol) Wipe(flags uint32) error

func (*StorageVol) WipePattern

func (v *StorageVol) WipePattern(algorithm StorageVolWipeAlgorithm, flags uint32) error

type StorageVolCreateFlags

type StorageVolCreateFlags int

type StorageVolDeleteFlags

type StorageVolDeleteFlags int

type StorageVolInfo

type StorageVolInfo struct {
	Type       StorageVolType
	Capacity   uint64
	Allocation uint64
}

type StorageVolInfoFlags

type StorageVolInfoFlags int

type StorageVolResizeFlags

type StorageVolResizeFlags int

type StorageVolType

type StorageVolType int

type StorageVolWipeAlgorithm

type StorageVolWipeAlgorithm int

type StorageXMLFlags

type StorageXMLFlags int

type Stream

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

func (*Stream) Abort

func (v *Stream) Abort() error

func (*Stream) EventAddCallback

func (v *Stream) EventAddCallback(events StreamEventType, callback StreamEventCallback) error

func (*Stream) EventRemoveCallback

func (v *Stream) EventRemoveCallback() error

func (*Stream) EventUpdateCallback

func (v *Stream) EventUpdateCallback(events StreamEventType) error

func (*Stream) Finish

func (v *Stream) Finish() error

func (*Stream) Free

func (v *Stream) Free() error

func (*Stream) Recv

func (v *Stream) Recv(p []byte) (int, error)

func (*Stream) RecvAll

func (v *Stream) RecvAll(handler StreamSinkFunc) error

func (*Stream) Ref

func (c *Stream) Ref() error

func (*Stream) Send

func (v *Stream) Send(p []byte) (int, error)

func (*Stream) SendAll

func (v *Stream) SendAll(handler StreamSourceFunc) error

type StreamEventCallback

type StreamEventCallback func(*Stream, StreamEventType)

type StreamEventType

type StreamEventType int

type StreamFlags

type StreamFlags int

type StreamSinkFunc

type StreamSinkFunc func(*Stream, []byte) (int, error)

type StreamSourceFunc

type StreamSourceFunc func(*Stream, int) ([]byte, error)

type VcpuState

type VcpuState int

Jump to

Keyboard shortcuts

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