schemas: finish virTristate{Bool,Switch} transition

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-09-08 08:06:35 +02:00
parent ff1cc25f40
commit f864aac90b
8 changed files with 61 additions and 191 deletions

View File

@ -77,10 +77,7 @@
</attribute> </attribute>
<optional> <optional>
<attribute name="multifunction"> <attribute name="multifunction">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</define> </define>
@ -446,4 +443,18 @@
</optional> </optional>
</define> </define>
<define name="virYesNo">
<choice>
<value>yes</value>
<value>no</value>
</choice>
</define>
<define name="virOnOff">
<choice>
<value>on</value>
<value>off</value>
</choice>
</define>
</grammar> </grammar>

View File

@ -405,16 +405,10 @@
<define name='featuretoggle'> <define name='featuretoggle'>
<attribute name='toggle'> <attribute name='toggle'>
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
<attribute name='default'> <attribute name='default'>
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</define> </define>

View File

@ -87,10 +87,7 @@
<define name='supported'> <define name='supported'>
<attribute name='supported'> <attribute name='supported'>
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</define> </define>

View File

@ -118,10 +118,7 @@
</attribute> </attribute>
<optional> <optional>
<attribute name='relabel'> <attribute name='relabel'>
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>
@ -282,10 +279,7 @@
<optional> <optional>
<element name="bootmenu"> <element name="bootmenu">
<attribute name="enable"> <attribute name="enable">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
<optional> <optional>
<attribute name="timeout"> <attribute name="timeout">
@ -584,10 +578,7 @@
<ref name='scaledInteger'/> <ref name='scaledInteger'/>
<optional> <optional>
<attribute name="dumpCore"> <attribute name="dumpCore">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</element> </element>
@ -1012,10 +1003,7 @@
</choice> </choice>
<optional> <optional>
<attribute name="present"> <attribute name="present">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<empty/> <empty/>
@ -1265,10 +1253,7 @@
</attribute> </attribute>
<optional> <optional>
<attribute name="rawio"> <attribute name="rawio">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -1536,10 +1521,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="removable"> <attribute name="removable">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</element> </element>
@ -1672,26 +1654,17 @@
</define> </define>
<define name="ioeventfd"> <define name="ioeventfd">
<attribute name="ioeventfd"> <attribute name="ioeventfd">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</define> </define>
<define name="event_idx"> <define name="event_idx">
<attribute name="event_idx"> <attribute name="event_idx">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</define> </define>
<define name="copy_on_read"> <define name="copy_on_read">
<attribute name='copy_on_read'> <attribute name='copy_on_read'>
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</define> </define>
<define name="discard"> <define name="discard">
@ -2222,20 +2195,14 @@
</attribute> </attribute>
<optional> <optional>
<attribute name="managed"> <attribute name="managed">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>
<element name="source"> <element name="source">
<optional> <optional>
<attribute name="missing"> <attribute name="missing">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<choice> <choice>
@ -2468,10 +2435,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="fullscreen"> <attribute name="fullscreen">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</group> </group>
@ -2488,10 +2452,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="autoport"> <attribute name="autoport">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -2562,10 +2523,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="autoport"> <attribute name="autoport">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -2674,10 +2632,7 @@
<optional> <optional>
<element name="playback"> <element name="playback">
<attribute name="compression"> <attribute name="compression">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
<empty/> <empty/>
</element> </element>
@ -2697,10 +2652,7 @@
<optional> <optional>
<element name="clipboard"> <element name="clipboard">
<attribute name="copypaste"> <attribute name="copypaste">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
<empty/> <empty/>
</element> </element>
@ -2719,10 +2671,7 @@
<optional> <optional>
<element name="filetransfer"> <element name="filetransfer">
<attribute name="enable"> <attribute name="enable">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
<empty/> <empty/>
</element> </element>
@ -2740,26 +2689,17 @@
</optional> </optional>
<optional> <optional>
<attribute name="autoport"> <attribute name="autoport">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="replaceUser"> <attribute name="replaceUser">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="multiUser"> <attribute name="multiUser">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -2780,10 +2720,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="fullscreen"> <attribute name="fullscreen">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</group> </group>
@ -2862,28 +2799,19 @@
</optional> </optional>
<optional> <optional>
<attribute name="primary"> <attribute name="primary">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<element name="acceleration"> <element name="acceleration">
<optional> <optional>
<attribute name="accel3d"> <attribute name="accel3d">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="accel2d"> <attribute name="accel2d">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</element> </element>
@ -3009,10 +2937,7 @@
<define name="suspendChoices"> <define name="suspendChoices">
<optional> <optional>
<attribute name="enabled"> <attribute name="enabled">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</define> </define>
@ -3104,10 +3029,7 @@
<define name="usbdevfilter"> <define name="usbdevfilter">
<element name="usbdev"> <element name="usbdev">
<attribute name="allow"> <attribute name="allow">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
<optional> <optional>
<attribute name="class"> <attribute name="class">
@ -3567,10 +3489,7 @@
</optional> </optional>
<optional> <optional>
<attribute name="managed"> <attribute name="managed">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<choice> <choice>
@ -3910,10 +3829,7 @@
<element name="apic"> <element name="apic">
<optional> <optional>
<attribute name="eoi"> <attribute name="eoi">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</element> </element>
@ -4207,10 +4123,7 @@
<element name="bios"> <element name="bios">
<optional> <optional>
<attribute name="useserial"> <attribute name="useserial">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -4280,10 +4193,7 @@
<element name="rom"> <element name="rom">
<optional> <optional>
<attribute name="bar"> <attribute name="bar">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
@ -4753,10 +4663,7 @@
<define name="featurestate"> <define name="featurestate">
<attribute name="state"> <attribute name="state">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</define> </define>

