Filip and I have worked on cleaning up the API trace infrastructure.

https://gerrit.fd.io/r/c/vpp/+/32652

api: API trace improvements

Type: improvement

 * add support for JSON format in API trace
 * add ability to replay JSON API trace in both VPP and VAT2
 * use CRC for backward compatibility check during JSON API replay
 * fix API trace CLI (and remove duplicits)
 * remove custom dump
 * remove
vppapitrace.py

 * update docs accordingly


https://gerrit.fd.io/r/c/vpp/+/33819/1

api: binary-api-json command to call api from vpp cli

binary-api-json <name> <JSON objects>
command uses the auto-generated JSON to/from API binary message
convertors to allow calling any API from the VPP command line.

Examples:
binary-api-json sw_interface_add_del_address {"sw_if_index": 1, "is_add": true, 
"del_all": false, "prefix": "
10.0.0.1/24
"}
binary-api-json sw_interface_dump {"sw_if_index": 4294967295, 
"name_filter_valid": false, "name_filter": ""}

DBGvpp# binary-api-json show_version {}
{
        "_msgname":     "show_version_reply",
        "_crc": "c919bde1",
        "retval":       0,
        "program":      "vpe",
        "version":      "22.02-rc0~3-g87ee3f86f",
        "build_date":   "2021-09-24T20:23:34",
        "build_directory":      "/vpp/master"
}



With these changes there should no longer be a need to manually write API code 
for tracing, replay or VAT. VAT2 and the new binary-api-json command in VPP is 
only using auto-generated code, so unless compatibility with VAT is desired no 
code need to be written.

Currently in the review process, expect them to go in within the next few days.

Cheers,
Ole

Attachment: signature.asc
Description: Message signed with OpenPGP

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20207): https://lists.fd.io/g/vpp-dev/message/20207
Mute This Topic: https://lists.fd.io/mt/85894984/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to