schema: Update network schema.

Make things a bit more readable, and properly handle forward mode 'route'.
This commit is contained in:
Cole Robinson 2009-10-09 08:48:22 -04:00
parent e1ea1b2af7
commit 4027461865

View File

@ -2,19 +2,29 @@
<element name="network" xmlns="http://relaxng.org/ns/structure/1.0" <element name="network" xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<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
and in virsh --> and in virsh -->
<element name="name"><text/></element> <element name="name">
<text/>
</element>
<!-- <uuid> element -->
<optional> <optional>
<element name="uuid"><text/></element> <element name="uuid"><text/></element>
</optional> </optional>
<!-- <bridge> element -->
<optional> <optional>
<!-- The name of the network to be set up; this will back <!-- The name of the network to be set up; this will back
the network on the host --> the network on the host -->
<element name="bridge"> <element name="bridge">
<optional> <optional>
<attribute name="name"><text/></attribute> <attribute name="name">
<text/>
</attribute>
</optional> </optional>
<optional> <optional>
<attribute name="stp"> <attribute name="stp">
<choice> <choice>
@ -23,31 +33,46 @@
</choice> </choice>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="delay"><data type="integer"/></attribute> <attribute name="delay">
<data type="integer"/>
</attribute>
</optional> </optional>
</element> </element>
</optional> </optional>
<!-- <forward> element -->
<optional> <optional>
<!-- The device through which the bridge is connected to the <!-- The device through which the bridge is connected to the
rest of the network --> rest of the network -->
<element name="forward"> <element name="forward">
<optional><attribute name="dev"><text/></attribute></optional> <optional>
<attribute name="dev">
<text/>
</attribute>
</optional>
<optional> <optional>
<attribute name="mode"> <attribute name="mode">
<choice> <choice>
<value>nat</value> <value>nat</value>
<value>routed</value> <value>route</value>
</choice> </choice>
</attribute> </attribute>
</optional> </optional>
</element> </element>
</optional> </optional>
<!-- <domain> element -->
<optional> <optional>
<element name="domain"> <element name="domain">
<attribute name="name"><text/></attribute> <attribute name="name"><text/></attribute>
</element> </element>
</optional> </optional>
<!-- <ip> element -->
<optional> <optional>
<!-- The IP element sets up NAT'ing and an optional DHCP server <!-- The IP element sets up NAT'ing and an optional DHCP server
local to the host. --> local to the host. -->