aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py
AgeCommit message (Collapse)AuthorFilesLines
2020-12-03papi: remove python2 patternsPaul Vinciguerra1-1/+1
Type: refactor Change-Id: I541759b4b788acf08599661eb9e7abc58e9283d2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-03papi: allow client control over loggersPaul Vinciguerra1-0/+4
This change enables a client to set debug levels globally as well as individually. exposes loggers as vpp_papi vpp_papi.serializer vpp_papi.transport Type: improvement Change-Id: Ib6bd1a1f552b51a22c9fe3de819a5fb970963ae5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-02papi: improve unit testabilityPaul Vinciguerra1-2/+6
refactor the code so that snippets of json can be used to test vpp_papi example unit test provided Type: improvement Change-Id: Ibec608fd2e5b12515aa4db17d85d4319134c22ea Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-10-07api: add heap alloc to vpp statsOle Troan1-1/+1
The Python VPP Stats module also used the VPP heap. Fix so it now explicitly allocates a heap. Fixes: f68fccfe7e188fec2c9f91da38ca9acf6f67d811 Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I0bd4ae64d6c89cdf634d8d9a91c23ab38017c5cc Signed-off-by: Ole Troan <ot@cisco.com>
2020-09-28api: remove clib_mem_init from vppapiclient contructorOle Troan1-1/+4
Having the constructor in the vppapiclient library led to conflicts with applications wanting to allocate their own heap. Note: Change of behaviour, applications that do not use a CLIB heap must now call vac_mem_init() before using any functions from vppapiclient. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib155a54579ea5a0dbc26cb4b6daca1274e1dfdfa
2019-12-03papi: add a per-call _timeout optionPaul Vinciguerra1-2/+4
add the ability to override the default timeout value on a per-call basis. Use: rv = self.vapi.papi.cli_inband(cmd='wait 10', _timeout=15) Type: feature Change-Id: Ia90a58586a1f63e02118599a2a4b7141e5a0b90d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-09-04api: memclnt api use string type.Ole Troan1-2/+2
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Idad79286b7730c8e85202c4b8e675ea50f8bbc48 Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-25api: fix vac_read return codesPaul Vinciguerra1-2/+9
- vac_read was returning the same code for multiple errors. - Refactor VppTransportShmemIOError to capture rv and description. Type: refactor Change-Id: Ifb8ca5ff679f658bcd92a43ecddaffd2fc18dbd5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29vpp_papi: Add custom exceptions.Paul Vinciguerra1-4/+10
This patchset adds and raises the following custom exception classes: * class VPPApiError(Exception): * class VPPNotImplementedError(NotImplementedError): * class VPPIOError(IOError): * class VPPRuntimeError(RuntimeError): * class VPPValueError(ValueError): * class VPPSerializerValueError(ValueError): * class VPPStatsIOError(IOError): * class VPPStatsClientLoadError(RuntimeError): * class VppTransportShmemIOError(IOError): * class VppTransportSocketIOError(IOError) Change-Id: Ia40900fd2dcef148d01125d6c691329fc666901e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28vpp_papi: Reserved keywords.Paul Vinciguerra1-2/+2
'async' and 'await' are reserved keywords starting with Python 3.7. This change is necessary to support VPP-1508. Change-Id: Iba2b3aef98a0ecaabc1622719b364f8f4ab5d5a3 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28vpp_papi: Use new style classes.Paul Vinciguerra1-1/+1
Python2 defaults to old style classes to maintain compatability with python 2.1. Moving to new style classes will ensure consistent behavior across interpreters. Change-Id: I89493d608d1edb63989000c17a9566a97785a4aa Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-05Provide return value for PAPI disconnect()Igor Mikhailov (imichail)1-1/+1
Change-Id: I209f570634636725ce8fda5f61e900a71227b888 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan1-0/+117
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>