Re: [libvirt-glib] gconfig: API for SPICE image compression options

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

 



On Tue, Mar 12, 2013 at 06:28:36PM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Mar 12, 2013 at 3:16 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> > On Sat, Mar 09, 2013 at 04:44:14PM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> >>
> >> This patch adds API to set/get image compression options on
> >> domain/graphics[@type='spice'] nodes.
> >>
> >> Also included are simple tests for this API.
> >
> > Do we really need a dedicated gobject for this? I would have gone with
> > gvir_config_domain_graphics_spice_[gs]et_image_compression()
> 
> It would have been easier to go w/o a separate object but I went this
> way since 'image' is a separate node in the config and I would assume
> its for a reason. One reason that comes to mind is that in future
> there might be some other options being added here?

We don't always go with 'one node' = 'one class', see the <os> node for
example, or gvir_config_domain_disk_set_startup_policy (various other
similar examples in this case).
For xml nodes that are very simple, they generally are modelled along with
the parent node, we can always deprecate the simple setter in the parent
node if the node gets more complex in the future.
It's something to decide on a case by case basis, but here I'd tend to go
with the simpler approach.

Christophe

Attachment: pgp5KH51uhKhb.pgp
Description: PGP signature

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