[Libosinfo] [osinfo-db PATCH 1/6] schema: Add support for pre-installed images

Fabiano Fidêncio fidencio at redhat.com
Wed Oct 31 21:45:33 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 provided by distros in a similar way we already provide support
for ISOs and trees.

The xml entry will be similar to:
<os>
  <image arch="x86_64">
    <variant id="cloud"/>
    <url>https://download/foo/bar.img</url>
    <product-name>Ditro Foo (Cloud Edition)</product-name>
  </image>
</os>

https://gitlab.com/libosinfo/osinfo-db/issues/10

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/schema/osinfo.rng.in | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index 6693391..f90edd4 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -473,6 +473,32 @@
     </element>
   </define>
 
+  <define name='image'>
+    <element name='image'>
+      <attribute name='arch'>
+        <ref name='archnames'/>
+      </attribute>
+      <interleave>
+        <optional>
+          <element name='variant'>
+            <attribute name='id'>
+            </attribute>
+          </element>
+        </optional>
+        <optional>
+          <element name='url'>
+            <ref name='url'/>
+          </element>
+        </optional>
+        <optional>
+          <element name='product-name'>
+            <text/>
+          </element>
+        </optional>
+      </interleave>
+    </element>
+  </define>
+
   <define name='installer'>
     <element name='installer'>
       <zeroOrMore>
@@ -543,6 +569,9 @@
         <zeroOrMore>
           <ref name='tree'/>
         </zeroOrMore>
+        <zeroOrMore>
+          <ref name='image'/>
+        </zeroOrMore>
         <zeroOrMore>
           <ref name='installer'/>
         </zeroOrMore>
-- 
2.19.1




More information about the Libosinfo mailing list