On 2/27/19 10:01 AM, Pavel Hrdina wrote:
If we pass XML to virDomainDefineXML API with these two elements:
...
<title></title>
<description></description>
...
libvirt correctly ignores these two elements and they will not appear
in the parsed XML.
However, if we use virDomainSetMetadata API and with "" as value for
title or description we will end up with the parsed XML that contains
these empty elements.
Let's fix the behavior of this API to behave the same as
virDomainDefineXML.
virDomainDefParseXML via interaction with virXPathString which ignores
empty strings.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1518042
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 6 +++---
tests/metadatatest.c | 23 ++++++++++++++++-------
2 files changed, 19 insertions(+), 10 deletions(-)
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
John