[Libosinfo] [osinfo-db PATCH v3 01/10] schema: Add support for pre-installed images
Fabiano Fidêncio
fidencio at redhat.com
Wed Nov 14 14:49:42 UTC 2018
Let's create a new element called "image", which will be added to the
"os" element.
By adding the new "image" element, we'll start supporting pre-installed
images, at least in order to provide their link to Apps consuming
osinfo-db.
The xml entry will be similar to:
<os>
<image arch="x86_64" format="raw">
<variant id="cloud"/>
<url>https://download/foo/bar.img</url>
</image>
</os>
Mind that the "variant" is an optional element.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
data/schema/osinfo.rng.in | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index 6693391..cc06dcf 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -473,6 +473,30 @@
</element>
</define>
+ <define name='image'>
+ <element name='image'>
+ <attribute name='arch'>
+ <ref name='archnames'/>
+ </attribute>
+ <attribute name='format'>
+ <ref name='imageformats'/>
+ </attribute>
+ <interleave>
+ <optional>
+ <element name='variant'>
+ <attribute name='id'>
+ </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name='url'>
+ <ref name='url'/>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ </define>
+
<define name='installer'>
<element name='installer'>
<zeroOrMore>
@@ -543,6 +567,9 @@
<zeroOrMore>
<ref name='tree'/>
</zeroOrMore>
+ <zeroOrMore>
+ <ref name='image'/>
+ </zeroOrMore>
<zeroOrMore>
<ref name='installer'/>
</zeroOrMore>
@@ -754,6 +781,15 @@
</choice>
</define>
+ <define name='imageformats'>
+ <choice>
+ <value>qcow2</value>
+ <value>raw</value>
+ <value>vmdk</value>
+ <value>vhdx</value>
+ </choice>
+ </define>
+
<define name='date'>
<data type="string">
<param name="pattern">[0-9]{4}-[0-9]{2}-[0-9]{2}</param>
--
2.19.1
More information about the Libosinfo
mailing list