]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix schema to allow missing machine type
authorMark McLoughlin <markmc@redhat.com>
Mon, 12 Oct 2009 09:47:01 +0000 (10:47 +0100)
committerMark McLoughlin <markmc@redhat.com>
Mon, 12 Oct 2009 09:47:01 +0000 (10:47 +0100)
The domain/os/type element may have an arch specified without having
a machine variant specified. In fact, this is what python-virtinst
does when defining a guest.

* docs/schemas/domain.rng: allow missing machine type

docs/schemas/domain.rng

index b1987e11fa730d3a72b10f62648ad02efd03c9e3..1935f1530ad1c92649bfa0fe4c835f4c95e25937 100644 (file)
   </define>
   <define name="hvmx86">
     <group>
-      <attribute name="arch">
-        <choice>
-          <value>i686</value>
-          <value>x86_64</value>
-        </choice>
-      </attribute>
-      <attribute name="machine">
-        <choice>
-          <value>xenfv</value>
-          <value>pc</value>
-          <value>isapc</value>
-        </choice>
-      </attribute>
+      <optional>
+        <attribute name="arch">
+          <choice>
+            <value>i686</value>
+            <value>x86_64</value>
+          </choice>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="machine">
+          <choice>
+            <value>xenfv</value>
+            <value>pc</value>
+            <value>isapc</value>
+          </choice>
+        </attribute>
+        </optional>
     </group>
   </define>
   <define name="hvmmips">
     <group>
-      <attribute name="arch">
-        <value>mips</value>
-      </attribute>
-      <attribute name="machine">
-        <value>mips</value>
-      </attribute>
+      <optional>
+        <attribute name="arch">
+          <value>mips</value>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="machine">
+          <value>mips</value>
+        </attribute>
+      </optional>
     </group>
   </define>
   <define name="hvmsparc">
     <group>
-      <attribute name="arch">
-        <value>sparc</value>
-      </attribute>
-      <attribute name="machine">
-        <value>sun4m</value>
-      </attribute>
+      <optional>
+        <attribute name="arch">
+          <value>sparc</value>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="machine">
+          <value>sun4m</value>
+        </attribute>
+      </optional>
     </group>
   </define>
   <define name="hvmppc">
     <group>
-      <attribute name="arch">
-        <value>ppc</value>
-      </attribute>
-      <attribute name="machine">
-        <choice>
-          <value>g3beige</value>
-          <value>mac99</value>
-          <value>prep</value>
-        </choice>
-      </attribute>
+      <optional>
+        <attribute name="arch">
+          <value>ppc</value>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="machine">
+          <choice>
+            <value>g3beige</value>
+            <value>mac99</value>
+            <value>prep</value>
+          </choice>
+        </attribute>
+      </optional>
     </group>
   </define>
   <define name="osexe">