summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-22Python API: Add enum and union support.Ole Troan1-891/+0
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-0/+891
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-891/+0
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>
2018-06-06Alter logging semantics for VPP PAPI objectIan Wells1-2/+11
Logging previously used a string name for the log level and changed the system-wide log level based on this string name. It now uses a logging-module provided constant for the log level and changes its own logger's level based on the name, and only if the level is provided. This allows the logging to be more compatible with Pythonic usage, where an external source may be used to dictate logging levels across the system on a per module basis and should not be overridden. Change-Id: Icf6896ff61a29b12c11d04374767322cdb330323 Signed-off-by: Ian Wells <iawells@cisco.com>
2018-05-07fix: AttributeError: module 'os' has no attribute 'cwd'Andrey "Zed" Zaikin1-1/+1
Change-Id: I1c49a12ef7fa7bd0046f1a420b01c1654b6d21ec Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-04-12fixes python3 TypeError; python2 intactAndrey "Zed" Zaikin1-1/+1
exception in vpp_api.vac_write(): "TypeError: initializer for ctype 'char *' must be a bytes or list or tuple, not str" Change-Id: Ib6bcfb86e6e36c557174979a110113af689c6754 Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-03-01PAPI: pycodestyle on vpp_papi.pyOle Troan1-22/+36
Change-Id: I15cf4a9fd2d2518df4bfffc1ba3c556a87ca5afa Signed-off-by: Ole Troan <ot@cisco.com>
2018-02-17vpp_papi: remove legacy way of calling VPP APIsKlement Sekera1-7/+0
This allows VPP to define APIs which conflict with internal function names used in vpp_papi without issues. Change-Id: I56c21814e1c11fa2aa6bcd95adb3fdeacd304e8e Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-17vpp_papi: reduce memory leaksKlement Sekera1-12/+16
This changes makes unused VPP objects collectable by garbage collector, allowing running all `make test` tests again instead of python crashing due to running out of memory. Change-Id: I0e271c2b3f195d9d3b64840f9f11144da0fe967d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-01-25VPP-1144: PAPI Import leads to duplicate type definition.Ole Troan1-0/+15
Change-Id: I54c147004fd93681a6a9cf30fa5277c1dabce67c Signed-off-by: Ole Troan <ot@cisco.com>
2017-11-20Have PAPI find its API definition filesChris Luke1-5/+140
- Add a basic heuristic to have vpp_papi search in several places for the JSON API files. - It's clever enough to work out the path to these files from within several places in the source tree, falling back to the system location as a last resort. Change-Id: I1f823588e5aa0064d545ce4206ab29dbdedc4c7f Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-11-20nowhere to set read_timeoutdongjuan1-2/+2
Change-Id: I8a16f2ba884451ca8028adb91383d57fdf1d9d50 Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2017-11-01VPP-959: Support old version of CFFIOle Troan1-2/+16
Change-Id: I3d3e5dff5b22fca58a50da6a9d0aaf1182e736dd Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-31VPP PAPI: Error in unserializer for non-array compound types.Ole Troan1-0/+1
A bug in the decoder of messages when there was a non-array compound type. The typical result was an error message from the struct library: "error:unpack_from requires a buffer of at least 4 bytes" Change-Id: Ie30fec6fc39b9f4177b54fa4adc4fc69674f0e12 Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-25VPP-1033: Python API support arbitrary sized input parameters.Ole Troan1-13/+49
Dynamically calculate the required buffer size to pack into based on message definition. Also add input parameter length checking. Change-Id: I7633bec596e4833bb328fbf63a65b866c7985de5 Signed-off-by: Ole Troan <ot@cisco.com>
2017-09-13VPP-960: Python API add more information in exception for invalid arguments ↵Ole Troan1-1/+4
to API calls. Change-Id: I266eef8419fd98b9b900573ac9b032a62600ab86 Signed-off-by: Ole Troan <ot@cisco.com>
2017-08-18Python API: Fix error message typo.Ole Troan1-1/+1
Change-Id: Icb67797a91a5929e57a08b79adeca226fee09de3 Signed-off-by: Ole Troan <ot@cisco.com>
2017-08-17Python API: VPP-947 Empty chroot_prefix fails on encode()Ole Troan1-4/+4
Change-Id: Ide2cdc456f3ab3219930fb8e423b871810469cdc Signed-off-by: Ole Troan <ot@cisco.com>
2017-07-08API: Add Python3 support to vpp_papi.pyOle Troan1-65/+97
Change-Id: I0657b3f7578eb1b4d9a1ecabc14dc0f0e4647c65 Signed-off-by: Ole Troan <ot@cisco.com>
2017-04-20vpp-api: rename libpneum to libvppapiclientDamjan Marion1-33/+33
Change-Id: Ie6d2c769b316b43c40632aa9009c4ff6442cf658 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-15Python API: Change from cPython to CFFI.Ole Troan1-0/+635
Change-Id: I03e52466fb3f909ae52b8fba601168f3eadbd972 Signed-off-by: Ole Troan <ot@cisco.com>