[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v12 0/6] QAPI/QOM work for non-scalar object propert
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PATCH v12 0/6] QAPI/QOM work for non-scalar object properties |
Date: |
Thu, 15 Sep 2016 13:45:17 +0100 |
This patch series contains only the QAPI/QOM bits of my previous
access control patch series:
v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html
v3: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02498.html
v4: https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg01661.html
v5: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg00485.html
v6: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg03876.html
v7: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00919.html
v8: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg03115.html
v9: https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg02653.html
v10: https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg02694.html
v11: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg00652.html
This series provides the infrastructure to allow use of non-scalar
properties with the -object CLI arg, and object_add monitor commands.
eg a property which is a list of structs. The syntax used for this is
intentionally compatible with the syntax used by the block layer. This
will allow the qdict_crumple method to be used by the block layer to
convert from QemuOpts into structured QAPI block layer structs at a
future date. It is already used by one of Max's patch series, and
recent patches for glusterfs multiple-host support could have made
use of it to simplify code.
Changed in v12:
- More user friendly error message for mixing dict/list
keys (Kevin)
- Report error instead of assert for non-contiguous list
keys (Kevin)
- Fix tests for non-contiguous list keys (Kevin)
- Add tests for escaping of '.' when crumpling (Kevin)
- Fix remaining references to Qmp(In|Out)putVisitor (Markus)
- Misc typos / whitespace fixes (Eric, Kevin)
- Avoid touching 'ret' when parsing int64 fails (Eric)
- Testing of more edge cases in QObjectInputVisitor (Eric)
- Simplify API doc format (Markus)
- Use parse_option_size instead of qemu_strtosz_suffix
for consistency (Kevin)
- Use safer qobject_to_qdict casts (Eric)
Changed in v11:
- Split QAPI/QOM patches off from the access control patches
Changed in v10:
- Fixed stupid build mistake
Changed in v9:
- Rename QmpInputVisitor -> QObjectInputVisitor (Markus/Eric)
- Rename QmpOutputVisitor -> QObjectOutputVisitor (Markus/Eric)
- Drop "strict" param from qobject_string_visitor_new() (Marus)
- Misc docs typos
- Add a visitor able to use strict or string types (for Eric's
netdev series)
- Add a authorization API implementation that uses PAM
Changed in v8:
- Rebase due to merge of Visitor API changes (Eric)
Changed in v7:
- Misc typos in API docs (Marc-André)
- Fix parsing of properties using type_size visitor (Marc-André)
- Mark based auth class as abstract (Marc-André)
- Fix QAPI version annotations to say 2.7 (Marc-André)
Changed in v6:
- Switch from while() to for() loop for iterating over
dicts (Markus)
- Avoid redundant strdup (Markus)
- Rewrap comments at 70 chars (Markus)
- Change qdict_list_size() to qdict_is_list() (Markus)
- Misc docs changes (Markus)
- Change QmpInputVisitor so the code for handling the
string types is separate from code using native
scalar types (Paolo)
- Centralize code parsing bool strings (Markus)
- Centralize code parsing int strings (Markus)
Changed in v5:
- Resolved conflicts with Eric's visitor refactoring which
made it stricter about struct begin/end calls
- Added support for ACLs to migration code now its TLS
support is merged.
- Fixed typos in example in commit message
Changed in v4:
- Ensure examples use shell escaping for '*' (Eric)
- Add more tests for crumple impl (Eric)
- Raise error if sasl-acl/tls-acl are requested but
sasl/tls auth are not enabled (Eric)
- Document return codes for auth check more clearly (Eric)
- Don't silently turn a glob match into a strcmp
- Other misc small typos/fixes (Eric)
Changed in v3:
- Created separate qdict_list_size method (Max)
- Added unit tests for case of empty dict (Max)
- Fix variable names to use underscore separator (Max)
- Fix potential free of uninitialized variables (Max)
- Use QObject APIs for casts, instead of C type casts (Max)
Changed in v2:
- Adapt to changes in qapi visitor APIs
- Add a 'bool recursive' flag to qdict_crumple (Max)
- Fix memory leaks in qdict_crumple (Max)
- Split out key splitting code from qdict_crumple (Max)
- Use saner variable names in qdict_crumple (Max)
- Added some tests for bad inputs to qdict_crumple
Daniel P. Berrange (6):
qdict: implement a qdict_crumple method for un-flattening a dict
option: make parse_option_bool/number non-static
qapi: rename QmpInputVisitor to QObjectInputVisitor
qapi: rename QmpOutputVisitor to QObjectOutputVisitor
qapi: add a QObjectInputVisitor that does string conversion
qom: support arbitrary non-scalar properties with -object
block/qapi.c | 4 +-
blockdev.c | 4 +-
docs/qapi-code-gen.txt | 4 +-
hmp.c | 16 +-
include/qapi/qmp-input-visitor.h | 30 --
include/qapi/qmp/qdict.h | 1 +
include/qapi/qobject-input-visitor.h | 54 ++
...p-output-visitor.h => qobject-output-visitor.h} | 10 +-
include/qapi/visitor.h | 6 +-
include/qemu/option.h | 4 +
include/qom/object_interfaces.h | 10 +-
monitor.c | 2 +-
qapi/Makefile.objs | 4 +-
qapi/opts-visitor.c | 19 +-
qapi/qapi-clone-visitor.c | 2 +-
qapi/qmp-input-visitor.c | 412 ----------------
qapi/qmp-output-visitor.c | 256 ----------
qapi/qobject-input-visitor.c | 544 +++++++++++++++++++++
qapi/qobject-output-visitor.c | 254 ++++++++++
qemu-img.c | 8 +-
qmp.c | 6 +-
qobject/qdict.c | 292 +++++++++++
qom/object_interfaces.c | 47 +-
qom/qom-qobject.c | 8 +-
scripts/qapi-commands.py | 8 +-
scripts/qapi-event.py | 4 +-
target-s390x/cpu_models.c | 4 +-
tests/.gitignore | 6 +-
tests/Makefile.include | 20 +-
tests/check-qdict.c | 260 ++++++++++
tests/check-qnull.c | 8 +-
tests/check-qom-proplist.c | 334 ++++++++++++-
tests/test-qmp-commands.c | 4 +-
...-input-strict.c => test-qobject-input-strict.c} | 6 +-
...nput-visitor.c => test-qobject-input-visitor.c} | 207 +++++++-
...put-visitor.c => test-qobject-output-visitor.c} | 6 +-
tests/test-string-input-visitor.c | 2 +-
tests/test-string-output-visitor.c | 2 +-
tests/test-visitor-serialization.c | 8 +-
util/qemu-option.c | 27 +-
util/qemu-sockets.c | 4 +-
41 files changed, 2075 insertions(+), 832 deletions(-)
delete mode 100644 include/qapi/qmp-input-visitor.h
create mode 100644 include/qapi/qobject-input-visitor.h
rename include/qapi/{qmp-output-visitor.h => qobject-output-visitor.h} (66%)
delete mode 100644 qapi/qmp-input-visitor.c
delete mode 100644 qapi/qmp-output-visitor.c
create mode 100644 qapi/qobject-input-visitor.c
create mode 100644 qapi/qobject-output-visitor.c
rename tests/{test-qmp-input-strict.c => test-qobject-input-strict.c} (98%)
rename tests/{test-qmp-input-visitor.c => test-qobject-input-visitor.c} (81%)
rename tests/{test-qmp-output-visitor.c => test-qobject-output-visitor.c} (99%)
--
2.7.4
- [Qemu-devel] [PATCH v12 0/6] QAPI/QOM work for non-scalar object properties,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH v12 2/6] option: make parse_option_bool/number non-static, Daniel P. Berrange, 2016/09/15
- [Qemu-devel] [PATCH v12 1/6] qdict: implement a qdict_crumple method for un-flattening a dict, Daniel P. Berrange, 2016/09/15
- [Qemu-devel] [PATCH v12 5/6] qapi: add a QObjectInputVisitor that does string conversion, Daniel P. Berrange, 2016/09/15
- [Qemu-devel] [PATCH v12 4/6] qapi: rename QmpOutputVisitor to QObjectOutputVisitor, Daniel P. Berrange, 2016/09/15
- [Qemu-devel] [PATCH v12 3/6] qapi: rename QmpInputVisitor to QObjectInputVisitor, Daniel P. Berrange, 2016/09/15
- [Qemu-devel] [PATCH v12 6/6] qom: support arbitrary non-scalar properties with -object, Daniel P. Berrange, 2016/09/15