From f60c526a2896829ffbbdf12ffcae5417de7bf87f Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Wed, 14 Feb 2024 11:10:27 +0000 Subject: [PATCH] rrd_updates: output JSON in the same structure as XML the data field is not part of meta. see the XML generator at ocaml/libs/xapi-rrd/lib/rrd_updates.ml line 124 The issue was introduced when serialization was changed to use yojson: https://github.com/xapi-project/xcp-rrd/commit/048b0e33b992e45ba8a465b24bbbfe10aa5d65c2 Signed-off-by: Pau Ruiz Safont --- ocaml/libs/xapi-rrd/lib/rrd_updates.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/libs/xapi-rrd/lib/rrd_updates.ml b/ocaml/libs/xapi-rrd/lib/rrd_updates.ml index e1e3a98f88d..d9de5b045b5 100644 --- a/ocaml/libs/xapi-rrd/lib/rrd_updates.ml +++ b/ocaml/libs/xapi-rrd/lib/rrd_updates.ml @@ -194,9 +194,9 @@ let json_of_t t = ; ("rows", int (Array.length t.data)) ; ("columns", int (Array.length t.legend)) ; ("legend", array (map_to_list string t.legend)) - ; ("data", array (map_to_list data_record t.data)) ] ) + ; ("data", array (map_to_list data_record t.data)) ] in Yojson.to_string meta