ARO-RP/vendor/github.com/libvirt/libvirt-go
Amber Brown 9da0248baf
vendor
2021-01-19 10:08:04 -06:00
..
.gitignore vendor updates 2019-11-20 10:01:40 -06:00
.gitlab-ci.yml vendor 2021-01-19 10:08:04 -06:00
CONTRIBUTING.rst move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
LICENSE vendor updates 2019-11-20 10:01:40 -06:00
README.rst move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
callbacks.go vendor updates 2019-11-20 10:01:40 -06:00
callbacks_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
callbacks_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
connect.go vendor 2021-01-19 10:08:04 -06:00
connect_compat.h vendor 2021-01-19 10:08:04 -06:00
connect_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
connect_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
doc.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain.go vendor 2021-01-19 10:08:04 -06:00
domain_checkpoint.go vendor 2021-01-19 10:08:04 -06:00
domain_checkpoint_compat.h make vendori & make generate 2020-12-03 14:20:23 +00:00
domain_checkpoint_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain_checkpoint_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain_compat.h vendor 2021-01-19 10:08:04 -06:00
domain_events.go vendor 2021-01-19 10:08:04 -06:00
domain_events_wrapper.go vendor 2020-11-17 09:55:36 +00:00
domain_events_wrapper.h vendor 2020-11-17 09:55:36 +00:00
domain_snapshot.go vendor 2021-01-19 10:08:04 -06:00
domain_snapshot_compat.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain_snapshot_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain_snapshot_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
domain_wrapper.go make vendori & make generate 2020-12-03 14:20:23 +00:00
domain_wrapper.h make vendori & make generate 2020-12-03 14:20:23 +00:00
error.go make vendori & make generate 2020-12-03 14:20:23 +00:00
error_compat.h make vendori & make generate 2020-12-03 14:20:23 +00:00
events.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
events_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
events_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
interface.go vendor 2021-01-19 10:08:04 -06:00
interface_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
interface_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
libvirtd.conf vendor updates 2019-11-20 10:01:40 -06:00
libvirtd.sasl vendor updates 2019-11-20 10:01:40 -06:00
lxc.go vendor updates 2019-11-20 10:01:40 -06:00
lxc_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
lxc_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
network.go vendor 2021-01-19 10:08:04 -06:00
network_compat.h vendor updates 2019-11-20 10:01:40 -06:00
network_events.go vendor updates 2019-11-20 10:01:40 -06:00
network_events_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
network_events_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
network_port.go vendor 2021-01-19 10:08:04 -06:00
network_port_compat.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
network_port_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
network_port_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
network_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
network_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
node_device.go vendor updates 2019-11-20 10:01:40 -06:00
node_device_compat.h vendor updates 2019-11-20 10:01:40 -06:00
node_device_events.go vendor updates 2019-11-20 10:01:40 -06:00
node_device_events_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
node_device_events_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
node_device_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
node_device_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
nwfilter.go vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_binding.go vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_binding_compat.h vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_binding_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_binding_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
nwfilter_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
qemu.go vendor 2021-01-19 10:08:04 -06:00
qemu_compat.h vendor updates 2019-11-20 10:01:40 -06:00
qemu_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
qemu_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
secret.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
secret_compat.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
secret_events.go vendor updates 2019-11-20 10:01:40 -06:00
secret_events_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
secret_events_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
secret_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
secret_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
storage_pool.go vendor 2021-01-19 10:08:04 -06:00
storage_pool_compat.h vendor updates 2019-11-20 10:01:40 -06:00
storage_pool_events.go vendor updates 2019-11-20 10:01:40 -06:00
storage_pool_events_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
storage_pool_events_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
storage_pool_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
storage_pool_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
storage_volume.go vendor 2021-01-19 10:08:04 -06:00
storage_volume_compat.h vendor updates 2019-11-20 10:01:40 -06:00
storage_volume_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
storage_volume_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
stream.go vendor 2021-01-19 10:08:04 -06:00
stream_compat.h vendor updates 2019-11-20 10:01:40 -06:00
stream_wrapper.go vendor updates 2019-11-20 10:01:40 -06:00
stream_wrapper.h vendor updates 2019-11-20 10:01:40 -06:00
typedparams.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
typedparams_wrapper.go move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
typedparams_wrapper.h move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00

README.rst

==========
libvirt-go
==========

.. image:: https://travis-ci.org/libvirt/libvirt-go.svg?branch=master
   :target: https://travis-ci.org/libvirt/libvirt-go
   :alt: Build Status
.. image:: https://img.shields.io/static/v1?label=godev&message=reference&color=00add8
   :target: https://pkg.go.dev/libvirt.org/libvirt-go
   :alt: API Documentation

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.

By default the binding will support APIs in libvirt.so, libvirt-qemu.so
and libvirt-lxc.so. Coverage for the latter two libraries can be dropped
from the build using build tags 'without_qemu' or 'without_lxc'
respectively.


Development status
==================

The Go API is considered to be production ready and aims to be kept
stable across future versions. Note, however, that the following
changes may apply to future versions:

* Existing structs can be augmented with new fields, but no existing
  fields will be changed / removed. New fields are needed when libvirt
  defines new typed parameters for various methods

* Any method with an 'flags uint32' parameter will have its parameter
  type changed to a specific typedef, if & when the libvirt API defines
  constants for the flags. To avoid breakage, always pass a literal
  '0' to any 'flags uint32' parameter, since this will auto-cast to
  any future typedef that is introduced.


Documentation
=============

* `API documentation for the bindings <https://pkg.go.dev/libvirt.org/libvirt-go>`_
* `API documentation for libvirt <https://libvirt.org/html/index.html>`_


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.

For more information, see the `CONTRIBUTING <CONTRIBUTING.rst>`_
file.


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``.