summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
AgeCommit message (Collapse)AuthorFilesLines
2019-07-05gbp: add unit-tests for anonymous l3outBenoît Ganne1-2/+3
Type: test Change-Id: Ib32c87b7f07c0552a6801a895332a0156c3c37f0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-01gbp: VRF scoped contractsNeale Ranns1-2/+5
Type: feature Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-25tests: fix test_gbp.py.Paul Vinciguerra1-52/+1
A number of VppGbpContractRules were missing the hash_mode_t and were being replaced by an optional kwarg. Type: fix Change-Id: I6ca03c93b69e4355c237a6c9402e1e178b701b21 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18ipsec: ipsec-tun protectNeale Ranns1-13/+0
please consult the new tunnel proposal at: https://wiki.fd.io/view/VPP/IPSec Type: feature Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18fib: fib api updatesNeale Ranns1-105/+132
Enhance the route add/del APIs to take a set of paths rather than just one. Most unicast routing protocols calcualte all the available paths in one run of the algorithm so updating all the paths at once is beneficial for the client. two knobs control the behaviour: is_multipath - if set the the set of paths passed will be added to those that already exist, otherwise the set will replace them. is_add - add or remove the set is_add=0, is_multipath=1 and an empty set, results in deleting the route. It is also considerably faster to add multiple paths at once, than one at a time: vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11 100000 routes in .572240 secs, 174751.80 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12 100000 routes in .528383 secs, 189256.54 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13 100000 routes in .757131 secs, 132077.52 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14 100000 routes in .878317 secs, 113854.12 routes/sec vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14 100000 routes in .900212 secs, 111084.93 routes/sec Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-14ipsec: Correctly rewind the buffer to the IP header when punting UDP ↵Neale Ranns1-1/+3
encapped SPI-0 packets Type: fix Fixes: b71fa75d48 Change-Id: I2d81b373f7659e702759939c096b315afa36f621 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-28Punt: socket register for exception dispatched/punted packets based on reasonNeale Ranns1-18/+5
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-27IPIP tunnel: use address types on APINeale Ranns1-1/+0
Change-Id: Ida6a8f96bd858246e993250087bed45e7084ede1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-17Tests: Refactor. Remove copies of enums.Paul Vinciguerra1-18/+0
Use the enums provided from the api definitions instead. Change-Id: I43b7591df920c984e439efc4b3ec3c4121c539d8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17Tests: Raise exception if API cli_inband command fails.Paul Vinciguerra1-0/+12
* Configure tests to raise exception if cli_inband fails. * Fix failing tests. * Add filename detail to pcap.stat clib_error_return for debugging. Note: this change identifies spurious issues with packet-generator such as: CliFailedCommandError: packet-generator capture: pcap file '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist. These issues resolve themselves on remaining test passes. Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-15vpp_papi: remove dependency on environment var. VPP_API_DIR.Paul Vinciguerra1-10/+9
Change-Id: I9e3af8674e8aae27079fd03f6286f165d777814f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-10tests: test/vpp_papi_provider.py Specify exception to catch.Paul Vinciguerra1-1/+1
Change-Id: If936b198bcac7a317d52f958561c3e19d158450a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-02NAT: VPP-1661 - test case cleanup and refactoringFilip Varga1-459/+0
Change-Id: I0eb85252d4b489ba25dcf59252e2bcf3b0cd5c6a Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-05-02vpp_papi_provider.py: update defautmapping.Paul Vinciguerra1-0/+2
Add missing create_bvi/delete_bvi to defaultmapping. Correct typo in interface.api documentation. Change-Id: I8aa187f3b33c21fb2fcd55311ef79777c81d94d4 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-24NAT: VPP-1531 api cleanup & updateFilip Varga1-183/+56
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23API: Python and Unix domain socket improvementOle Troan1-1/+9
Handle the case where buffer overflows. Then SOCK_SEQPACKET assumption that multiple API messages are not returned by recv() is broken. Use SOCK_STREAM for API exchanges instead. Add support for running tests over sockets. make test SOCKET=1 Change-Id: Ibe5fd69b1bf617de4c7ba6cce0a7c2b3f97a2821 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23Revert "NAT: VPP-1531 api cleanup & update"Ole Trøan1-56/+183
This reverts commit bed1421b9f1b3643d93384084972337b596aec73. /vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’: /vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) ^ /vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’ rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1); ^~~~~~~~~ Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23NAT: VPP-1531 api cleanup & updateFilip Varga1-183/+56
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-18GRE: API updateNeale Ranns1-14/+15
Change-Id: I5010cd34123c6498230dedac6ba8dd774a1085f9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-17api: Add to interface crud - read by sw_if_index.Paul Vinciguerra1-0/+1
Change-Id: I02c857da4cf6da5e0e55c1e48b63716af7ade0a9 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-17IPSEC: Pass the algorithm salt (used in GCM) over the APINeale Ranns1-2/+5
Change-Id: Ia8cea13f7b937294e6a080a55fb2ceff30063acf Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02IPSEC-GRE; testsNeale Ranns1-0/+13
failing test disabled on ARM Change-Id: I6b7535cd8f51fdaf9786ba77f9f61a7d8d049bbd Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29tests: test/vpp_l2.py fix missing name.Paul Vinciguerra1-13/+0
test/vpp_l2.py:213:26: F821 undefined name 'L2_VTR_OP' self.itf.set_vtr(L2_VTR_OP.L2_DISABLED) Move L2_VTR_OP enum to vpp_sub_interface.py where the VTR code is found. Change-Id: I9eb9a3a2c679813c221ce1d0c4fa8aac6076c443 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-7/+7
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-27GBP: fixes for l3-out routingNeale Ranns1-1/+3
Change-Id: I4d73b712da911588d511a8401b73cdc3c66346fe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-22tests: update test_lb.py to use api call lb_conf.Paul Vinciguerra1-0/+2
Change-Id: I96a1d4b2b3ae22cf164c0acd6db9b323cd70f51a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-21ipsec: add ipv6 support for ipsec tunnel interfaceKingwel Xie1-14/+21
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2019-03-19Revert "tests: Deprecate the use of CLI commands in tests."Neale Ranns1-5/+0
This reverts commit e2e8f02165f27ae04e6d20ce0c628e29271a8db6. Change-Id: Ie23dcb8a5b3e96f77e0d117a6887c43064c79669 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-18Tests: Trivial. Define constants once.Paul Vinciguerra1-4/+1
Change-Id: Iaf106962598d04708e8740e016d5c55ff35432c9 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18tests: Deprecate the use of CLI commands in tests.Paul Vinciguerra1-0/+5
Since the stated policy regarding CLI commands is: "Note that the debug CLI is a developer's tool - no warranty express or implied - and that we may choose not to fix debug CLI bugs.", this change emits a deprecation warning whenever a test case calls a CLI command. Change-Id: I91b30e86ae1b2fca36732837f36cdda762cdf458 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11vpp_papi_provider: Remove more wrapper functions.Ole Troan1-403/+5
Split this work up into pieces. Please don't add new wrappers to vpp_papi_provider.py. Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10 Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-11VPP-1508: Tests: Fix vpp_api struct.error under py3.Paul Vinciguerra1-2/+2
Fix struct.error: expected bytes object got <class 'str'> Change-Id: I837ae6e97e44c789a9372677151b157956525334 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Tests: fix time.sleep(0) # yield. Reduce sleep related log messages.Paul Vinciguerra1-1/+1
Reduce the incidence of: 20:04:23,606 unexpected time.sleep() result - slept for 2.187967e-03s instead of ~6.837845e-04s! Change-Id: Ic576fda7f75e571c9019111588a6a936ee2cf5c2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-06test framework: vpp_papi_provider.py - further cleanupOle Troan1-1073/+249
Part of further cleanups of this file. Removed most wrappers that don't have conflicting signature with message API. Change-Id: I6acd93d20291feb7731eb35ab2eb8c9f22f4632c Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-06GBP: use sclass in the DP for policyNeale Ranns1-13/+13
Change-Id: I154e18f22ec7708127b8ade98e80546ab1dcd05b Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-06GBP: learn from ARP and L2 packetsNeale Ranns1-2/+3
Change-Id: I8af7bca566ec7c9bd2b72529d49e04c6e649b44a Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-05Test: vpp_papi_provider. __getattr__Paul Vinciguerra1-4/+8
Replace custom __getattr__ with custom __getattribute__. Change-Id: Ib96176abc07eefedba305ed874621001a810eb0d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-05GBP: per-group EP retention policyNeale Ranns1-7/+4
Change-Id: I3ed4e2e92f74f15b07fcd3e7fbc3fa8718d5249d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-04test framework: Fix wrapper functions to match API message names.Ole Troan1-146/+74
In preparation to remove the wrappers in vpp_papi_provider.py, ensure names used in tests match the actual API message names. Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19 Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-04test framework: add factory function and default parametersOle Troan1-75/+36
This is the first step to be able to remove all the API message wrappers in vpp_papi_provider.py. This allows to remove all functions that do not override parameters (different from zero), and a separate dictionary for messages requiring different defaults. The general requirement is that all new tests should use named arguments directly. Not positional arguments through the wrapper. Note when removing functions, the calls in vpp_papi_provider wrappers do not necessarily follow message order. Change-Id: If64916c07f8622c138db3a9d7c4a98b93a058e68 Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-27NAT44: active-passive HA (VPP-1571)Matus Fabian1-0/+44
session synchronization so that we can build a plain active-passive HA NAT pair Change-Id: I21db200491081ca46b7af3e82afc677c1985abf4 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2019-02-04Fix inheritance problem in test/hook.py.Paul Vinciguerra1-2/+1
Subclasses cannot modify the signature of their constructors. def __init__(self, test): - super(PollHook, self).__init__(test.logger) + super(PollHook, self).__init__(test) Change-Id: I764df8871128f9198a03fac4ec2f45528547467a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-31IPSEC: API modernisationNeale Ranns1-45/+49
- use enums to enumerate the algoritms and protocols that are supported - use address_t types to simplify encode/deocde - use typedefs of entry objects to get consistency between add/del API and dump Change-Id: I7e7c58c06a150e2439633ba9dca58bc1049677ee Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-30Use IP and MAC API types for neighborsNeale Ranns1-30/+28
use address_t and mac_address_t for IPv6 and ARP entries and all other API calls in ip.api aprat from the route ones, that will follow in a separate commit Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-25IPSEC: tests use opbject registryNeale Ranns1-0/+17
this means we test the dumps - to some extent Change-Id: I8d90745701012012b41a7b3aaf9be97b4dd2bdf8 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-22GBP: Sclass to src-epg conversionsNeale Ranns1-3/+6
Change-Id: Ica88268fd6a6ee01da7e9219bb4e81f22ed2fd4b Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-18VTL: Fix sphinx doc generation.Paul Vinciguerra1-13/+1
Remove unnecessary envvar magic for sphinx builds. Just provide the proper mock objects. Change-Id: I151513eb47d2f71cf221651145dbcdc153448772 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-14VTL: vpp_papi_provider: Don't shortcircuit vpp_papi jasonfile detection.Paul Vinciguerra1-5/+5
The detection login in vpp_papi is significantly more advanced than the implementation in vpp_papi_provider. Let's take full advantage of it and ensure consistent behavior. Change-Id: I786e6d5f4588a0d74e863cce1b0bc1a93fa0e614 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-13bonding: support custom interface IDsAlexander Chernavin1-2/+5
Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2019-01-09test/vpp_papi_provider.py: Fix simple copy/paste error.Paul Vinciguerra1-1/+0
Change-Id: I8993132bdd0931c96ba8bc879ec3b4ae938a46c5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>