[libvirt] [PATCH 2/9] conf: Make backing store index optional

Peter Krempa posted 9 patches 7 years, 7 months ago
[libvirt] [PATCH 2/9] conf: Make backing store index optional
Posted by Peter Krempa 7 years, 7 months ago
Index will remain an internal property even if we allow backing store
parsing from the XML, so we need to allow backing store without it in
the schema.
---
 docs/schemas/domaincommon.rng | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4dbda6932..a3aa6eba2 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1415,9 +1415,11 @@

   <define name="diskBackingStore">
     <element name="backingStore">
+     <optional>
       <attribute name="index">
         <ref name="positiveInteger"/>
       </attribute>
+    </optional>
       <interleave>
         <ref name="diskSource"/>
         <ref name="diskBackingChain"/>
-- 
2.14.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/9] conf: Make backing store index optional
Posted by Eric Blake 7 years, 7 months ago
On 10/12/2017 02:07 PM, Peter Krempa wrote:
> Index will remain an internal property even if we allow backing store
> parsing from the XML, so we need to allow backing store without it in
> the schema.
> ---
>  docs/schemas/domaincommon.rng | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 4dbda6932..a3aa6eba2 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -1415,9 +1415,11 @@
> 
>    <define name="diskBackingStore">
>      <element name="backingStore">
> +     <optional>
>        <attribute name="index">
>          <ref name="positiveInteger"/>
>        </attribute>
> +    </optional>
>        <interleave>

Spacing looks funky (not the usual 2-space indentation, including
reindenting the <attribute> tag).  The parser doesn't care, but it might
be nice to touch up on commit.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list