numam-dpdk/app
Bruce Richardson 0f3d92f373 telemetry: eliminate duplicate code for json output
When preparing the json response to a telemetry socket query, the code
for prefixing the command name, and appending the file "}" on the end of
the response was duplicated for multiple reply types. Taking this code
out of the switch statement reduces the duplication and makes the code
more maintainable.

For completeness of testing, add in a test case to validate the "null"
response type - the only leg of the switch statement not already covered
by an existing test case in the telemetry_data tests.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:38 +02:00
..
dumpcap app/dumpcap: allow help/version without primary process 2022-03-08 09:32:59 +01:00
pdump app/pdump: free mempool at resources cleanup 2022-03-08 00:19:31 +01:00
proc-info dev: introduce device accessors 2022-09-23 16:14:34 +02:00
test telemetry: eliminate duplicate code for json output 2022-09-26 13:49:38 +02:00
test-acl app/acl: support different formats for IPv6 address 2022-05-30 23:31:37 +02:00
test-bbdev eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
test-cmdline
test-compress-perf bus: move IOVA definition from header 2022-09-23 16:14:34 +02:00
test-crypto-perf eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
test-eventdev eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
test-fib eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
test-flow-perf eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
test-gpudev gpudev: use CPU mapping in communication list 2022-02-22 20:08:52 +01:00
test-pipeline app: remove unneeded atomic header include 2021-11-17 11:07:06 +01:00
test-pmd ethdev: remove deprecated Flow Director configuration 2022-08-31 15:24:23 +02:00
test-regex app/regex: fix mbuf size for multi-segment buffer 2022-07-05 22:19:03 +02:00
test-sad eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
meson.build build: make pdump optional 2021-11-17 12:49:19 +01:00