schema: refactor mdev_types out of PCI nodedev schema

Refactor mdev_types into standalone define for later reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Boris Fiuczynski 2020-10-23 19:31:50 +02:00 committed by Ján Tomko
parent d20735adf5
commit b5f8c358a3

View File

@ -216,27 +216,7 @@
</optional>
<optional>
<element name="capability">
<attribute name="type">
<value>mdev_types</value>
</attribute>
<oneOrMore>
<element name="type">
<attribute name="id">
<data type="string"/>
</attribute>
<optional>
<element name="name"><text/></element>
</optional>
<element name="deviceAPI">
<value>vfio-pci</value>
</element>
<element name="availableInstances">
<ref name="unsignedInt"/>
</element>
</element>
</oneOrMore>
</element>
<ref name="mdev_types"/>
</optional>
<optional>
@ -706,4 +686,30 @@
</data>
</define>
<define name="mdev_types">
<element name="capability">
<attribute name="type">
<value>mdev_types</value>
</attribute>
<oneOrMore>
<element name="type">
<attribute name="id">
<data type="string"/>
</attribute>
<optional>
<element name="name"><text/></element>
</optional>
<element name="deviceAPI">
<choice>
<value>vfio-pci</value>
</choice>
</element>
<element name="availableInstances">
<ref name="unsignedInt"/>
</element>
</element>
</oneOrMore>
</element>
</define>
</grammar>