schema: nodedev: Allow interleaving of sub-elements of 'device'

Note that the schema doesn't allow us to represent the two branches of
optional <devnode type='dev'> and zero or more <devnode type='link'>
definitions, so I've merged them under the <zeroOrMore> case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-10-13 18:29:49 +02:00
parent 85108bad37
commit 04bda51cb2

View File

@ -9,41 +9,38 @@
<define name="device">
<element name="device">
<!-- The name of the network, used to refer to it through the API
and in virsh -->
<element name="name"><text/></element>
<optional>
<element name="path"><text/></element>
</optional>
<optional>
<element name="devnode">
<attribute name="type">
<value>dev</value>
</attribute>
<text/>
</element>
</optional>
<zeroOrMore>
<element name="devnode">
<attribute name="type">
<value>link</value>
</attribute>
<text/>
</element>
</zeroOrMore>
<optional>
<ref name="parent"/>
</optional>
<interleave>
<!-- The name of the network, used to refer to it through the API
and in virsh -->
<element name="name"><text/></element>
<optional>
<element name="path"><text/></element>
</optional>
<zeroOrMore>
<element name="devnode">
<attribute name="type">
<choice>
<value>dev</value>
<value>link</value>
</choice>
</attribute>
<text/>
</element>
</zeroOrMore>
<optional>
<ref name="parent"/>
</optional>
<optional>
<element name="driver">
<element name="name"><text/></element>
</element>
</optional>
<optional>
<element name="driver">
<element name="name"><text/></element>
</element>
</optional>
<zeroOrMore>
<ref name="capability"/>
</zeroOrMore>
<zeroOrMore>
<ref name="capability"/>
</zeroOrMore>
</interleave>
</element>
</define>