render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
fbe740
From 0f126297ca984aa2ef145e2a703fff3dc31c53db Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <0f126297ca984aa2ef145e2a703fff3dc31c53db@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Wed, 19 Feb 2020 15:10:19 +0100
fbe740
Subject: [PATCH] docs: Document the new <slices> sub-element of disk's
fbe740
 <source>
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
We are going to add support for specifying offset and size attributes
fbe740
which will allow controling where the image and where the guest data
fbe740
itself starts in the source of the disk. This will be represented by
fbe740
a <slices> element filled with either a <slice type='storage'> for the
fbe740
offset of the image format data.
fbe740
fbe740
Add the XML documentation and RNG schema.
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
(cherry picked from commit 44f0f76890c6b53a893ffc370836794d74317c34)
fbe740
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1791788
fbe740
Message-Id: <9f5488f2e0e5b6d7df386fa428f7779346cbcff4.1582120424.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 docs/formatdomain.html.in     | 13 +++++++++++++
fbe740
 docs/schemas/domaincommon.rng | 19 +++++++++++++++++++
fbe740
 2 files changed, 32 insertions(+)
fbe740
fbe740
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
fbe740
index ec48ed77a5..5dbb8b59cf 100644
fbe740
--- a/docs/formatdomain.html.in
fbe740
+++ b/docs/formatdomain.html.in
fbe740
@@ -2878,6 +2878,9 @@
fbe740
   <disk type='block' device='lun'>
fbe740
     <driver name='qemu' type='raw'/>
fbe740
     <source dev='/dev/sda'>
fbe740
+      <slices>
fbe740
+        <slice type='storage' offset='12345' size='123'/>
fbe740
+      </slices>
fbe740
       <reservations managed='no'>
fbe740
         <source type='unix' path='/path/to/qemu-pr-helper' mode='client'/>
fbe740
       </reservations>
fbe740
@@ -3360,6 +3363,16 @@
fbe740
             controller.
fbe740
             Since 6.0.0
fbe740
           
fbe740
+          
slices
fbe740
+          
The slices element using its slice
fbe740
+            sub-elements allows configuring offset and size of either the
fbe740
+            location of the image format (slice type='storage')
fbe740
+            inside the storage source or the guest data inside the image format
fbe740
+            container (future expansion).
fbe740
+
fbe740
+            The offset and size values are in bytes.
fbe740
+            Since 6.1.0
fbe740
+          
fbe740
         
fbe740
 
fbe740
         

fbe740
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
fbe740
index 19476a2735..38aef19e89 100644
fbe740
--- a/docs/schemas/domaincommon.rng
fbe740
+++ b/docs/schemas/domaincommon.rng
fbe740
@@ -1596,12 +1596,31 @@
fbe740
     </optional>
fbe740
   </define>
fbe740
 
fbe740
+  <define name="diskSourceSlice">
fbe740
+    <attribute name='offset'>
fbe740
+      <ref name="positiveInteger"/>
fbe740
+    </attribute>
fbe740
+    <attribute name='size'>
fbe740
+      <ref name="positiveInteger"/>
fbe740
+    </attribute>
fbe740
+  </define>
fbe740
+
fbe740
   <define name="diskSourceCommon">
fbe740
     <optional>
fbe740
       <attribute name="index">
fbe740
         <ref name="positiveInteger"/>
fbe740
       </attribute>
fbe740
     </optional>
fbe740
+    <optional>
fbe740
+      <element name='slices'>
fbe740
+        <element name='slice'>
fbe740
+          <attribute name='type'>
fbe740
+            <value>storage</value>
fbe740
+          </attribute>
fbe740
+          <ref name="diskSourceSlice"/>
fbe740
+        </element>
fbe740
+      </element>
fbe740
+    </optional>
fbe740
   </define>
fbe740
 
fbe740
   <define name="diskSource">
fbe740
-- 
fbe740
2.25.0
fbe740