]> xenbits.xensource.com Git - libvirt.git/commit
virsh: add helpers for getting domain XML for XPath purposes
authorPeter Krempa <pkrempa@redhat.com>
Tue, 11 Apr 2017 14:51:32 +0000 (16:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 12 Apr 2017 12:12:56 +0000 (14:12 +0200)
commitc8a637c7d03b0c9211cbe16d9d88911c495e7162
tree365f24025af8ab463e5e176c30c624b4d850eb30
parent4f4c3b1397c4b5d16af75ddf9e1f087844904655
virsh: add helpers for getting domain XML for XPath purposes

In virsh we quite often get the domain XML just to initialize the XPath
parser so that we can extract information.

Add helpers which will simplify this by wrapping the getting of the XML
and parsing it along with error reporting.

Additionally a second helper also gets the domain object from the
parameters and releases it so that functions which need the XML as only
source of data can be simplified further.
tools/virsh-util.c
tools/virsh-util.h