[libvirt] [PATCH 3/6] conf: tighten <domainsnapshot> schema

Eric Blake eblake at redhat.com
Mon Apr 14 16:48:36 UTC 2014


On 04/12/2014 08:27 PM, Eric Blake wrote:
> This patch is my first experience playing with nested grammars,
> as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR.
> I plan on doing more overrides in order to make the RelaxNG
> grammar mirror the C code refactoring into a common
> virStorageSource, but where different clients of that source do
> not support the same subset of functionality.  By starting with
> something fairly easy to validate, I can make sure my later
> patches will be possible.
> 
> One way to test this patch: s/qed/raw/ in the file
> tests/domainsnapshotxml2xmlin/disk_snapshot.xml, then run
> make -C tests check TESTS=domainsnapshotschematest.  Pre-patch,
> the file will pass the schema, even though attempts to use that
> description with virDomainSnapshotCreateXML will fail because
> raw files cannot have a backing store.  Post-patch, the file
> will fail virt-xml-validate.
> 
> * docs/schemas/domainsnapshot.rng (domain): Use nested grammar
> to avoid restricting <domain>.
> (storageFormat): Override for tighter usage.
> * docs/schemas/storagecommon.rng (startupPolicy): Create a no-op
> default.
> * docs/schemas/domaincommon.rng (storageFormat): Cross-reference.
> (startupPolicy): Move the non-trivial define...
> * docs/schemas/domain.rng (startupPolicy): ...here.

Please wait for a v2 on this patch; I'm running into issues with
storageFormat that need to be resolved in a better way.

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140414/4a9ffe8a/attachment-0001.sig>


More information about the libvir-list mailing list