[libvirt] [PATCH] docs: Only one secret is in vol instead of zero or more

Han Han posted 1 patch 5 years, 3 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20181212025427.9619-1-hhan@redhat.com
docs/schemas/storagecommon.rng | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[libvirt] [PATCH] docs: Only one secret is in vol instead of zero or more
Posted by Han Han 5 years, 3 months ago
Referring to commit fab2e49d, it should be one and only secret for encryption.

Signed-off-by: Han Han <hhan@redhat.com>
---
 docs/schemas/storagecommon.rng | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
index 9d17d934de..63b51470a0 100644
--- a/docs/schemas/storagecommon.rng
+++ b/docs/schemas/storagecommon.rng
@@ -24,9 +24,7 @@
         </choice>
       </attribute>
       <interleave>
-        <zeroOrMore>
-          <ref name='secret'/>
-        </zeroOrMore>
+        <ref name='secret'/>
         <optional>
           <element name='cipher'>
             <ref name='keycipher'/>
-- 
2.20.0.rc2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: Only one secret is in vol instead of zero or more
Posted by Michal Privoznik 5 years, 3 months ago
On 12/12/18 3:54 AM, Han Han wrote:
> Referring to commit fab2e49d, it should be one and only secret for encryption.
> 
> Signed-off-by: Han Han <hhan@redhat.com>
> ---
>  docs/schemas/storagecommon.rng | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
> index 9d17d934de..63b51470a0 100644
> --- a/docs/schemas/storagecommon.rng
> +++ b/docs/schemas/storagecommon.rng
> @@ -24,9 +24,7 @@
>          </choice>
>        </attribute>
>        <interleave>
> -        <zeroOrMore>
> -          <ref name='secret'/>
> -        </zeroOrMore>
> +        <ref name='secret'/>
>          <optional>
>            <element name='cipher'>
>              <ref name='keycipher'/>
> 

So we parse multiple <secret/> elements but later in the code there are
several checks to make sure only one was actually parsed. It has been
like this since secrets were introduced.

Anyway, your patch is correct. ACKed and pushed.

Michal

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