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

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

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>

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
participants (3)
-
Cole Robinson
-
Fabiano Fidêncio
-
Michal Privoznik