[PATCH 00/12] JSON monitor handling cleanups and spurious error bug fix

Peter Krempa posted 12 patches 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1669912195.git.pkrempa@redhat.com
src/libvirt_private.syms     |   2 +-
src/qemu/qemu_agent.c        |  13 ++-
src/qemu/qemu_monitor_json.c | 189 +++++++++++++++--------------------
src/util/virjson.c           |  44 +++-----
src/util/virjson.h           |   3 +-
5 files changed, 106 insertions(+), 145 deletions(-)
[PATCH 00/12] JSON monitor handling cleanups and spurious error bug fix
Posted by Peter Krempa 1 year, 5 months ago
First half introduces qemuMonitorJSONGetReply and uses it in our code
base, second half introduces virJSONValueArrayToStringList, uses it to
fix a bug and refactor the rest of the usage.

Peter Krempa (12):
  qemu: monitor: Introduce qemuMonitorJSONGetReply, a better
    qemuMonitorJSONCheckReply
  qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_OBJECT
  qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_ARRAY
  qemu: monitor: Use qemuMonitorJSONGetReply when the value is extracted
    directly
  qemu: monitor: Unify and refactor 'PTY' case in
    qemuMonitorJSONAttachCharDev
  util: json: Split out array->strinlist conversion from
    virJSONValueObjectGetStringArray
  qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray for
    optional data
  qemuMonitorJSONGetCPUDefinitions: Rework lookup of
    'unavailable-features'
  qemuMonitorJSONGetCPUDefinitions: Avoid double lookup of object
  qemu: monitor: Use qemuMonitorJSONGetReply in conjunction with
    virJSONValueArrayToStringList
  qemuAgentSSHGetAuthorizedKeys: Convert last use
    ofvirJSONValueObjectGetStringArray
  util: json: Remove unused virJSONValueObjectGetStringArray wrapper

 src/libvirt_private.syms     |   2 +-
 src/qemu/qemu_agent.c        |  13 ++-
 src/qemu/qemu_monitor_json.c | 189 +++++++++++++++--------------------
 src/util/virjson.c           |  44 +++-----
 src/util/virjson.h           |   3 +-
 5 files changed, 106 insertions(+), 145 deletions(-)

-- 
2.38.1
Re: [PATCH 00/12] JSON monitor handling cleanups and spurious error bug fix
Posted by Michal Prívozník 1 year, 5 months ago
On 12/1/22 17:31, Peter Krempa wrote:
> First half introduces qemuMonitorJSONGetReply and uses it in our code
> base, second half introduces virJSONValueArrayToStringList, uses it to
> fix a bug and refactor the rest of the usage.
> 
> Peter Krempa (12):
>   qemu: monitor: Introduce qemuMonitorJSONGetReply, a better
>     qemuMonitorJSONCheckReply
>   qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_OBJECT
>   qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_ARRAY
>   qemu: monitor: Use qemuMonitorJSONGetReply when the value is extracted
>     directly
>   qemu: monitor: Unify and refactor 'PTY' case in
>     qemuMonitorJSONAttachCharDev
>   util: json: Split out array->strinlist conversion from
>     virJSONValueObjectGetStringArray
>   qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray for
>     optional data
>   qemuMonitorJSONGetCPUDefinitions: Rework lookup of
>     'unavailable-features'
>   qemuMonitorJSONGetCPUDefinitions: Avoid double lookup of object
>   qemu: monitor: Use qemuMonitorJSONGetReply in conjunction with
>     virJSONValueArrayToStringList
>   qemuAgentSSHGetAuthorizedKeys: Convert last use
>     ofvirJSONValueObjectGetStringArray
>   util: json: Remove unused virJSONValueObjectGetStringArray wrapper
> 
>  src/libvirt_private.syms     |   2 +-
>  src/qemu/qemu_agent.c        |  13 ++-
>  src/qemu/qemu_monitor_json.c | 189 +++++++++++++++--------------------
>  src/util/virjson.c           |  44 +++-----
>  src/util/virjson.h           |   3 +-
>  5 files changed, 106 insertions(+), 145 deletions(-)
> 

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

Michal