View File

@ -127,7 +127,7 @@
<element name="bridge"> <element name="bridge">
<optional> <optional>
<attribute name="stp"> <attribute name="stp">
<ref name="on-or-off"/> <ref name="virOnOff"/>
</attribute> </attribute>
</optional> </optional>
<!-- Bridge forward delay (see 'brctl setfd') --> <!-- Bridge forward delay (see 'brctl setfd') -->
@ -376,7 +376,7 @@
<element name="dhcp"> <element name="dhcp">
<optional> <optional>
<attribute name="peerdns"> <attribute name="peerdns">
<ref name="yes-or-no"/> <ref name="virYesNo"/>
</attribute> </attribute>
</optional> </optional>
</element> </element>
@ -415,21 +415,6 @@
instead of destination and nexthop instead of gateway. instead of destination and nexthop instead of gateway.
--> -->
<!-- Auxiliary definitions -->
<define name="on-or-off">
<choice>
<value>on</value>
<value>off</value>
</choice>
</define>
<define name="yes-or-no">
<choice>
<value>yes</value>
<value>no</value>
</choice>
</define>
<!-- Type library --> <!-- Type library -->
<define name="timeval"> <define name="timeval">

View File

@ -21,12 +21,9 @@
with no gateways addresses specified --> with no gateways addresses specified -->
<optional> <optional>
<attribute name="ipv6"> <attribute name="ipv6">
<choice> <ref name="virYesNo"/>
<value>yes</value> </attribute>
<value>no</value> </optional>
</choice>
</attribute>
</optional>
<interleave> <interleave>
<!-- The name of the network, used to refer to it through the API <!-- The name of the network, used to refer to it through the API
@ -53,10 +50,7 @@
<optional> <optional>
<attribute name="stp"> <attribute name="stp">
<choice> <ref name="virOnOff"/>
<value>on</value>
<value>off</value>
</choice>
</attribute> </attribute>
</optional> </optional>
@ -104,10 +98,7 @@
<optional> <optional>
<attribute name="managed"> <attribute name="managed">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>
@ -203,10 +194,7 @@
</attribute> </attribute>
<optional> <optional>
<attribute name="default"> <attribute name="default">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>
@ -236,10 +224,7 @@
<element name="dns"> <element name="dns">
<optional> <optional>
<attribute name="forwardPlainNames"> <attribute name="forwardPlainNames">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>

View File

@ -377,10 +377,7 @@
<interleave> <interleave>
<optional> <optional>
<attribute name="match"> <attribute name="match">
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
</interleave> </interleave>

View File

@ -11,18 +11,12 @@
<element name='secret'> <element name='secret'>
<optional> <optional>
<attribute name='ephemeral'> <attribute name='ephemeral'>
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name='private'> <attribute name='private'>
<choice> <ref name="virYesNo"/>
<value>yes</value>
<value>no</value>
</choice>
</attribute> </attribute>
</optional> </optional>
<interleave> <interleave>