[libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved

Michal Privoznik posted 1 patch 4 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/2cb8d171adb5ed1d8c063b556746913a68e0529f.1576834076.git.mprivozn@redhat.com
docs/schemas/domaincommon.rng | 54 +++++++++++++++++++----------------
1 file changed, 29 insertions(+), 25 deletions(-)
[libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved
Posted by Michal Privoznik 4 years, 4 months ago
While command line arguments are sort of positional (becasue you
have to have two entries, one for "-arg" the other for "value"),
it doesn't really matter whether env variables come before or
after command line arguments.

And it matter even less when playing with qemu capabilities.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 docs/schemas/domaincommon.rng | 54 +++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 5f1d4a34a4..b87457382a 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -6295,37 +6295,41 @@
     -->
   <define name="qemucmdline">
     <element name="commandline" ns="http://libvirt.org/schemas/domain/qemu/1.0">
-      <zeroOrMore>
-        <element name="arg">
-          <attribute name='value'/>
-        </element>
-      </zeroOrMore>
-      <zeroOrMore>
-        <element name="env">
-          <attribute name='name'>
-            <ref name="filter-param-name"/>
-          </attribute>
-          <optional>
+      <interleave>
+        <zeroOrMore>
+          <element name="arg">
             <attribute name='value'/>
-          </optional>
-          <empty/>
-        </element>
-      </zeroOrMore>
+          </element>
+        </zeroOrMore>
+        <zeroOrMore>
+          <element name="env">
+            <attribute name='name'>
+              <ref name="filter-param-name"/>
+            </attribute>
+            <optional>
+              <attribute name='value'/>
+            </optional>
+            <empty/>
+          </element>
+        </zeroOrMore>
+      </interleave>
     </element>
   </define>
 
   <define name="qemucapabilities">
     <element name="capabilities" ns="http://libvirt.org/schemas/domain/qemu/1.0">
-      <zeroOrMore>
-        <element name="add">
-          <attribute name="capability"/>
-        </element>
-      </zeroOrMore>
-      <zeroOrMore>
-        <element name="del">
-          <attribute name="capability"/>
-        </element>
-      </zeroOrMore>
+      <interleave>
+        <zeroOrMore>
+          <element name="add">
+            <attribute name="capability"/>
+          </element>
+        </zeroOrMore>
+        <zeroOrMore>
+          <element name="del">
+            <attribute name="capability"/>
+          </element>
+        </zeroOrMore>
+      </interleave>
     </element>
   </define>
 
-- 
2.24.1

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

Re: [libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved
Posted by Cole Robinson 4 years, 4 months ago
On 12/20/19 4:27 AM, Michal Privoznik wrote:
> While command line arguments are sort of positional (becasue you
> have to have two entries, one for "-arg" the other for "value"),
> it doesn't really matter whether env variables come before or
> after command line arguments.
> 
> And it matter even less when playing with qemu capabilities.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  docs/schemas/domaincommon.rng | 54 +++++++++++++++++++----------------
>  1 file changed, 29 insertions(+), 25 deletions(-)
> 

Reviewed-by: Cole Robinson <crobinso@redhat.com>

- Cole

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

Re: [libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved
Posted by Fabiano Fidêncio 4 years, 4 months ago
On Fri, Dec 20, 2019 at 10:29 AM Michal Privoznik <mprivozn@redhat.com> wrote:
>
> While command line arguments are sort of positional (becasue you

becasue -> because

> have to have two entries, one for "-arg" the other for "value"),
> it doesn't really matter whether env variables come before or
> after command line arguments.
>
> And it matter even less when playing with qemu capabilities.

matter -> matters

>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Patch makes sense and doesn't break backward compat.
I'd take this review with a grain of salt ...

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>


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