Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-17 Thread Osier Yang
On 2012年01月10日 06:53, Eric Blake wrote: On 01/09/2012 07:37 AM, Daniel P. Berrange wrote: On Mon, Jan 09, 2012 at 10:29:08PM +0800, Osier Yang wrote: The initial purpose was to fix a regression for detaching device, (introduced by commit ea7182c29). There was a patch posted to resolve the probl

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-10 Thread Daniel P. Berrange
On Tue, Jan 10, 2012 at 10:13:59AM -0700, Eric Blake wrote: > On 01/10/2012 09:55 AM, Daniel P. Berrange wrote: > > These 2 things feel like overloading the API with two different > > semantics. On the one hand I see a simple XML -> struct -> XML > > transformation, which is driver indepedant and

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-10 Thread Eric Blake
On 01/10/2012 09:55 AM, Daniel P. Berrange wrote: > These 2 things feel like overloading the API with two different > semantics. On the one hand I see a simple XML -> struct -> XML > transformation, which is driver indepedant and does not need to > get any HV state. I call this canonicalization

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-10 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 03:53:25PM -0700, Eric Blake wrote: > > I don't really understand what the use case is for this API, from > > the description above. Can you give an example of how, for example, > > virt-manager would use this API todo something ? > > I see several potential uses: > > 1.

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Eric Blake
On 01/09/2012 07:37 AM, Daniel P. Berrange wrote: > On Mon, Jan 09, 2012 at 10:29:08PM +0800, Osier Yang wrote: >> The initial purpose was to fix a regression for detaching device, >> (introduced by commit ea7182c29). There was a patch posted to >> resolve the problem: >> >> https://www.redhat.com/

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 10:29:08PM +0800, Osier Yang wrote: > The initial purpose was to fix a regression for detaching device, > (introduced by commit ea7182c29). There was a patch posted to > resolve the problem: > > https://www.redhat.com/archives/libvir-list/2011-December/msg00818.html > > Bu

[libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Osier Yang
The initial purpose was to fix a regression for detaching device, (introduced by commit ea7182c29). There was a patch posted to resolve the problem: https://www.redhat.com/archives/libvir-list/2011-December/msg00818.html But as Eric suggested, it's not the ideal way to go, we never known how many