On Tue, Apr 11, 2017 at 05:53:52PM +0200, Peter Krempa wrote:
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 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
tools/virsh-util.h | 20 ++++++++++++++++++++
2 files changed, 68 insertions(+)
ACK
Jan