* Generate the remaining consts.
There were a number of hand-written consts in go-libvirt, including flag
values for various libvirt functions. Remove these and generate them
instead, so that we now have a complete set, and the naming is
consistent. I used c-for-go to do this generation, but turned off any
cgo usage by the generated code - we don't want or need to introduce a
dependency on cgo just to get constants from C headers. All code is
still generated using 'go generate ./...', which now calls a wrapper
script for added robustness.
This change also returns to using Go types for flags for most libvirt
functions, instead of plain integers.
* prevent connection write collisions
When multiple calls are made on the same connection, it's possible for
the writes to collide with each other. This adds a write mutex when
communicating with the libvirt daemon.
This adds a new method, Capabilities(), which returns an XML
definition of the hypervisor's system capabilities, much like
`virsh capabilities`.
I've only included integration tests for these two methods due to the
large amount of data returned by the capabilities call.
This adds support for dumping a domain's XML definition, akin to `virsh
dumpxml <domain>`. The returned data is quite large so I've included an
integration test rather than adding a huge blob of hex to `libvirttest`.
This modifies the travis-ci configuration to build and install libvirt
1.2.2 and 2.3.0 for integration testing. Simple integration tests have
been included for Connect() and Disconnect().