Re: [PATCH v2 13/29] conf: Merge virDomainStorageSourceFormat into virDomainDiskSourceFormat

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

 



On Thu, Apr 04, 2019 at 15:29:30 -0500, Eric Blake wrote:
> On 4/4/19 3:16 PM, Eric Blake wrote:
> > On 3/22/19 1:00 PM, Peter Krempa wrote:
> >> There was only one caller, remove the unnecessary wrapper.
> >>
> >> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> >> ---
> >>  src/conf/domain_conf.c | 60 ++++++++++++++++--------------------------
> >>  1 file changed, 23 insertions(+), 37 deletions(-)
> > 
> > Alas, my backup code wants to be a second caller.
> > https://www.redhat.com/archives/libvir-list/2019-March/msg00393.html
> > 
> > virDomainStorageSourceFormat was a nice independent function that did
> > not care what element it was being formatted to;
> > virDomainDiskSourceFormat always formats into <disk ....>.
> > 
> > But backup wants to format into <target> (push mode) or <scratch> (pull
> > mode). So I'll be including a revert of this patch in my next round of
> > incremental backup patches.
> 
> Or maybe just tweaking it to add a parameter that says what string name
> to use for the overall element.

I prefer this one. If you need the element to be something else than
'source' please add a parameter.

Passing back a buffer was a somewhat failed experiment which allowed to
merge 'type' and 'format' attributes into the <source> (or equivalent)
element.

This design enforces users to add a wrapper element similarly to what
other XMLs are having. Original idea was to simplify thing but the
parser didn't turn out simpler at all and all the old XML design can't
be changed anyways.

Attachment: signature.asc
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]

  Powered by Linux