Python API: Support for per message CRC and API split. 69/4069/2
authorOle Troan <ot@cisco.com>
Fri, 2 Dec 2016 11:53:55 +0000 (12:53 +0100)
committerDamjan Marion <dmarion.lists@gmail.com>
Fri, 2 Dec 2016 13:35:46 +0000 (13:35 +0000)
commita03f4efa92eb805d627e2f2f0cf55f70ea17c2fb
treeced6731033f6e58cb73b25cbdbd353263999ab0d
parent58290ea2f6364fdc6f0dd9c201d6d0b84025f3d3
Python API: Support for per message CRC and API split.

These changes are incompatible with Python VPP API 1.2

There is now a new VPP Class and it can be used like:

from vpp_papi import VPP
jsonfiles = []
for root, dirnames, filenames in os.walk('../../../build-root/'):
    if root.find('install-') == -1: continue
    for filename in fnmatch.filter(filenames, '*.api.json'):
        jsonfiles.append(os.path.join(root, filename))

vpp = VPP(jsonfiles)
rv = vpp.show_version()
print('RV', rv.program.decode().rstrip('\0x00'))
vpp.disconnect()

Change-Id: Ic92d226de2cf3626e750404012247e7fc24fb7fc
Signed-off-by: Ole Troan <ot@cisco.com>
vpp-api/python/setup.py
vpp-api/python/tests/test_vpp_papi2.py [new file with mode: 0755]
vpp-api/python/vpp_papi/vpp_api_base.py [deleted file]
vpp-api/python/vpp_papi/vpp_papi.py