Refactor mdev_types into standalone define for later reuse.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.ibm.com>
---
docs/schemas/nodedev.rng | 48 ++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 21 deletions(-)
diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng
index 166e278cf8..9548412999 100644
--- a/docs/schemas/nodedev.rng
+++ b/docs/schemas/nodedev.rng
@@ -215,27 +215,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>
@@ -696,4 +676,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>
--
2.25.1