[libvirt] [PATCH 2/4] Add timer element to domain schema.

Laine Stump laine at laine.org
Fri Mar 26 18:21:38 UTC 2010


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 |   60 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 5a8c82b..1b80344 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -295,6 +295,9 @@
     </interleave>
   </define>
   <define name="clock">
+    <zeroOrMore>
+      <ref name="timer"/>
+    </zeroOrMore>
     <optional>
       <element name="clock">
         <choice>
@@ -329,7 +332,62 @@
       </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.
-- 
1.6.6.1




More information about the libvir-list mailing list