]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: fix title and description for virDomainSetMetadata API
authorPavel Hrdina <phrdina@redhat.com>
Wed, 27 Feb 2019 14:52:45 +0000 (15:52 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 8 Mar 2019 13:59:20 +0000 (14:59 +0100)
commite387afeb9a148c5b1bb33fce5b0243369b74ceee
tree98d3a72f8cc089b39531437f5da5ee20dafeeb6c
parentd38d512f4ec4604569bd08e695673abf6017895f
conf: fix title and description for virDomainSetMetadata API

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.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1518042

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c
tests/metadatatest.c