Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Cole Robinson
On 09/17/2013 10:46 AM, Michal Privoznik wrote: A while ago I've invented this vshCompleteXMLFromDomain() function to increase device-detach intelligence. Basically, it took user's XML and tried to find matching device in domain's XML. However, it was kind of buggy - finding the matching

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Eric Blake
On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other application ever want to use this API? Yes, I can envision other use cases. In fact, virt-manager is one of them:

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Eric Blake
On 09/18/2013 09:38 AM, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other application ever want to use this API? Yes, I can envision other use

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Daniel P. Berrange
On Wed, Sep 18, 2013 at 09:41:40AM -0600, Eric Blake wrote: On 09/18/2013 09:38 AM, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Daniel P. Berrange
On Wed, Sep 18, 2013 at 09:38:23AM -0600, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other application ever want to use this API? Yes, I

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Cole Robinson
On 09/18/2013 11:38 AM, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other application ever want to use this API? Yes, I can envision other use

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Daniel P. Berrange
On Wed, Sep 18, 2013 at 11:55:39AM -0400, Cole Robinson wrote: On 09/18/2013 11:43 AM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 09:38:23AM -0600, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Cole Robinson
On 09/18/2013 11:43 AM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 09:38:23AM -0600, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do we really need to add an API to facilitate the crappy interface that is virsh detach-device? Will any other

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Cole Robinson
On 09/18/2013 12:02 PM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 11:55:39AM -0400, Cole Robinson wrote: On 09/18/2013 11:43 AM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 09:38:23AM -0600, Eric Blake wrote: On 09/18/2013 09:32 AM, Cole Robinson wrote: Seems overkill IMO. Do

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Daniel P. Berrange
On Wed, Sep 18, 2013 at 12:05:03PM -0400, Cole Robinson wrote: On 09/18/2013 12:02 PM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 11:55:39AM -0400, Cole Robinson wrote: On 09/18/2013 11:43 AM, Daniel P. Berrange wrote: On Wed, Sep 18, 2013 at 09:38:23AM -0600, Eric Blake wrote: On

Re: [libvirt] [PATCH 0/8] Normalization API

2013-09-18 Thread Eric Blake
On 09/18/2013 09:43 AM, Daniel P. Berrange wrote: In fact, I'd love to have 'virsh edit' and friends take advantage of normalization. Right now, if you run 'virsh edit' and type in something that libvirt doesn't recognize, it gets silently discarded; but if we add normalization into the mix

[libvirt] [PATCH 0/8] Normalization API

2013-09-17 Thread Michal Privoznik
A while ago I've invented this vshCompleteXMLFromDomain() function to increase device-detach intelligence. Basically, it took user's XML and tried to find matching device in domain's XML. However, it was kind of buggy - finding the matching device uses string comparison. This works on text values.