Re: [libvirt-glib 00/24] libvirt-gconfig patches

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

 



On Fri, Oct 7, 2011 at 12:40 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> Hi,

  Hello,

> While writing this code, there were at least 2 questions that arose,
> some input would be welcome :)
>
> * I don't know how to handle XMLs where the same node appears multiple
>  times (eg "name"). If it's the latest name that wins, what do we do when
>  changing the name on such an XML document? only modify the last name node?
>  Drop all the redundant name nodes?

  I would say take the first one only and set just that.

> * I'm also not sure how to make it possible to check whether a given
>  property is set or not. For strings, this is easy, NULL means that the
>  property was not set, but for integers, this is less obvious. Any thoughts on
>  that?

  For many properties (e.g cpu freq, ram, storage size etc) I think a
negative value (-1) would do, for others we can choose an insane
number like -G_MAXINT for example. Not sure about booleans though. Do
we really need to check if value is provided btw? AFAIK, every
node/attribute has a default value.

> Next I'll have to start looking at more complicated properties :) More API
> questions on the way I guess...

  Awesome! Maybe its much more sooner that I starting really using the
gconfig part then. :)

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

--
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]