summaryrefslogtreecommitdiffstats
path: root/src/vpp-api
AgeCommit message (Collapse)AuthorFilesLines
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan4-20/+39
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-05stat-client: pass names as const stringsNeale Ranns2-4/+4
Change-Id: I8debcd078b733ed19c4b46ea41a2a150d816724c Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29vpp_papi: Add custom exceptions.Paul Vinciguerra6-54/+121
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-29vpp_papi: Fix: raise NotImplemented.Paul Vinciguerra1-1/+1
'raise NotImplemented' should be 'raise NotImplementedError'. NotImplemented is not part of the Exception heirarchy. Change-Id: I7fb647f1d56e689fafa2cd9a5566da826def072b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29API: Add support for type aliasesOle Troan5-23/+87
Previously all types are compound. This adds support for aliases, so one can do things like: typedef u32 interface_index; or typedef u8 ip4_address[4]; Change-Id: I0455cad0123fc88acb491d2a3ea2725426bdb246 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29VPP-1508: vpp_transport_socket.py fix importPaul Vinciguerra1-1/+4
Import queue in an py2-py3 compatable way. Change-Id: I83f166a959c4ee55438e3997edbcb596dc72059f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28vpp_papi: Reserved keywords.Paul Vinciguerra2-3/+3
'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 Vinciguerra6-13/+13
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-26stats: Remove unneeded dependencies in stat_clientOle Troan2-7/+21
Remove exposing stat_client_main internals and atomics to simplify use from C++. Change-Id: Ie864170fee8b4eaa2fd7f98556cf0ebb46cb1a2a Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-26vapi: break if parsing progress cannot be madeKlement Sekera1-0/+1
Change-Id: I1b76994f674a045f7fce3d61ef2aa5294ddb53a9 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-22stat_client issues while running parallel tests.Paul Vinciguerra4-52/+162
This patch addresses intermittent problems we saw in our CI while running parallel tests. Change-Id: Icb5fdb34cc134e3eb341225d56ab67fbbef80b0d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-07Unresolved symbols in libvapiclientNeale Ranns1-0/+1
Change-Id: I6d6a73ac62f24928fb51e89948b92a1cb9134c40 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-05Provide return value for PAPI disconnect()Igor Mikhailov (imichail)2-1/+3
Change-Id: I209f570634636725ce8fda5f61e900a71227b888 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-11-05Alter logging semantics for VPP PAPI objectIgor Mikhailov (imichail)1-1/+1
Restore parts of commit d0e812f wiped out by a7564e80 The full description of the change is in d0e812f Change-Id: I632476cb10678a725396462f90f9b0bea9e572fa Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-10-23c11 safe string handling supportDave Barach4-13/+14
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22PAPI: Add support for format/unformat functions.Ole Troan5-12/+247
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-22stats: Add wrapper for vec_freeOle Troan3-0/+8
The result vector from stat_segment_ls must be freed by the caller. Add wrapper for non-C language bindings. Change-Id: I7eee7f80ec98b41696d354add47b26978e12ef0f Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-18PAPI: Expose API enums to tests / applicationsOle Troan2-16/+43
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-16PAPI: Add timeout support for socket transportOle Troan1-3/+6
Change-Id: I0402989e0ac738cab2f918e6e3d73c571457c08e Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-09API: Spurious timeouts from timeout thread.Ole Troan1-13/+27
Change-Id: I1be1101ba4d82688a32b5ae2c39ca5d92dc244b7 Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-03stat_client.c coverity error.Ole Troan1-2/+0
Change-Id: Ic072beb8882981425f436936f239e8c8bf229a99 Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-02VPP-1440: clean up coverity warningsDave Barach1-0/+4
Change-Id: Ic6823fb617ecae547a5f0e28b1e037848e40f682 Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-02Stats: vpp_prometheus_export fixes.Ole Troan1-0/+4
- Crash on /sys/nodes if per-node-counters off - Require patterns parameters. Change-Id: If4fddefb17504a92ba462c7af91e373601b66a5c Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan5-111/+332
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-27Trivial: Cleanup some typos.Paul Vinciguerra1-1/+1
This is a new commit for code under a different maintainer. Change-Id: I79fa403fec6a312238a9a4b18b35dbcafaa05439 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-27IPIP and IPv6 fragmentationOle Troan1-1/+2
- Error where ICMPv6 error code doesn't reset VLIB_TX = -1 Leading to crash for ICMP generated on tunnelled packets - Missed setting VNET_BUFFER_F_LOCALLY_ORIGINATED, so IP in IPv6 packets never got fragmented. - Add support for fragmentation of buffer chains. - Remove support for inner fragmentation in frag code itself. Change-Id: If9a97301b7e35ca97ffa5c0fada2b9e7e7dbfb27 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-18STATS: Optimistic concurrency handling in Python library.Ole Troan1-4/+24
Change-Id: I2135f3e77206fd171636a1e0b07c373c0bf093e4 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-18STATS: Add Python 3 support to vpp_stats.py.Ole Troan2-4/+4
Change-Id: Iad0b0315fbd493b67e6ca490206ec8e8422790ea Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-17STATS: Dynamically mapped shared memory segmentOle Troan5-264/+270
Move from using a hash to a vector with offsets into shared memory. Limit exposure of VPP data structures and include files to external stats library and applications. Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-11vapi: support VLAs in typedefsKlement Sekera2-28/+96
Change-Id: I3af3916b68189c2174020e5ecc29a7bc45b25efa Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-07cmake: set packaging component for different filesDamjan Marion1-2/+11
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07VPP-API: Cancel timeout thread without sending READ_TIMEOUT message.Ole Troan1-8/+6
This caused a spurious message to be sent on the API ring causing debug messages. Change-Id: Ief4ca655ae048aad386a88fed11e8c1114378dc7 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-07PAPI: Unpack embedded types with variable length arrays.Ole Troan3-36/+97
Change-Id: Ic952ed5b837ac8409fd95e2b5cb92eb028ba0c40 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-03vapi: init clib mem heap on connect if neededKlement Sekera1-0/+4
Change-Id: Id45a3a37dd77771289622314406dccf50b64f04d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-02STATS: Python binding to access VPP statistics and counters.Ole Troan4-8/+187
from vpp_papi.vpp_stats import VPPStats s = VPPStats(socketname='/var/run/stats.sock') c = s.ls('/if/rx') counters = s.dump(c) print(s.set_error_str()) Change-Id: I203ebe60b0c9ee5742aadc737c0f29051757959d Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-02Switch to cmakeDamjan Marion2-97/+0
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: missing dependenciesDamjan Marion1-2/+2
Change-Id: Iae03deb10d437286989dd3d45f8cc9690d463100 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: a bit of packaging workDamjan Marion1-0/+1
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-29STATS: stat_client updates.Ole Troan4-3/+447
New stat segment client library: vpp-api/client/stat_client.h New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...> Prometheus integration through: vpp_prometheus_export <pattern> Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-28VAPI: bugfixesKlement Sekera1-12/+8
Change-Id: I20cfbae8b704ca68fd8dda9c811dc282ce723871 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-28cmake: add python apiDamjan Marion2-0/+33
Change-Id: I7e899929843eba13fbee97caea51621423778cbe Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27VAPI: support enums & unionsKlement Sekera3-154/+283
Change-Id: I76ac7e4eeb6a300538d52a0e355d66937764a4d1 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-27cmake: Fix VAPI .hpp generationMohsin Kazmi2-2/+2
Change-Id: I2bec3b2511f00d017f9b3a727809631695222c1a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27cmake: fix clang build and few minor fixesDamjan Marion1-1/+2
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: add vapi buildDamjan Marion5-12/+104
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion1-4/+5
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25cmake: add more headers to the install listDamjan Marion1-0/+4
Change-Id: I3a0f48381232fcac1727034aa6d2504a8d1edb04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-23CSIT-1139: Implement parallel test executionjuraj.linkes1-1/+1
The implementation of parallel test execution in VPP Test Framework. - VPPTestCase test methods are grouped together - tests are running in separate processes - VPP instances spawned by tests are assigned to different cores - output from these processes is redirected through pipes and printed out testcase by testcase - TEST_JOBS env var is used to specify the number of parallel processes - improved test summary - a bit of code cleanup Change-Id: I9ca93904d9fe2c3daf980500c64a8611838ae28c Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-20CMakeLists file for vpp-apiNeale Ranns1-0/+24
Change-Id: I140e5df0a4a09dabafea8189586c3347952598a8 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>