[libvirt] [PATCH] schema: tighten <serial><protocol type=...> relaxNG

Eric Blake eblake at redhat.com
Thu Jan 6 00:15:22 UTC 2011


virDomainChrTcpProtocol only accepts particular <protocol type=...>
values, but we weren't enforcing that in the RelaxNG.  The valid
types are also already documented in docs/formatdomain.html.in.

* docs/schemas/domain.rng (qemucdevSrcDef): Restrict list of
supported <protocol type=> values.
---

Noticed this while working on <smartcard>, but it is an independent
issue worth fixing whenever it gets an ack.

 docs/schemas/domain.rng |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index eee9864..a524e4b 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1448,7 +1448,14 @@
     <optional>
       <element name="protocol">
         <optional>
-          <attribute name="type"/>
+          <attribute name="type">
+            <choice>
+              <value>raw</value>
+              <value>telnet</value>
+              <value>telnets</value>
+              <value>tls</value>
+            </choice>
+          </attribute>
         </optional>
       </element>
     </optional>
-- 
1.7.3.4




More information about the libvir-list mailing list