domaincaps.rng 4.4 KB
Newer Older
M
Michal Privoznik 已提交
1 2 3 4
<?xml version="1.0"?>
<!-- A Relax NG schema for the libvirt domain capabilities XML format -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href='basictypes.rng'/>
5
  <include href='cputypes.rng'/>
M
Michal Privoznik 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  <start>
    <ref name='domainCapabilities'/>
  </start>


  <define name='domainCapabilities'>
    <element name='domainCapabilities'>
      <interleave>
        <element name='path'>
          <ref name="absFilePath"/>
        </element>
        <element name='domain'>
          <text/>
        </element>
        <element name='machine'>
          <text/>
        </element>
        <element name='arch'>
          <text/>
        </element>
        <optional>
          <ref name='vcpu'/>
        </optional>
29 30 31
        <optional>
          <ref name='os'/>
        </optional>
32 33 34
        <optional>
          <ref name='cpu'/>
        </optional>
M
Michal Privoznik 已提交
35 36 37
        <optional>
          <ref name='devices'/>
        </optional>
38 39 40
        <optional>
          <ref name='features'/>
        </optional>
M
Michal Privoznik 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53
      </interleave>
    </element>
  </define>

  <define name='vcpu'>
    <element name='vcpu'>
      <attribute name='max'>
        <ref name='unsignedInt'/>
      </attribute>
      <empty/>
    </element>
  </define>

54 55 56
  <define name='loader'>
    <element name='loader'>
      <ref name='supported'/>
57 58 59
      <optional>
        <ref name='value'/>
      </optional>
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
      <ref name='enum'/>
    </element>
  </define>

  <define name='os'>
    <element name='os'>
      <interleave>
        <ref name='supported'/>
        <optional>
          <ref name='loader'/>
        </optional>
      </interleave>
    </element>
  </define>

75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
  <define name='cpu'>
    <element name='cpu'>
      <ref name='cpuHost'/>
      <ref name='cpuHostModel'/>
      <ref name='cpuCustom'/>
    </element>
  </define>

  <define name='cpuHost'>
    <element name='mode'>
      <attribute name='name'>
        <value>host-passthrough</value>
      </attribute>
      <ref name='supported'/>
    </element>
  </define>

  <define name='cpuHostModel'>
    <element name='mode'>
      <attribute name='name'>
        <value>host-model</value>
      </attribute>
      <ref name='supported'/>
98 99 100 101 102 103 104 105 106
      <optional>
        <ref name="cpuModel"/>
        <optional>
          <ref name="cpuVendor"/>
        </optional>
        <zeroOrMore>
          <ref name="cpuFeature"/>
        </zeroOrMore>
      </optional>
107 108 109 110 111 112 113 114 115 116 117
    </element>
  </define>

  <define name='cpuCustom'>
    <element name='mode'>
      <attribute name='name'>
        <value>custom</value>
      </attribute>
      <ref name='supported'/>
      <zeroOrMore>
        <element name='model'>
J
Jiri Denemark 已提交
118 119 120 121 122 123 124
          <attribute name='usable'>
            <choice>
              <value>yes</value>
              <value>no</value>
              <value>unknown</value>
            </choice>
          </attribute>
125 126 127 128 129 130
          <text/>
        </element>
      </zeroOrMore>
    </element>
  </define>

M
Michal Privoznik 已提交
131 132 133 134
  <define name='devices'>
    <element name='devices'>
      <interleave>
        <ref name='disk'/>
135
        <ref name='graphics'/>
136
        <ref name='video'/>
M
Michal Privoznik 已提交
137 138 139 140 141 142 143 144 145 146 147 148
        <ref name='hostdev'/>
      </interleave>
    </element>
  </define>

  <define name='disk'>
    <element name='disk'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

149 150 151 152 153 154 155
  <define name='graphics'>
    <element name='graphics'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

156 157 158 159 160 161 162
  <define name='video'>
    <element name='video'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

M
Michal Privoznik 已提交
163 164 165 166 167 168 169
  <define name='hostdev'>
    <element name='hostdev'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
  <define name='features'>
    <element name='features'>
      <interleave>
        <ref name='gic'/>
      </interleave>
    </element>
  </define>

  <define name='gic'>
    <element name='gic'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

185 186 187 188 189 190 191 192
  <define name='value'>
    <zeroOrMore>
      <element name='value'>
        <text/>
      </element>
    </zeroOrMore>
  </define>

M
Michal Privoznik 已提交
193 194
  <define name='supported'>
    <attribute name='supported'>
195
      <ref name="virYesNo"/>
M
Michal Privoznik 已提交
196 197 198 199 200 201 202 203 204
    </attribute>
  </define>

  <define name='enum'>
    <zeroOrMore>
      <element name='enum'>
        <attribute name='name'>
          <text/>
        </attribute>
205
        <ref name='value'/>
M
Michal Privoznik 已提交
206 207 208 209
      </element>
    </zeroOrMore>
  </define>
</grammar>