[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 0/9] Properly implement json pseudo-protocol string deflattening



In qemu's new syntax starting from 2.9 it's possible to have nested objects in
the json pseudo protocol string specifying a backing store for an image. Libvirt
would not be able to handle some of them, since the json deflattener was
meant to deflatten only 1 layer.

Peter Krempa (9):
  tests: Rename jsontest to virjsontest
  util: json: Add virJSONValueIsObject
  util: Move JSON object deflattening code to json utility file
  util: json: Don't remove the 'file' subobject when deflattening
  tests: json: Add test for the deflattening function
  util: json: Properly implement JSON deflattening
  util: json: Recursively deflatten objects virJSONValueObjectDeflatten
  util: storage: Always deflatten JSON pseudo-protocol objects
  tests: Validate that JSON deflattening fixed nested json
    pseudo-protocol strings

 src/libvirt_private.syms                           |   2 +
 src/util/virjson.c                                 | 115 +++++++++++++++++++++
 src/util/virjson.h                                 |   4 +
 src/util/virstoragefile.c                          |  79 ++------------
 tests/Makefile.am                                  |   8 +-
 tests/virjsondata/deflatten-basic-file-in.json     |   8 ++
 tests/virjsondata/deflatten-basic-file-out.json    |  10 ++
 tests/virjsondata/deflatten-basic-generic-in.json  |  14 +++
 tests/virjsondata/deflatten-basic-generic-out.json |  20 ++++
 .../deflatten-concat-double-key-in.json            |   7 ++
 tests/virjsondata/deflatten-concat-in.json         |   5 +
 tests/virjsondata/deflatten-concat-out.json        |   8 ++
 tests/virjsondata/deflatten-deep-file-in.json      |   9 ++
 tests/virjsondata/deflatten-deep-file-out.json     |  23 +++++
 tests/virjsondata/deflatten-deep-generic-in.json   |   9 ++
 tests/virjsondata/deflatten-deep-generic-out.json  |  27 +++++
 tests/virjsondata/deflatten-double-key-in.json     |   4 +
 tests/virjsondata/deflatten-nested-in.json         |  16 +++
 tests/virjsondata/deflatten-nested-out.json        |  28 +++++
 tests/virjsondata/deflatten-qemu-sheepdog-in.json  |  11 ++
 tests/virjsondata/deflatten-qemu-sheepdog-out.json |  13 +++
 tests/virjsondata/deflatten-unflattened-in.json    |  12 +++
 tests/virjsondata/deflatten-unflattened-out.json   |  14 +++
 tests/{jsontest.c => virjsontest.c}                |  75 ++++++++++++++
 tests/virstoragetest.c                             |  10 ++
 25 files changed, 458 insertions(+), 73 deletions(-)
 create mode 100644 tests/virjsondata/deflatten-basic-file-in.json
 create mode 100644 tests/virjsondata/deflatten-basic-file-out.json
 create mode 100644 tests/virjsondata/deflatten-basic-generic-in.json
 create mode 100644 tests/virjsondata/deflatten-basic-generic-out.json
 create mode 100644 tests/virjsondata/deflatten-concat-double-key-in.json
 create mode 100644 tests/virjsondata/deflatten-concat-in.json
 create mode 100644 tests/virjsondata/deflatten-concat-out.json
 create mode 100644 tests/virjsondata/deflatten-deep-file-in.json
 create mode 100644 tests/virjsondata/deflatten-deep-file-out.json
 create mode 100644 tests/virjsondata/deflatten-deep-generic-in.json
 create mode 100644 tests/virjsondata/deflatten-deep-generic-out.json
 create mode 100644 tests/virjsondata/deflatten-double-key-in.json
 create mode 100644 tests/virjsondata/deflatten-nested-in.json
 create mode 100644 tests/virjsondata/deflatten-nested-out.json
 create mode 100644 tests/virjsondata/deflatten-qemu-sheepdog-in.json
 create mode 100644 tests/virjsondata/deflatten-qemu-sheepdog-out.json
 create mode 100644 tests/virjsondata/deflatten-unflattened-in.json
 create mode 100644 tests/virjsondata/deflatten-unflattened-out.json
 rename tests/{jsontest.c => virjsontest.c} (89%)

-- 
2.12.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]