Re: [PATCH] conf: fix title and description for virDomainSetMetadata API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c |  6 +++---
>  tests/metadatatest.c   | 23 ++++++++++++++++-------
>  2 files changed, 19 insertions(+), 10 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux