On 06/19/2014 04:48 AM, Laine Stump wrote: > The interface xml schema was written with strict rules about the > ordering of the elements. This was never intentional, but just due to > omission of <interleave> in the appropriate places. This patch just > adds in <interleave> wherever there is more than one element, and > re-indents everything else appropriately. > --- > docs/schemas/interface.rng | 290 ++++++++++++++++++++++++--------------------- > 1 file changed, 156 insertions(+), 134 deletions(-) > ACK. Much easier to read via 'git diff -b', which shows: diff --git c/docs/schemas/interface.rng w/docs/schemas/interface.rng index 8e2218d..27610a5 100644 --- c/docs/schemas/interface.rng +++ w/docs/schemas/interface.rng @@ -29,6 +29,7 @@ Ethernet adapter --> <define name="basic-ethernet-content"> + <interleave> <attribute name="type"> <value>ethernet</value> </attribute> @@ -43,21 +44,26 @@ </optional> <ref name="link-speed-state"/> <!-- FIXME: Allow (some) ethtool options --> + </interleave> </define> <!-- Ethernet adapter without IP addressing, e.g. for a bridge --> <define name="bare-ethernet-interface"> <element name="interface"> + <interleave> <ref name="basic-ethernet-content"/> + </interleave> </element> </define> <define name="ethernet-interface"> <element name="interface"> + <interleave> <ref name="startmode"/> <ref name="basic-ethernet-content"/> <ref name="mtu"/> <ref name="interface-addressing"/> + </interleave> </element> </define> @@ -85,18 +91,22 @@ <define name="bare-vlan-interface"> <element name="interface"> + <interleave> <ref name="vlan-interface-common"/> <ref name="vlan-device"/> + </interleave> </element> </define> <define name="vlan-interface"> <element name="interface"> + <interleave> <ref name="vlan-interface-common"/> <ref name="startmode"/> <ref name="mtu"/> <ref name="interface-addressing"/> <ref name="vlan-device"/> + </interleave> </element> </define> @@ -105,6 +115,7 @@ --> <define name="bridge-interface"> <element name="interface"> + <interleave> <attribute name="type"> <value>bridge</value> </attribute> @@ -130,6 +141,7 @@ </choice> </zeroOrMore> </element> + </interleave> </element> </define> <!-- Jim Fehlig would like support for other bridge attributes, in @@ -180,6 +192,7 @@ xmit_hash_policy (since 2.6.3/3.2.2) --> + <interleave> <optional> <choice> <element name="miimon"> @@ -224,23 +237,28 @@ <!-- The slave interfaces --> <ref name="bare-ethernet-interface"/> </oneOrMore> + </interleave> </element> </define> <define name="bare-bond-interface"> <element name="interface"> + <interleave> <ref name="bond-interface-common"/> <ref name="bond-element"/> + </interleave> </element> </define> <define name="bond-interface"> <element name="interface"> + <interleave> <ref name="bond-interface-common"/> <ref name="startmode"/> <ref name="mtu"/> <ref name="interface-addressing"/> <ref name="bond-element"/> + </interleave> </element> </define> @@ -302,6 +320,7 @@ <attribute name="family"> <value>ipv4</value> </attribute> + <interleave> <choice> <ref name="dhcp-element"/> <group> @@ -318,6 +337,7 @@ </optional> </group> </choice> + </interleave> </element> </define> @@ -326,6 +346,7 @@ <attribute name="family"> <value>ipv6</value> </attribute> + <interleave> <optional> <element name="autoconf"><empty/></element> </optional> @@ -345,6 +366,7 @@ <attribute name="gateway"><ref name="ipv6Addr"/></attribute> </element> </optional> + </interleave> </element> </define> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list