aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/IPUtil.py
AgeCommit message (Collapse)AuthorFilesLines
2020-01-15Hoststack perf infrastructure refactoringDave Wallace1-14/+90
- DUT only topology (hoststack test apps are co-located with vpp) - Make vpp app specific keywords generic where applicable - Add IP4 Prefix to topology file - Support running wrk in linux namespace - Refactor namespace cleanup - Remove redundant namespace creation code - Refactor test/keyword dirs: tcp -> hoststack - Add hoststack utility keywords - Refactor wrk suite setup/teardown - Update tests with recent perf infra changes Change-Id: Ia1cf07978d579393eef94923819a87c8c1f36f34 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-12-11CSIT-1597 API cleanup: tapJan Gelety1-8/+6
- cover API changes in VPP: https://gerrit.fd.io/r/c/vpp/+/21706 - cover API cahnges in VPP: https://gerrit.fd.io/r/c/vpp/+/23887 - update vpp stable to version 20.01-rc0~828 Change-Id: I70d88741a02729421d4b31010910138838811518 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-12-05Deal with some "pylint: disable=" commentsVratko Polak1-1/+2
+ When possible, fix the violation. + Else, add a comment: + An explanation (if not already present) and keep disable. + A TODO (if not already present) and remove the disable. - This makes tox job report more pylint violations, but any such violation is fixable and should be fixed. - Although some need to be fixed in VPP, such as enum item long names. Change-Id: I48604b5eda070083d79dff1439620dbd9e798e1f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-11-28Python3: resources and librariesJan Gelety1-120/+127
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-08-20Interface API cleanupJan Gelety1-24/+47
CSIT code alignment with API changes in VPP introduced by patch https://gerrit.fd.io/r/c/vpp/+/18361 Change-Id: Ib0357bba79f55d297ef1086fbf3b760caca16cdb Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-08-14DO_NOT_MERGE CSIT-1194 - Framework easy pylint improvementsMiroslav Los1-1/+1
- force a python2 environment in tox for pylint - let pylint load some compiled modules for member checking - allow locally enabled pylint rules - ignore bad enum names - ignore complexity for code to be refactored by other tickets - broad excepts are acceptable sometimes Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech> Change-Id: If4c3a1b85e8609f074e1de8ce91fc9c4fedbeb38
2019-08-07FIX: Remove PAPI_MAX_API_BULKJan Gelety1-2/+0
- it's not needed anymore as PapiSocketExecutor is used Change-Id: Ia9fad1d18991821d14e9261d27f7f26fca03c14a Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-11CSIT-1469: Migrate IPsecUtil library from VAT to PAPIJan Gelety1-6/+16
Change-Id: Iac790bf5755a70697e4c4eff32242b04f8e7f789 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-17Use PapiSocketProvider for most PAPI callsVratko Polak1-37/+31
Ticket: CSIT-1541 Ticket: VPP-1722 Ticket: CSIT-1546 + Increase timeout to hide x520 slownes of show hardware detail. - Install sshpass and update ssh client in virl bootstrap. + Added TODOs to remove when CSIT-1546 is fixed. + Enable default socksvr on any startup conf. + Improve OptionString init and repr. - The non-socket executor still kept for stats. + Remove everything unrelated to stats from non-socket executor. - Remove some debug-loooking calls to avoid failures. TODO: Introduce proper parsing to the affected keywords. + Reduce logging from PAPI code to level INFO. - Needs https://gerrit.fd.io/r/20660 to fully work. + Change default values for LocalExecution.run() + Return code check enabled by default. Code is more readable when rc!=0 is allowed explicitly, and the test code will now detect unexpected failures. + Logging disabled by default. Output XML is large already. Important logging can be enabled explicitly. + Restore alphabetical order in common.sh functions. Change-Id: I05882cb6b620ad14638f7404b5ad38c7a5de9e6c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-12PapiExecutor always verifiesVratko Polak1-33/+20
Do not support returning unverified replies anymore. Basically, ".get_replies().verify_replies()" is now just ".get_replies()". This allows fairly large simplifications both at call sites and in PapiExecutor.py + Rename get_dumps to get_details. + Introduce get_reply and get_sw_if_index. + Rename variables holding get_*() value, + e.g. get_stats() value is stored to variable named "stats". + Rename "item" of subsequent loop to hint the type instead. + Rename "details" function argument to "verbose". + Process reply details in place, instead of building new list. - Except hybrid blocks which can return both list or single item. - Except human readable text building blocks. + Rename most similar names to sw_if_index. - Except "vpp_sw_index" and some function names. + Use single run_cli_cmd from PapiExecutor. + Do not chain methods over multiple lines. + Small space gain is not worth readability loss. + Include minor code and docstrings improvement. + Add some TODOs. Change-Id: Ib2110a3d2101a74d5837baab3a58dc46aafc6ce3 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-10Fix few pylint violationsVratko Polak1-4/+4
+ Stop attempting to check test/ as module inits are not there. Change-Id: Ia4e498061be3e3118b07e98c9c2f761f2454653e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-06-18FIX: ip scale needs sw_if_index in VAT commandJan Gelety1-1/+19
Change-Id: Icb3e22a84af10b98edf83084991b8f2607c95798 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-03FIX: use len parameter name in prefix structure in ip_route_add_delJan Gelety1-47/+93
+ new vpp stabel build with fixed ipv6 address incrementation Change-Id: Id3f4104a48e45b6fd70ccbd47ad9e3c6925220fd Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-01FIX: re-introduce VAT for IP scale testsJan Gelety1-0/+20
Change-Id: I864118ee67628ea81f2f89dab5890df8fe15c4bc Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-06-16FIX: IPUtil after vpp api changesJan Gelety1-122/+149
+ do not log all ip_route_add_del api calls to PAPI history in case of scale tests + fix for SRv6 proxy tests + support of more complex structures in api calls/replies in PapiExecutor + update of vpp stable build to version 19.08-rc0~487-gb98dbb1 Change-Id: I9972e126b68ce1cb57f781e3d90ea9b3914de69e Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-06-18CSIT-1459: Migrate IP libraries from VAT to PAPIJan Gelety1-76/+357
Change-Id: Id84cf9c3afd53260b5bbf658a6a3870aa0c91333 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-03-04Rename to Constants.pyVratko Polak1-1/+1
Motivation: Make the constants available also for Robot. Restraint: Robotframework user guide says: Because variable files are always imported using a file system path, creating them as classes has some restrictions: Python classes must have the same name as the module they are located. Change-Id: I638ef3fe045db132e366de2e2699638b8637e45e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-01-10CSIT-866: wrk onboarding in CSITTibor Frank1-1/+51
- CSIT-867: Low Level Description - CSIT-868: wrk traffic profile - parsing - CSIT-869: wrk implementation into CSIT Change-Id: I65e1037f5ae05b3a5b2020e4a6c54462766ae1b4 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-10-11CSIT-778: Add mac-ip binding acl l2bd perf testJan Gelety1-0/+24
Change-Id: Iaced68458b0e4070f861be7854ee428ae8ca4e13 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-16Pylint fixesTibor Frank1-12/+13
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-10-10CSIT-392: ip4-lispgpe-ip4Tibor Frank1-0/+20
- ip4-lispgpe-ip4 - main fib, vrf, virt2lisp Change-Id: I28c81e91689021693ce76352878fa21e953a4ef6 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-09-05CSIT-229: ip4-lispgpe-ip4Tibor Frank1-1/+67
- main fib, - vrf, - phy2lisp Change-Id: Ic9bacef4574dc07b25041c4cd0653825a65c94fb Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-08-15CSIT-197: Add basic mapping rule tests for MAP-EMatej Klotton1-2/+21
- IPv4 prefix length + ea bits length < 32 - IPv4 prefix length + ea bits length == 32 - IPv4 prefix length + ea bits length > 32 - End user IPv6 prefix is 64 - IPv4 preffix is 0 Change-Id: Ib8d76abfebfb206fbbaa3c1422b2d321a3ed8712 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-06-28Use interface key instead of interface name.Miroslav Miklus1-4/+16
JIRA: CSIT-141 Change-Id: I75cef6d570ab45ea9c4af838b6bf68cefc7c1a91 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-05-30Update Honeycomb testsselias1-2/+2
- add new test cases based on reported bugs - minor fixes Change-Id: I8b7464bc1f4e786e3a0ef67ba64d81e1c25ae5cf Signed-off-by: selias <samelias@cisco.com>
2016-05-12Update Honeycomb interface IPv4 testselias1-7/+10
- add verification of ipv4 subnet prefix support - modify keywords to allow setting ipv4 address with network prefix - fix variable definitions to evaluate numbers as ints, not strings - add exception to ipv4 netmask/prefix conversion method Change-Id: I9343ceb35856ddb33674d7067f1def6d40e99acc Signed-off-by: selias <samelias@cisco.com>
2016-05-06Add Honeycomb interface management tests (ipv4, ipv6, ethernet, routing)selias1-0/+19
- add test cases for managing ipv4, ipv6, ethernet and routing configuration on VPP interface - add keywords used in these tests to set and verify configuration - add method and vat template for dumping an interface's configured IP addresses - add method for converting between ipv4 netmasks and network prefixes - clean up documentation of older Honeycomb keywords Note: Test cases are tagged with a placeholder tag to allow manual test runs locally. It should be replaced with the appropriate environment tags once Honeycomb service is deployed on virl. Change-Id: I99ce1e72c8550f520f8c35ef4a93eaebb530db78 Signed-off-by: selias <samelias@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-04-22Reformat python libraries.Matej Klotton1-9/+8
PEP8 reformat fix typos docstrings reformat Change-Id: Ic48ba4e06490630808b8e2ab1ab0b046ec7eeed7 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-02-08New version of RF tests.Stefan Kobza1-0/+43
Change-Id: I241a2b7a7706e65f71cfd4a62e2a40f053fc5d07 Signed-off-by: Stefan Kobza <skobza@cisco.com>