diff options
author | Ole Troan <ot@cisco.com> | 2019-10-14 23:07:06 +0200 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-11-12 17:59:18 +0000 |
commit | c046d709e1e493d20fee80f8c23b4106be67a98e (patch) | |
tree | cfcaa5abe549fe8dc6103c0df6499a465ae8cbbf /src/vnet/ip/format.c | |
parent | 31bd035621bdc57deb757613b534bd6c2b032814 (diff) |
papi: add wrapper to validate crc manifest
If a client application is built against 19.08, it can dump the "manifest" of API signatures.
Either the all APIs (--dump) or the APIs it is interested in (--dumpfiltered).
When the developers of said client application wants to verify that it works with VPP 20.01.
It can connect to VPP and --validate the old mainfest file, and will be told a list of
messages (both request and reply) that has changed.
import argparse
from vpp_papi import VPP
import sys
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument("--dump", action="store_true")
group.add_argument("--dumpfiltered", action="store_true")
group.add_argument("--validate", action="store_true")
args = parser.parse_args()
vpp = VPP(use_socket=True)
vpp.connect(name='apimanifest')
if args.validate:
# Verify manifest
message_table = eval(sys.stdin.read())
missing = vpp.validate_message_table(message_table)
print ('Changed message signatures: {}'.format(missing))
elif args.dump:
# Output manifest to stdout
print('{}'.format(vpp.dump_message_table()))
elif args.dumpfiltered:
# Output manifest to stdout
filterlist = eval(sys.stdin.read())
print('{}'.format(vpp.dump_message_table_filtered(filterlist)))
vpp.disconnect()
Type: feature
Change-Id: I7e708b36f599ed88e4864970c8593cc2fe5fbf61
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vnet/ip/format.c')
0 files changed, 0 insertions, 0 deletions