Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > ebe084c140192657f9094e135a84202c > files > 130

libvirt-0.8.2-29.el5.src.rpm

From 72d99344db7e4070d4d85d9707c98d2c45c7dd8c Mon Sep 17 00:00:00 2001
Message-Id: <72d99344db7e4070d4d85d9707c98d2c45c7dd8c.1289401248.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Mon, 8 Nov 2010 12:27:41 +0100
Subject: [PATCH] schema: Move timer element inside clock

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=649214

Both conf/domain_conf.c and domain XML documentation have <timer>
elements inside /domain/clock. Change domain.rng schema to be consistent
with them.
(backported from commit 38eec464f874c25e9095d6862d0b459475d9de4d)
---
 docs/schemas/domain.rng           |    7 +++----
 tests/domainschemadata/timers.xml |   27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 4 deletions(-)
 create mode 100644 tests/domainschemadata/timers.xml

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 6cbf94a..bf3e4a2 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -304,9 +304,6 @@
     </interleave>
   </define>
   <define name="clock">
-    <zeroOrMore>
-      <ref name="timer"/>
-    </zeroOrMore>
     <optional>
       <element name="clock">
         <choice>
@@ -337,7 +334,9 @@
             </optional>
           </group>
         </choice>
-        <empty/>
+        <zeroOrMore>
+          <ref name="timer"/>
+        </zeroOrMore>
       </element>
     </optional>
   </define>
diff --git a/tests/domainschemadata/timers.xml b/tests/domainschemadata/timers.xml
new file mode 100644
index 0000000..621f55c
--- /dev/null
+++ b/tests/domainschemadata/timers.xml
@@ -0,0 +1,27 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory>219200</memory>
+  <currentMemory>219200</currentMemory>
+  <vcpu>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'>
+    <timer name='pit' tickpolicy='delay'/>
+    <timer name='hpet'/>
+  </clock>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' unit='0'/>
+    </disk>
+    <controller type='ide' index='0'/>
+  </devices>
+</domain>
-- 
1.7.3.2