On Tue, Jan 31, 2012 at 12:11:31PM +0000, Daniel P. Berrange wrote: > On Tue, Jan 31, 2012 at 12:02:05PM +0100, Christophe Fergeau wrote: > > Based on a patch from Zeeshan Ali (Khattak) <zeeshanak@xxxxxxxxx> > > --- > > libvirt-gconfig/libvirt-gconfig-domain.c | 60 +++++++++++++++++++++ > > libvirt-gconfig/libvirt-gconfig-domain.h | 7 +++ > > libvirt-gconfig/libvirt-gconfig-helpers-private.h | 1 + > > libvirt-gconfig/libvirt-gconfig-helpers.c | 23 ++++++++- > > libvirt-gconfig/libvirt-gconfig-object-private.h | 3 + > > libvirt-gconfig/libvirt-gconfig-object.c | 20 +++++++ > > libvirt-gconfig/libvirt-gconfig.sym | 2 + > > 7 files changed, 115 insertions(+), 1 deletions(-) > > ACK, if one question is answered. > > > diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c > > index 61af625..606f5a4 100644 > > --- a/libvirt-gconfig/libvirt-gconfig-domain.c > > +++ b/libvirt-gconfig/libvirt-gconfig-domain.c > > @@ -449,3 +449,63 @@ GList *gvir_config_domain_get_devices(GVirConfigDomain *domain) > > > > return data.devices; > > } > > + > > +gboolean gvir_config_domain_set_custom_xml(GVirConfigDomain *domain, > > + const gchar *xml, > > + const gchar *ns, > > + const gchar *ns_uri, > > + GError **error) > > +{ > > + GVirConfigObject *metadata; > > + GVirConfigObject *custom_xml; > > + > > + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain), FALSE); > > + g_return_val_if_fail(xml != NULL, FALSE); > > Shouldn't we allow NULL 'xml' here, as a means to remove the existing > element under that namespace ? Alternatively we can add an explicit > API to delete custom XML nodes. Allowing NULL makes sense, I'll look at changing that. Christophe
Attachment:
pgp0QFtJMqYep.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list