2013-01-23 19:03:17 +04:00
<?xml version="1.0"?>
2009-08-05 13:56:56 +04:00
<!-- A Relax NG schema for the libvirt capabilities XML format -->
2009-01-27 18:29:53 +03:00
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2012-03-06 18:08:02 +04:00
<include href='basictypes.rng'/>
2009-01-27 18:29:53 +03:00
<start>
<ref name='capabilities'/>
</start>
<define name='capabilities'>
<element name='capabilities'>
<ref name='hostcaps'/>
<zeroOrMore>
2010-03-01 22:09:26 +03:00
<ref name='guestcaps'/>
2009-01-27 18:29:53 +03:00
</zeroOrMore>
</element>
</define>
<define name='hostcaps'>
<element name='host'>
2010-05-25 18:33:51 +04:00
<optional>
<element name='uuid'>
<ref name='UUID'/>
</element>
</optional>
2009-01-27 18:29:53 +03:00
<element name='cpu'>
2010-03-01 22:09:26 +03:00
<element name='arch'>
<ref name='archnames'/>
</element>
<optional>
<ref name='cpufeatures'/>
</optional>
<optional>
<ref name='cpuspec'/>
</optional>
2009-01-27 18:29:53 +03:00
</element>
2011-11-22 07:31:22 +04:00
<optional>
<ref name='power_management'/>
</optional>
2009-01-27 18:29:53 +03:00
<optional>
2010-03-01 22:09:26 +03:00
<ref name='migration'/>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<ref name='topology'/>
2009-01-27 18:29:53 +03:00
</optional>
2012-08-16 02:10:36 +04:00
<zeroOrMore>
2010-03-01 22:09:26 +03:00
<ref name='secmodel'/>
2012-08-16 02:10:36 +04:00
</zeroOrMore>
2009-03-03 12:44:41 +03:00
</element>
</define>
<define name='secmodel'>
<element name='secmodel'>
2012-08-16 02:10:36 +04:00
<interleave>
<element name='model'>
<text/>
</element>
<element name='doi'>
<text/>
</element>
2013-10-18 16:13:21 +04:00
<zeroOrMore>
<element name='baselabel'>
<attribute name='type'>
<text/>
</attribute>
<text/>
</element>
</zeroOrMore>
2012-08-16 02:10:36 +04:00
</interleave>
2009-01-27 18:29:53 +03:00
</element>
</define>
2009-03-03 12:44:41 +03:00
2009-01-27 18:29:53 +03:00
<define name='cpufeatures'>
<element name='features'>
<optional>
2010-03-01 22:09:26 +03:00
<element name='pae'><empty/></element>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<element name='nonpae'><empty/></element>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<element name='vmx'><empty/></element>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<element name='svm'><empty/></element>
2009-01-27 18:29:53 +03:00
</optional>
</element>
</define>
2009-12-18 16:37:09 +03:00
<define name='cpuspec'>
<element name='model'>
<text/>
</element>
2010-07-02 19:51:59 +04:00
<optional>
<element name='vendor'>
<text/>
</element>
</optional>
2009-12-18 16:37:09 +03:00
<element name='topology'>
<attribute name='sockets'>
<ref name='positiveInteger'/>
</attribute>
<attribute name='cores'>
<ref name='positiveInteger'/>
</attribute>
<attribute name='threads'>
<ref name='positiveInteger'/>
</attribute>
</element>
<zeroOrMore>
<element name='feature'>
<attribute name='name'>
<ref name='featureName'/>
</attribute>
<empty/>
</element>
</zeroOrMore>
</define>
2011-11-22 07:31:22 +04:00
<define name='power_management'>
<element name='power_management'>
<interleave>
<optional>
2011-11-29 18:14:03 +04:00
<element name='suspend_mem'>
2011-11-22 07:31:22 +04:00
<empty/>
</element>
</optional>
<optional>
2011-11-29 18:14:03 +04:00
<element name='suspend_disk'>
2011-11-22 07:31:22 +04:00
<empty/>
</element>
</optional>
2011-11-29 10:56:10 +04:00
<optional>
2011-11-29 18:14:03 +04:00
<element name='suspend_hybrid'>
2011-11-29 10:56:10 +04:00
<empty/>
</element>
</optional>
2011-11-22 07:31:22 +04:00
</interleave>
</element>
</define>
2009-01-27 18:29:53 +03:00
<define name='migration'>
<element name='migration_features'>
<optional>
2010-03-01 22:09:26 +03:00
<element name='live'>
<empty/>
</element>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<element name='uri_transports'>
<oneOrMore>
<element name='uri_transport'>
<choice>
<value>esx</value>
<value>tcp</value>
<value>xenmigr</value>
</choice>
</element>
</oneOrMore>
</element>
2009-01-27 18:29:53 +03:00
</optional>
</element>
</define>
<define name='topology'>
<element name='topology'>
<element name='cells'>
2010-03-01 22:09:26 +03:00
<attribute name='num'>
2012-03-06 18:08:02 +04:00
<ref name='unsignedInt'/>
2010-03-01 22:09:26 +03:00
</attribute>
<oneOrMore>
<ref name='cell'/>
</oneOrMore>
2009-01-27 18:29:53 +03:00
</element>
</element>
</define>
<define name='cell'>
<element name='cell'>
<attribute name='id'>
2012-03-06 18:08:02 +04:00
<ref name='unsignedInt'/>
2009-01-27 18:29:53 +03:00
</attribute>
2013-03-07 20:03:36 +04:00
<optional>
<ref name='memory'/>
</optional>
2014-06-03 17:18:27 +04:00
<optional>
<element name='distances'>
<zeroOrMore>
<element name='sibling'>
<attribute name='id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='value'>
<ref name='unsignedInt'/>
</attribute>
</element>
</zeroOrMore>
</element>
</optional>
2009-01-27 18:29:53 +03:00
<optional>
2010-03-01 22:09:26 +03:00
<element name='cpus'>
<attribute name='num'>
2012-03-06 18:08:02 +04:00
<ref name='unsignedInt'/>
2010-03-01 22:09:26 +03:00
</attribute>
<oneOrMore>
<ref name='cpu'/>
</oneOrMore>
</element>
2009-01-27 18:29:53 +03:00
</optional>
</element>
</define>
2013-03-07 20:03:36 +04:00
<define name='memory'>
<element name='memory'>
<ref name='scaledInteger'/>
</element>
</define>
2009-01-27 18:29:53 +03:00
<define name='cpu'>
<element name='cpu'>
<attribute name='id'>
2012-03-06 18:08:02 +04:00
<ref name='unsignedInt'/>
2009-01-27 18:29:53 +03:00
</attribute>
2013-01-18 22:30:00 +04:00
<optional>
<attribute name='socket_id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='core_id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='siblings'>
<ref name='cpuset'/>
</attribute>
</optional>
2009-01-27 18:29:53 +03:00
</element>
</define>
<define name='guestcaps'>
<element name='guest'>
<ref name='ostype'/>
<ref name='arch'/>
<optional>
2010-03-01 22:09:26 +03:00
<ref name='features'/>
2009-01-27 18:29:53 +03:00
</optional>
</element>
</define>
<define name='ostype'>
<element name='os_type'>
<choice>
2010-03-01 22:09:26 +03:00
<value>xen</value> <!-- Xen 3.0 pv -->
<value>linux</value> <!-- same as 'xen' - legacy -->
<value>hvm</value> <!-- unmodified OS -->
<value>exe</value> <!-- For container based virt -->
<value>uml</value> <!-- user mode linux -->
2009-01-27 18:29:53 +03:00
</choice>
</element>
</define>
<define name='arch'>
<element name='arch'>
<attribute name='name'>
2010-03-01 22:09:26 +03:00
<ref name='archnames'/>
2009-01-27 18:29:53 +03:00
</attribute>
<ref name='wordsize'/>
<optional>
2010-03-01 22:09:26 +03:00
<ref name='emulator'/>
2009-01-27 18:29:53 +03:00
</optional>
<optional>
2010-03-01 22:09:26 +03:00
<ref name='loader'/>
2009-01-27 18:29:53 +03:00
</optional>
<zeroOrMore>
2010-03-01 22:09:26 +03:00
<ref name='machine'/>
2009-01-27 18:29:53 +03:00
</zeroOrMore>
<oneOrMore>
2010-03-01 22:09:26 +03:00
<ref name='domain'/>
2009-01-27 18:29:53 +03:00
</oneOrMore>
</element>
</define>
<define name='emulator'>
<element name='emulator'>
2012-03-06 18:08:02 +04:00
<ref name='absFilePath'/>
2009-01-27 18:29:53 +03:00
</element>
</define>
<define name='loader'>
<element name='loader'>
2012-03-06 18:08:02 +04:00
<ref name='absFilePath'/>
2009-01-27 18:29:53 +03:00
</element>
</define>
<define name='wordsize'>
<element name='wordsize'>
<choice>
2010-03-01 22:09:26 +03:00
<value>31</value>
<value>32</value>
<value>64</value>
2009-01-27 18:29:53 +03:00
</choice>
</element>
</define>
<define name='machine'>
<element name='machine'>
2009-07-23 21:31:35 +04:00
<optional>
<attribute name='canonical'>
<text/>
</attribute>
</optional>
2013-06-26 19:46:35 +04:00
<optional>
<attribute name='maxCpus'>
<ref name='unsignedInt'/>
</attribute>
</optional>
2009-01-27 18:29:53 +03:00
<text/>
</element>
</define>
<define name='domain'>
<element name='domain'>
<attribute name='type'>
2010-03-01 22:09:26 +03:00
<choice>
<value>qemu</value>
<value>kqemu</value>
<value>kvm</value>
<value>xen</value>
<value>uml</value>
<value>lxc</value>
<value>openvz</value>
<value>test</value>
</choice>
2009-01-27 18:29:53 +03:00
</attribute>
<optional>
2010-03-01 22:09:26 +03:00
<ref name='emulator'/>
2009-01-27 18:29:53 +03:00
</optional>
2009-09-10 12:47:57 +04:00
<zeroOrMore>
2010-03-01 22:09:26 +03:00
<ref name='machine'/>
2009-09-10 12:47:57 +04:00
</zeroOrMore>
2009-01-27 18:29:53 +03:00
</element>
</define>
<define name='features'>
<element name='features'>
2012-08-02 15:23:16 +04:00
<interleave>
<optional>
<element name='pae'>
<empty/>
</element>
</optional>
<optional>
<element name='nonpae'>
<empty/>
</element>
</optional>
<optional>
<element name='ia64_be'>
<empty/>
</element>
</optional>
<optional>
<element name='acpi'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='apic'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='cpuselection'>
<empty/>
</element>
</optional>
<optional>
<element name='deviceboot'>
<empty/>
</element>
</optional>
2014-03-17 19:19:44 +04:00
<optional>
<element name='disksnapshot'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
2012-08-02 15:23:16 +04:00
</interleave>
2009-01-27 18:29:53 +03:00
</element>
</define>
<define name='featuretoggle'>
<attribute name='toggle'>
<choice>
2010-03-01 22:09:26 +03:00
<value>yes</value>
<value>no</value>
2009-01-27 18:29:53 +03:00
</choice>
</attribute>
<attribute name='default'>
<choice>
2010-03-01 22:09:26 +03:00
<value>on</value>
<value>off</value>
2009-01-27 18:29:53 +03:00
</choice>
</attribute>
</define>
2009-12-18 16:37:09 +03:00
<define name='featureName'>
<data type='string'>
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
</data>
</define>
2009-01-27 18:29:53 +03:00
</grammar>