1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-17 06:04:23 +03:00
Peter Rajnoha 094fce3776 libdm: report: implement DM_REPORT_GROUP_JSON for JSON report output
This patch introduces DM_REPORT_GROUP_JSON report group type. When using
this group type and when pushing a report to such a group, these flags
are automatically unset:

   DM_REPORT_OUTPUT_ALIGNED
   DM_REPORT_OUTPUT_HEADINGS
   DM_REPORT_OUTPUT_COLUMNS_AS_ROWS

...and this flag is set:

   DM_REPORT_OUTPUT_BUFFERED

The whole group is encapsulated in { } for the outermost JSON object
and then each report is reported on output as array of objects where
each object is the row from report:

  {
     "report_name1": [
         {field1="value", field2="value",...},
         {field1="value", field2="value",...}
         ...
     ],
     "report_name2": [
         {field1="value", field2="value",...},
         {field1="value", field2="value",...}
         ...
     ]
     ...
  }
2016-06-20 10:42:26 +02:00
..
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-02-23 12:25:25 +01:00
2016-01-21 12:11:37 +01:00
2015-08-17 17:20:14 +01:00
2016-01-21 12:11:37 +01:00
2016-05-23 16:46:38 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00