Re: [PATCH 0/8] Normalization API

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

 



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 cases.  In fact, virt-manager is one of them:
> 
> Oftentimes, we add features to XML, but you don't have an easy way to
> probe if the feature is supported.  Rather than complicate the (already
> large) capabilities xml to call out yet more features, it is rather
> simple to write up XML that tries to use the feature, then run it
> through the normalizing API, then look at the result.  If the feature is
> still present in the output, then libvirt understands the feature (and
> you can safely use it); if the feature got stripped as unrecognized,
> then you can issue a much nicer error message to the user stating that
> the libvirtd on the other end of the connection can't honor the user's
> request.
> 

That sounds very painful: form XML, make API call, parse XML, examine every
suspect parameter to see if it changed, report an error that libvirt can
already give us. It also doesn't help us do something like 'list all disk
cache modes this connection supports' or similar without doing multiple API
calls, and would still require virt-manager to hardcode values just to probe
for them.

- Cole

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