[libvirt] [PATCH 0/8] Normalization API

Eric Blake eblake at redhat.com
Wed Sep 18 15:52:20 UTC 2013


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 and do a strcmp of the xml before the
>> user's edits and after the normalization of the edits, we can more
>> easily warn the user that not all their edits can be honored, and give
>> them a chance to try again.
> 
> That's a job for RNG schema validation IMHO.  Round-tripping XML and
> doing a strcmp is really poor-mans schema validation.

Okay, but then see my comment on 3/8 that we should have one of the
'flags' values be supported for additionally requesting programmatic RNG
validation as part of the normalization efforts.  Seen in that light,
'virsh edit' should not do a strcmp of the round trip, but should
instead use the 'RNG_VALIDATE' flag - and can then alert the user to any
situation where the domain is invalid because of unknown elements.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130918/166c74ae/attachment-0001.sig>


More information about the libvir-list mailing list