]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add timer element to domain schema
authorLaine Stump <laine@laine.org>
Tue, 30 Mar 2010 11:47:39 +0000 (13:47 +0200)
committerDaniel Veillard <veillard@redhat.com>
Tue, 30 Mar 2010 11:57:40 +0000 (13:57 +0200)
timers are sub-elements of clocks. A clock can have zero or more
instances of timer. Within the timer, only the name attribute is
required; all other attributes are optional.

A simpler representation of a timer element is:

  <timer name='platform|pit|rtc|hpet|tsc'
         wallclock='host|guest'
         tickpolicy='delay|catchup|merge|discard'
         frequency='123'
         mode='auto|native|emulate|paravirt'
         present='yes|no'/>

frequency is a ulong. All other attributes are simple enums.

docs/schemas/domain.rng

index e59e103f468c53b13197b278b4a3d4bec50a55c8..d80430153d160a6e2e1edd3936726a4e2e509bfc 100644 (file)
     </interleave>
   </define>
   <define name="clock">
+    <zeroOrMore>
+      <ref name="timer"/>
+    </zeroOrMore>
     <optional>
       <element name="clock">
         <choice>
       </element>
     </optional>
   </define>
-  <!--
+  <define name="timer">
+    <element name="timer">
+      <attribute name="name">
+        <choice>
+          <value>platform</value>
+          <value>pit</value>
+          <value>rtc</value>
+          <value>hpet</value>
+          <value>tsc</value>
+        </choice>
+      </attribute>
+      <optional>
+        <attribute name="wallclock">
+          <choice>
+            <value>host</value>
+            <value>guest</value>
+          </choice>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="tickpolicy">
+          <choice>
+            <value>delay</value>
+            <value>catchup</value>
+            <value>merge</value>
+            <value>discard</value>
+          </choice>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="frequency">
+          <ref name="unsignedInt"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="mode">
+          <choice>
+            <value>auto</value>
+            <value>native</value>
+            <value>emulate</value>
+            <value>paravirt</value>
+          </choice>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="present">
+          <choice>
+            <value>yes</value>
+            <value>no</value>
+          </choice>
+        </attribute>
+      </optional>
+      <empty/>
+    </element>
+  </define>
+<!--
       A bootloader may be used to extract the OS information instead of
       defining the OS parameter in the instance. It points just to the
       binary or script used to extract the data from the first disk device.