[PATCH 03/15] conf: schemas: add data-file store to domain rng schema

Nikolai Barybin via Devel posted 15 patches 1 week, 6 days ago
[PATCH 03/15] conf: schemas: add data-file store to domain rng schema
Posted by Nikolai Barybin via Devel 1 week, 6 days ago
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
---
 src/conf/schemas/domaincommon.rng | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index bfd0044805..e70896b7ef 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -1783,6 +1783,9 @@
       <ref name="diskBackingChain"/>
       <ref name="privateDataDeviceDisk"/>
     </interleave>
+    <optional>
+      <ref name="diskDataFile"/>
+    </optional>
   </define>
 
   <define name="diskBackingChain">
@@ -1803,6 +1806,18 @@
         <ref name="diskSource"/>
         <ref name="diskBackingChain"/>
         <ref name="diskFormat"/>
+        <optional>
+          <ref name="diskDataFile"/>
+        </optional>
+      </interleave>
+    </element>
+  </define>
+
+  <define name="diskDataFile">
+    <element name="dataFileStore">
+      <interleave>
+        <ref name="diskFormat"/>
+        <ref name="diskSource"/>
       </interleave>
     </element>
   </define>
-- 
2.43.5
Re: [PATCH 03/15] conf: schemas: add data-file store to domain rng schema
Posted by Peter Krempa 1 week, 5 days ago
On Wed, Nov 20, 2024 at 18:48:38 +0300, Nikolai Barybin via Devel wrote:
> Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
> ---
>  src/conf/schemas/domaincommon.rng | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
> index bfd0044805..e70896b7ef 100644
> --- a/src/conf/schemas/domaincommon.rng
> +++ b/src/conf/schemas/domaincommon.rng
> @@ -1783,6 +1783,9 @@
>        <ref name="diskBackingChain"/>
>        <ref name="privateDataDeviceDisk"/>
>      </interleave>
> +    <optional>
> +      <ref name="diskDataFile"/>
> +    </optional>
>    </define>
>  
>    <define name="diskBackingChain">
> @@ -1803,6 +1806,18 @@
>          <ref name="diskSource"/>
>          <ref name="diskBackingChain"/>
>          <ref name="diskFormat"/>
> +        <optional>
> +          <ref name="diskDataFile"/>
> +        </optional>
> +      </interleave>
> +    </element>
> +  </define>
> +
> +  <define name="diskDataFile">
> +    <element name="dataFileStore">

I'm going to rename this to 'dataStore' since it can be e.g also a block
device.

I'm also strongly considering making this a child of <source> instead of
placing it in the disk like <backingStore>.

I'll have a look how the parser/formatter changes and then I'll decide.



> +      <interleave>
> +        <ref name="diskFormat"/>
> +        <ref name="diskSource"/>
>        </interleave>
>      </element>
>    </define>
> -- 
> 2.43.5
>