1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00
one/share/schemas/libvirt/domaincheckpoint.rng
Ruben S. Montero b22c569ab2
F #3953: Add RAW validator for KVM
- VirtualMachine
  - VMTemplate
  - Add libvirt rng files

co-authored-by: Christian González <cgonzalez@opennebula.io>
2020-05-18 02:23:29 +02:00

95 lines
2.5 KiB
XML

<?xml version='1.0'?>
<!-- A Relax NG schema for the libvirt domain checkpoint properties XML format -->
<grammar xmlns='http://relaxng.org/ns/structure/1.0' datatypeLibrary='http://www.w3.org/2001/XMLSchema-datatypes'>
<start>
<ref name='domaincheckpoint'/>
</start>
<include href='domaincommon.rng'/>
<define name='domaincheckpoint'>
<element name='domaincheckpoint'>
<interleave>
<optional>
<element name='name'>
<ref name='checkpointName'/>
</element>
</optional>
<optional>
<element name='description'>
<text/>
</element>
</optional>
<optional>
<element name='creationTime'>
<ref name='unsignedLong'/>
</element>
</optional>
<optional>
<element name='disks'>
<oneOrMore>
<ref name='diskcheckpoint'/>
</oneOrMore>
</element>
</optional>
<optional>
<!-- Nested grammar ensures that any of our overrides of
storagecommon/domaincommon defines do not conflict
with any domain.rng overrides. -->
<grammar>
<include href='domain.rng'/>
</grammar>
</optional>
<optional>
<element name='parent'>
<element name='name'>
<ref name='checkpointName'/>
</element>
</element>
</optional>
</interleave>
</element>
</define>
<define name='diskcheckpoint'>
<element name='disk'>
<attribute name='name'>
<choice>
<ref name='diskTarget'/>
<ref name='absFilePath'/>
</choice>
</attribute>
<choice>
<attribute name='checkpoint'>
<value>no</value>
</attribute>
<group>
<optional>
<attribute name='checkpoint'>
<value>bitmap</value>
</attribute>
</optional>
<optional>
<attribute name='bitmap'>
<text/>
</attribute>
</optional>
<optional>
<attribute name='size'>
<ref name='unsignedLong'/>
</attribute>
</optional>
</group>
</choice>
</element>
</define>
<define name='checkpointName'>
<data type='string'>
<!-- Notably: no leading '.' and no embedded '/' or newline -->
<param name='pattern'>[a-zA-Z0-9_\-][a-zA-Z0-9_\-.]*</param>
</data>
</define>
</grammar>