summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi/vpp_serializer.py
AgeCommit message (Collapse)AuthorFilesLines
2018-10-22PAPI: Add support for format/unformat functions.Ole Troan1-6/+35
With the introduction of new types, like vl_api_address_t it is now possible to call a message using one of those functions with a string representation. E.g. for an IP address ip_add_address(address="1.1.1.1/24") The language wrapper will automatically convert the string into the vl_api_address_t representation. Currently the caller must do the reverse conversion from the returned named tuple with the unformat function. rv = get_address_on_interface(sw_if_index=1) print(VPPFormat.unformat(rv.address)) Change-Id: Ic872b4560b2f4836255bd5260289bfa38c75bc5d Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-18PAPI: Expose API enums to tests / applicationsOle Troan1-0/+10
e.g: from vpp_papi import VppEnum VppEnum.vl_api_address_family_t.ADDRESS_IP4 Change-Id: I10c22d57234a1a06e98a889cf80b19085b468ed3 Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-16PAPI: Add bool type support in vppapigen.Ole Troan1-0/+2
Change-Id: I9c2eaa2ee04a1c9a92018afb92cb2c5610df2991 Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan1-1/+1
Adds support for running the API purely across Unix domain sockets. Usage: vpp = VPP(use_socket=True) Change-Id: Iafc1301e03dd3edc3f4d702dd6c0b98d3b50b69e Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-07PAPI: Unpack embedded types with variable length arrays.Ole Troan1-19/+32
Change-Id: Ic952ed5b837ac8409fd95e2b5cb92eb028ba0c40 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-03PAPI: Union pad at the end of short fields instead of at head.Ole Troan1-4/+2
Hopefully that's going to be consistent across platforms, compilers and ABI. Change-Id: I0b82565288d88fd046278d4d8288ec1488273ba5 Signed-off-by: Ole Troan <ot@cisco.com>
2018-07-19PAPI: Remove logging calls from pack/unpackOle Troan1-18/+0
This slowed down the decoder. Improved from 16s to 13s for 1000 dump/details messages. Change-Id: Iae78136b020cdd9344f3b2170ce426d0f074b6e6 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22Python API: Add enum and union support.Ole Troan1-0/+343
As well as a rewrite of the encoders/decoders to make it more readable and extensible. (Re-commit after fix to verify build.) Change-Id: Ic244d3cebe070bb2570491f8a24f4a1e203f889a Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-18Revert "Python API: Add enum and union support."Ole Trøan1-332/+0
This reverts commit a5ee900fb75201bbfceaf13c8bc57a13ed094988. Some of the unit tests breaks. Backing out until fixed. Change-Id: I1846fb417db44a2a772f7b59cda8bcfe6d39f8c3 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-17Python API: Add enum and union support.Ole Troan1-0/+332
As well as a rewrite of the encoders/decoders to make it more readable and extensible. Change-Id: I253369ac76303922bf9c11377622c8974fa92f19 Signed-off-by: Ole Troan <ot@cisco.com>