[Libosinfo] [osinfo-db PATCH] RFC: schema: Add support to Guest Features
Fabiano Fidêncio
fidencio at redhat.com
Thu Nov 15 11:04:33 UTC 2018
One of the requests that came from KubeVirt is that would be really nice
if we could expose Guest supported features.
In order to do so, I came up with this *prototype* and I'd like to ask
for some review of the schema before I actually start implementing
something on libosinfo side.
One example of how it'll look like is:
<os>
<features>
<feature removed="true">device-hotplug</feature>
<feature>cpu-hotplug</feature>
<feature>NUMA</feature>
</features>
</os>
>From the start:
- features *will* be inrited between OSes, by default.
- the feature element has an optional "removed" attribute which, by
default, is "false".
Is this approach okay?
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
data/schema/osinfo.rng.in | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index 6693391..73d6037 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -518,6 +518,25 @@
</element>
</define>
+ <define name='features-rel'>
+ <element name='features'>
+ <oneOrMore>
+ <element name='feature'>
+ <choice>
+ <value>cpu-hotplug</value>
+ <value>device-hotplug</value>
+ <value>NUMA</value>
+ </choice>
+ <optional>
+ <attribute name='removed'>
+ <ref name='bool'/>
+ </attribute>
+ </optional>
+ </element>
+ </oneOrMore>
+ </element>
+ </define>
+
<define name='os'>
<element name='os'>
<interleave>
@@ -549,6 +568,9 @@
<zeroOrMore>
<ref name='driver'/>
</zeroOrMore>
+ <zeroOrMore>
+ <ref name='features-rel'/>
+ </zeroOrMore>
</interleave>
</element>
</define>
--
2.19.1
More information about the Libosinfo
mailing list