mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
973af2362c
Hi, this is the fifth version of my SRV record for DNSMasq patch rebased for the current codebase to the bridge driver and libvirt XML file to include support for the SRV records in the DNS. The syntax is based on DNSMasq man page and tests for both xml2xml and xml2argv were added as well. There are some things written a better way in comparison with version 4, mainly there's no hack in tests/networkxml2argvtest.c and also the xPath context is changed to use a simpler query using the virXPathInt() function relative to the current node. Also, the patch is also fixing the networkxml2argv test to pass both checks, i.e. both unit tests and also syntax check. Please review, Michal Signed-off-by: Michal Novotny <minovotn@redhat.com>
116 lines
3.0 KiB
XML
116 lines
3.0 KiB
XML
<?xml version="1.0"?>
|
|
<!-- network-related definitions used in multiple grammars -->
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
<define name="virtualPortProfileID">
|
|
<data type="string">
|
|
<param name="maxLength">39</param>
|
|
</data>
|
|
</define>
|
|
|
|
<define name="virtualPortProfile">
|
|
<choice>
|
|
<group>
|
|
<element name="virtualport">
|
|
<attribute name="type">
|
|
<value>802.1Qbg</value>
|
|
</attribute>
|
|
<element name="parameters">
|
|
<attribute name="managerid">
|
|
<ref name="uint8range"/>
|
|
</attribute>
|
|
<attribute name="typeid">
|
|
<ref name="uint24range"/>
|
|
</attribute>
|
|
<attribute name="typeidversion">
|
|
<ref name="uint8range"/>
|
|
</attribute>
|
|
<optional>
|
|
<attribute name="instanceid">
|
|
<ref name="UUID"/>
|
|
</attribute>
|
|
</optional>
|
|
</element>
|
|
</element>
|
|
</group>
|
|
<group>
|
|
<element name="virtualport">
|
|
<attribute name="type">
|
|
<value>802.1Qbh</value>
|
|
</attribute>
|
|
<element name="parameters">
|
|
<attribute name="profileid">
|
|
<ref name="virtualPortProfileID"/>
|
|
</attribute>
|
|
</element>
|
|
</element>
|
|
</group>
|
|
</choice>
|
|
</define>
|
|
|
|
<define name="bandwidth">
|
|
<element name="bandwidth">
|
|
<interleave>
|
|
<optional>
|
|
<element name="inbound">
|
|
<ref name="bandwidth-attributes"/>
|
|
<empty/>
|
|
</element>
|
|
</optional>
|
|
<optional>
|
|
<element name="outbound">
|
|
<ref name="bandwidth-attributes"/>
|
|
<empty/>
|
|
</element>
|
|
</optional>
|
|
</interleave>
|
|
</element>
|
|
</define>
|
|
|
|
<define name="bandwidth-attributes">
|
|
<attribute name="average">
|
|
<ref name="speed"/>
|
|
</attribute>
|
|
<optional>
|
|
<attribute name="peak">
|
|
<ref name="speed"/>
|
|
</attribute>
|
|
</optional>
|
|
<optional>
|
|
<attribute name='burst'>
|
|
<ref name="BurstSize"/>
|
|
</attribute>
|
|
</optional>
|
|
</define>
|
|
|
|
<define name="speed">
|
|
<data type="unsignedInt">
|
|
<param name="pattern">[0-9]+</param>
|
|
<param name="minInclusive">1</param>
|
|
</data>
|
|
</define>
|
|
<define name="BurstSize">
|
|
<data type="unsignedInt">
|
|
<param name="pattern">[0-9]+</param>
|
|
<param name="minInclusive">1</param>
|
|
</data>
|
|
</define>
|
|
|
|
<define name='unsignedShort'>
|
|
<data type='integer'>
|
|
<param name="minInclusive">0</param>
|
|
<param name="maxInclusive">65535</param>
|
|
</data>
|
|
</define>
|
|
<define name='protocol'>
|
|
<data type='string'>
|
|
<param name='pattern'>(tcp)|(udp)</param>
|
|
</data>
|
|
</define>
|
|
<define name='addr-family'>
|
|
<data type='string'>
|
|
<param name="pattern">(ipv4)|(ipv6)</param>
|
|
</data>
|
|
</define>
|
|
</grammar>
|