aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/Classify.py
AgeCommit message (Collapse)AuthorFilesLines
2019-08-09FIX: macip_acl_rule needs binary mac dataJan Gelety1-2/+2
Change-Id: I0d26b2b31f0ce7497c91b4ae965f9cc45a66ef0c Signed-off-by: Jan Gelety <jgelety@cisco.com> (cherry picked from commit 5b28bc8c52a5f7ef72f03d03806f61ba45ecc623)
2019-08-06Add: Dot1Q + L2BD + GBPPeter Mikus1-4/+19
Change-Id: I0050f715011ecfa92b3ee88b301809a56abb7946 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-17Use PapiSocketProvider for most PAPI callsVratko Polak1-13/+13
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-23/+15
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: use correct slicing of classify mask/match stringJan Gelety1-28/+75
Change-Id: I11cc8ddc6925b44a596aa03d71318efd76232d6d Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-06-28VAT-to-PAPI: ClassifyTibor Frank1-375/+603
Change-Id: Ic06a0a65429680e6ecdc3f5288d091c2c2630921 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2018-09-05Fix various pylint violationsVratko Polak1-2/+1
+ SchedUtils.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + VatHistory.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + VppCounters.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + Memif.py: ++ Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Either all return statements in a function should return an expression, or none of them should. ++ Update :return: on possible None. + Classify.py: Unnecessary "else" after "return" + ContainerUtils.py: Useless super delegation in method '__init__' + CpuUtils.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + DropRateSearch.py: Either all return statements in a function should return an expression, or none of them should. + IPv4NodeAddress.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also improve docstrings. + IPv4Setup.py: Useless super delegation in method '__init__' + IPv6Setup.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also improve docstrings. + IPv6Setup.py: standard import "from ipaddress import IPv6Network" should be placed before "from robot.api import logger" + MacSwap.py: Trailing newlines + NATUtil.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + NodePath.py: Unnecessary "else" after "return" + Tap.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + topology.py: Either all return statements in a function should return an expression, or none of them should. + topology.py: Unnecessary "else" after "return" ++ Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Improve docstrings + DUTSetup.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also do not compare int(ret_code) just to access zero-ness. + ssh.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + InterfaceUtil.py: Unnecessary "else" after "return" Change-Id: Iba4244aa79661ee7df15fed5c7c6dbf04dfa88b2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-04-25Fix warnings reported by gen_doc.shVratko Polak1-18/+18
+ Docstring warnings fixed. + Multiline param descriptions indented by 4 spaces. - Except the PacketVerifier.py one - I have tried several quote-like blocks, nothing works. - Rst warnings not fixed. - How can I fix them? They refer to temporarily created files. + Other improvements: + Python lines no longer than 80 characters. + :return: -> :returns: + Notes before params. + :raises + closing colon after exception class. + Description is a sentence. + Present tense in conditional sentences. + Bumped copyright year in edited files. Change-Id: I462c194eeecb666dc146e26858486a07c990be9b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2017-08-16CSIT-777: L2 keywords for MACIP ACL testsJan Gelety1-2/+4
Change-Id: I678d87770405105555ccc30ce0003f704d7ca82e Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-14CSIT-777: L1 keywords for MACIP ACL testsJan Gelety1-5/+138
Change-Id: I90eb824cbabaaece6798812268177ad9bd4eff65 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-07-06CSIT-622: Stateful Security Groups perf testsJan Gelety1-1/+155
1. add L2BD iACL statefull and stateless tests with 1, 10 and 50 not-hitting ACEs in combination with 100, 10k and 100k flows per direction 2. add L2BD oACL statefull and stateless tests with 1, 10 and 50 not-hitting ACEs in combination with 100, 10k and 100k flows per direction Change-Id: Ia38589aa81b50c5ccdf2813ad6fadd22b46fffeb Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-02-27HC Test: update plugin-ACL testsselias1-1/+1
- improve packet trace logging after each test - suppress IPv6RA on VPP because it interfered with ipv6 test cases - do not use fictional destination MAC address, doesn't work in VIRL - ignore errors when logging configuration - should not fail the test Change-Id: I16a3321670d4c2fa8f6434dc4badd243b7e4f9fc Signed-off-by: selias <samelias@cisco.com>
2017-02-15HC Test: ACL updatesselias1-1/+32
- update low level ACL based on yang model changes - remove ietf-ACL test suite and test data and keywords - add ACL-plugin test suite, test data and keywords The ietf model of ACLs is no longer supported in Honeycomb. It has been replaced by the ACL plugin. Change-Id: Ic2c2a3e11c9717d1d3885275f6b868a0098343f9 Signed-off-by: selias <samelias@cisco.com>
2016-12-16Pylint fixesTibor Frank1-10/+8
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-10-04Fix pylint warnings in python librariesselias1-13/+17
- no functional changes - fixes 80+ PEP-8 violations Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7 Signed-off-by: selias <samelias@cisco.com>
2016-08-25CSIT-233 IPv4 IPFIX - baseline testsselias1-0/+38
- add scapy classes for parsing IPFIX packets - add vat scripts and keywords for settings up IPFIX - add IPv4 IPFIX test suite Change-Id: I80ab76ca361c7920a01a46ad720b1c04acd0d147 Signed-off-by: selias <samelias@cisco.com>
2016-07-21CSIT-49: HC Test: Policy - security groupsselias1-0/+43
- add test suite for ACLs - add keywords used in tests - add resource file with variables used in ACL tests - add methods and VAT templates for reading VPP ACL data Change-Id: I98c78bfbce67309ae33ebb05c04640f5029bf4e2 Signed-off-by: selias <samelias@cisco.com>
2016-06-16IACL MAC filtering testsPatrik Hrnciar1-7/+68
- CSIT-133 VPP drops packets based on MAC src addr. - CSIT-134 VPP can drop packets based on src MAC + IPv6 UDP src+dst port. Change-Id: I57d041bc5f3311946679128e556ceef8c4d55264 Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
2016-06-07iACL TCP/UDP testsPatrik Hrnciar1-6/+141
- IPv4 CSIT-92 - IPv6 CSIT-107 Change-Id: Ia93e96f624ce73ef08b89d4b22334a67ebb69e13 Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
2016-05-11Add iACL IPv4/IPv6 tests.Patrik Hrnciar1-0/+86
- IPv4: CSIT-15 - IPv6: CSIT-16 Change-Id: I6e66aa853dfaebf1388f1191dbb63f5216820325 Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>