ruby-libvirt
============

Ruby bindings for libvirt (https://libvirt.org)

Usage
-----

In your ruby code, do a "require 'libvirt'"; to obtain a connection, use
'Libvirt::open' or 'Libvirt::open_read_only'. See tests/*.rb for more
examples.

Hacking
-------

On a Fedora machine, run
  yum install libvirt-devel ruby-devel rubygem-rake
and then
  rake build
  rake test

To run against the checkout, make sure you set RUBYLIB (assuming DIR is the
toplevel of your source checkout):

  export RUBYLIB=$dir/lib:$dir/ext/libvirt
  ruby -rlibvirt -e 'puts Libvirt::version[0]'

Notes
-----
As of October 26, 2013, the ruby-libvirt bindings support all of the libvirt
APIs up to libvirt commit hash b695aeebd52bcbd0d260893bddd5bfe1e486e980
with the following exceptions:

VIR_DOMAIN_LAST
VIR_DOMAIN_NOSTATE_LAST
VIR_DOMAIN_RUNNING_LAST
VIR_DOMAIN_BLOCKED_LAST
VIR_DOMAIN_PAUSED_LAST
VIR_DOMAIN_SHUTDOWN_LAST
VIR_DOMAIN_SHUTOFF_LAST
VIR_DOMAIN_CRASHED_LAST
VIR_DOMAIN_PMSUSPENDED_LAST
VIR_DOMAIN_PMSUSPENDED_DISK_LAST
VIR_DOMAIN_CONTROL_LAST
VIR_DOMAIN_NONE
VIR_NODE_SUSPEND_TARGET_LAST
VIR_TYPED_PARAM_LAST
VIR_TYPED_PARAM_STRING_OKAY
VIR_DOMAIN_MEMORY_STAT_NR
VIR_DOMAIN_MEMORY_STAT_LAST
VIR_CRED_LAST
VIR_EXPORT_VAR
VIR_CONNECT_CLOSE_REASON_ERROR
VIR_CONNECT_CLOSE_REASON_EOF
VIR_CONNECT_CLOSE_REASON_KEEPALIVE
VIR_CONNECT_CLOSE_REASON_CLIENT
VIR_CONNECT_CLOSE_REASON_LAST
VIR_DOMAIN_NUMATUNE_MEM_STRICT
VIR_DOMAIN_NUMATUNE_MEM_PREFERRED
VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE
VIR_DOMAIN_NUMATUNE_MEM_LAST
VIR_DOMAIN_METADATA_LAST
VIR_VCPU_LAST
VIR_DOMAIN_BLOCK_JOB_TYPE_LAST
VIR_DOMAIN_DISK_ERROR_LAST
VIR_NETWORK_UPDATE_COMMAND_LAST
VIR_NETWORK_SECTION_LAST
VIR_STORAGE_POOL_STATE_LAST
VIR_STORAGE_VOL_LAST
VIR_STORAGE_VOL_WIPE_ALG_LAST
VIR_KEYCODE_SET_LAST
VIR_DOMAIN_PROCESS_SIGNAL_LAST
VIR_DOMAIN_EVENT_LAST
VIR_DOMAIN_EVENT_DEFINED_LAST
VIR_DOMAIN_EVENT_UNDEFINED_LAST
VIR_DOMAIN_EVENT_STARTED_LAST
VIR_DOMAIN_EVENT_SUSPENDED_LAST
VIR_DOMAIN_EVENT_RESUMED_LAST
VIR_DOMAIN_EVENT_STOPPED_LAST
VIR_DOMAIN_EVENT_SHUTDOWN_LAST
VIR_DOMAIN_EVENT_PMSUSPENDED_LAST
VIR_DOMAIN_EVENT_CRASHED_LAST
VIR_SECRET_USAGE_TYPE_LAST
VIR_CPU_COMPARE_LAST
VIR_DOMAIN_JOB_LAST
VIR_DOMAIN_EVENT_WATCHDOG_LAST
VIR_DOMAIN_EVENT_IO_ERROR_LAST
VIR_DOMAIN_EVENT_GRAPHICS_LAST
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST
VIR_DOMAIN_BLOCK_JOB_LAST
VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START
VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START
VIR_DOMAIN_EVENT_DISK_CHANGE_LAST
VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN
VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE
VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
VIR_DOMAIN_EVENT_ID_BLOCK_JOB
VIR_DOMAIN_EVENT_ID_DISK_CHANGE
VIR_DOMAIN_EVENT_ID_TRAY_CHANGE
VIR_DOMAIN_EVENT_ID_PMWAKEUP
VIR_DOMAIN_EVENT_ID_PMSUSPEND
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE
VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK
VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED
VIR_DOMAIN_EVENT_ID_LAST
VIR_DOMAIN_BLKIO_PARAM_INT
VIR_DOMAIN_BLKIO_PARAM_UINT
VIR_DOMAIN_BLKIO_PARAM_LLONG
VIR_DOMAIN_BLKIO_PARAM_ULLONG
VIR_DOMAIN_BLKIO_PARAM_DOUBLE
VIR_DOMAIN_BLKIO_PARAM_BOOLEAN
VIR_DOMAIN_MEMORY_PARAM_INT
VIR_DOMAIN_MEMORY_PARAM_UINT
VIR_DOMAIN_MEMORY_PARAM_LLONG
VIR_DOMAIN_MEMORY_PARAM_ULLONG
VIR_DOMAIN_MEMORY_PARAM_DOUBLE
VIR_DOMAIN_MEMORY_PARAM_BOOLEAN
VIR_DEPRECATED
VIR_DEPRECATED
VIR_EXPORT_VAR
VIR_EXPORT_VAR
VIR_EXPORT_VAR
VIR_EXPORT_VAR
VIR_SECURITY_LABEL_BUFLEN
VIR_SECURITY_MODEL_BUFLEN
VIR_SECURITY_DOI_BUFLEN
VIR_NODE_CPU_STATS_FIELD_LENGTH
VIR_NODE_CPU_STATS_KERNEL
VIR_NODE_CPU_STATS_USER
VIR_NODE_CPU_STATS_IDLE
VIR_NODE_CPU_STATS_IOWAIT
VIR_NODE_CPU_STATS_UTILIZATION
VIR_NODE_MEMORY_STATS_FIELD_LENGTH
VIR_NODE_MEMORY_STATS_TOTAL
VIR_NODE_MEMORY_STATS_FREE
VIR_NODE_MEMORY_STATS_BUFFERS
VIR_NODE_MEMORY_STATS_CACHED
VIR_DOMAIN_BLOCK_STATS_FIELD_LENGTH
VIR_DOMAIN_BLOCK_STATS_READ_BYTES
VIR_DOMAIN_BLOCK_STATS_READ_REQ
VIR_DOMAIN_BLOCK_STATS_READ_TOTAL_TIMES
VIR_DOMAIN_BLOCK_STATS_WRITE_BYTES
VIR_DOMAIN_BLOCK_STATS_WRITE_REQ
VIR_DOMAIN_BLOCK_STATS_WRITE_TOTAL_TIMES
VIR_DOMAIN_BLOCK_STATS_FLUSH_REQ
VIR_DOMAIN_BLOCK_STATS_FLUSH_TOTAL_TIMES
VIR_DOMAIN_BLOCK_STATS_ERRS
VIR_UUID_BUFLEN
LIBVIR_VERSION_NUMBER
VIR_DOMAIN_CPU_STATS_CPUTIME
VIR_DOMAIN_CPU_STATS_USERTIME
VIR_DOMAIN_CPU_STATS_SYSTEMTIME
VIR_DOMAIN_CPU_STATS_VCPUTIME
VIR_UNUSE_CPU
VIR_COPY_CPUMAP
VIR_GET_CPUMAP
VIR_DOMAIN_SEND_KEY_MAX_KEYS
VIR_DOMAIN_JOB_TIME_ELAPSED
VIR_DOMAIN_JOB_TIME_REMAINING
VIR_DOMAIN_JOB_DOWNTIME
VIR_DOMAIN_JOB_DATA_TOTAL
VIR_DOMAIN_JOB_DATA_PROCESSED
VIR_DOMAIN_JOB_DATA_REMAINING
VIR_DOMAIN_JOB_MEMORY_TOTAL
VIR_DOMAIN_JOB_MEMORY_PROCESSED
VIR_DOMAIN_JOB_MEMORY_REMAINING
VIR_DOMAIN_JOB_MEMORY_CONSTANT
VIR_DOMAIN_JOB_MEMORY_NORMAL
VIR_DOMAIN_JOB_MEMORY_NORMAL_BYTES
VIR_DOMAIN_JOB_DISK_TOTAL
VIR_DOMAIN_JOB_DISK_PROCESSED
VIR_DOMAIN_JOB_DISK_REMAINING
VIR_DOMAIN_JOB_COMPRESSION_CACHE
VIR_DOMAIN_JOB_COMPRESSION_BYTES
VIR_DOMAIN_JOB_COMPRESSION_PAGES
VIR_DOMAIN_JOB_COMPRESSION_CACHE_MISSES
VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW
VIR_DOMAIN_SCHED_FIELD_LENGTH
VIR_DOMAIN_BLKIO_FIELD_LENGTH
VIR_DOMAIN_MEMORY_FIELD_LENGTH
virTypedParamsGet
virTypedParamsGetInt
virTypedParamsGetUInt
virTypedParamsGetLLong
virTypedParamsGetULLong
virTypedParamsGetDouble
virTypedParamsGetBoolean
virTypedParamsGetString
virTypedParamsAddInt
virTypedParamsAddUInt
virTypedParamsAddLLong
virTypedParamsAddULLong
virTypedParamsAddDouble
virTypedParamsAddBoolean
virTypedParamsAddString
virTypedParamsAddFromString
virTypedParamsClear
virConnectRef
virConnectRegisterCloseCallback
virConnectUnregisterCloseCallback
virDomainGetConnect
virDomainRef
virDomainRestoreFlags
virNetworkGetConnect
virNetworkRef
virInterfaceGetConnect
virInterfaceRef
virStoragePoolGetConnect
virStorageVolGetConnect
virStorageVolRef
virNodeDeviceRef
virSecretGetConnect
virSecretRef
virStreamRef
virDomainSnapshotGetDomain
virDomainSnapshotGetConnect
virDomainSnapshotRef
virNWFilterRef
VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN
