aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
AgeCommit message (Collapse)AuthorFilesLines
2018-10-25CSIT-1339 Create initial l2xc testPeter Mikus1-6/+11
- L2XC ping ICMPv4/ICMPv6 test Change-Id: I1c1708e8c1050f140a02d56012f63b683fc3eec1 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-10-10Add VXLAN scale perf testsJan Gelety1-25/+258
Jira: CSIT-1273 Change-Id: Ic2a41661c158384a5aaa7d4e73f30ffca13ddf82 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-10-02CSIT-1325 - FIX: AVF tests failing on unbindPeter Mikus1-1/+1
Currently there is and issue when consecutive AVF suites are trying to initialize AVF and bind VF to vfio-pci driver, there seems to be race condition if VPP has already VFs allocated. This patch should introduce safer contstrain to disable VPP prior AVF init. Change-Id: Id8839200f19d9e7a18d161b660cfb1e43a8ca379 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-06fix CSIT broken issue when numa_node value is -1 on single Socket platformYulong Pei1-2/+5
Single Socket platform e.g. Intel Atom cpu based SOC platform with Ubuntu 16.04.4(kernel 4.13.0-36-generic) or Centos 7.5 (kernel 3.10.0-862.el7), value of /sys/bus/pci/devices/<pci_device_id>/numa_node is -1, this will break CSIT performance test running, but for this kind of SOC platform, it can consider that is not NUMA based platform, numa_node=-1 is reasonable, so fix it at CSIT side, when numa_node=1 and the system's NUMA node count is 1, set numa_node=0. DPDK also did it as this way. Change-Id: I9ac23d3cece2f1489e38f05b50a462bb2ad9f661 Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2018-09-05CSIT-1205 Create AVF driver testPeter Mikus1-13/+165
- Add L1 KWs for SR-IOV handling (init Vfs, remove Vfs, ...) - Cleanup L1 KWs for SR-IOV bind/unbind/pci_get/... - Add L2 KWs for Test Setup/Teardown, L2patch, Create AVF interface - Add sample L2patch test fox x710, xxv710 Change-Id: If17077877455a14043617d8ea0d06cbe47b469e3 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-05Fix various pylint violationsVratko Polak1-5/+4
+ 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-09-04Fix pylint part 1Peter Mikus1-5/+5
- Decrease pylint errors. Part: easy Change-Id: I452e5b5a11e9b78c03cd173a3848babe21b93c73 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-27FIX: Interface up handlingPeter Mikus1-5/+5
- Increase timeout when trying to check interface (this is useful if there are multiple interfaces and dump command take more than TIMEOUT/NR_IF which is happening quite often). - Reverse the order of applying MTU and interface UP to try to prevent API overload during interface initialization phase. Change-Id: I4e8623963d15b3c0d202172b4c58c43a972bb9cb Signed-off-by: Peter Mikus <pmikus@cisco.com> (cherry picked from commit 584345da4f7330f7517e5defd894b4995c2b57b0)
2018-07-25Add MTU handling into perf testsPeter Mikus1-0/+47
- Add ability to configure MTU on interfaces. Put the MTU into configuration keywors for all perf testcases. Change-Id: I364b4bc26b26f2f66f350949c0aaa2a2aa675682 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-06-22CSIT-1043: Execute pci rescan only if neededjuraj.linkes1-44/+3
Pci rescan is a rather invasive process, which is why it should be executed only if needed. This patch moves the pci rescan after pci device driver discovery, rescanning the devices for further attemps at driver discovery. Change-Id: I29c939b44c3f67371416a99c711e057f711ba9b4 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-06-01VPP link bonding - lacp modeJan Gelety1-5/+96
CSIT-1072 CSIT-1083 CSIT-1084 Change-Id: Icaf0e09af633d301306a84251f47822e95b411a2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-05-31DPDK link bonding: xor modeJan Gelety1-0/+23
CSIT-1073 CSIT-1074 CSIT-1077 Change-Id: I248e079021c30988210fd792b32d5afdca71aadb Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-05-04Fix various pylint 1.5.4 warningsVratko Polak1-4/+2
+ DUTSetup.py:424 Else clause on loop without a break statement + InterfaceUtil.py:400 Else clause on loop without a break statement + QemuUtils.py:564 Wrong continued indentation + SetupDPDKTest.py: Locally enabling broad-except + VatExecutor.py: Catching too general exception Exception + ssh.py:95 No exception type(s) specified. + HTTPRequest.py: Tolerate HTTPCodes.OK + multiple: Drop ":returns: None" from docstrings. There are still several warnings present: - R0902(too-many-instance-attributes) - R0912(too-many-branches) - R0913(too-many-arguments) - R0914(too-many-locals) - R0915(too-many-statements) - R0401(cyclic-import) And there are multiple blocks of similar lines, mainly across various Setup*Test.py files: - R0801(duplicate-code) Change-Id: I582575cb52b85d69d268e6374852f6e74bb71052 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-04-25Fix warnings reported by gen_doc.shVratko Polak1-23/+24
+ 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-11-10CSIT-843: Update actual topology in case of new/updated/deleted interfaceJan Gelety1-13/+35
Change-Id: I6adfe86bd0b9cdf3d194a1b871e52481c333d8e7 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-23FIX: IPSec tunnel interfaceJan Gelety1-0/+23
- add following line per interface tunnel: set int unnum <ipsec> use <interface> Change-Id: Iff75f27b7cf25f3d24eea92366b1fd4a718c253b Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-12CSIT-748 vnf-agent integrationPeter Mikus1-0/+41
CSIT-773 Implement RF keywords for k8s - Implementation of Test Suite Setup for Ligato vnf-agent testing - Implementation of KubernetesUtil for controlling kubectl - Yaml templates for L2XC topology with 1cswitch and 1cnf - Yaml templates for L2BD topology with 1cswitch and 1cnf - ligato bootstrap script for creating vnf-agent image Change-Id: Iebefde0eb984a27a0afcdf29fe549ca4edf8a61e Signed-off-by: Peter Mikus <pmikus@cisco.com>
2017-07-26Fix pylint errorsTibor Frank1-1/+1
Change-Id: I9b8d69978ee35bf7610cdfd372135ce3515eec96 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-06-06VIRL lspci fixPeter Mikus1-19/+27
Change-Id: I884b56c5cc2e0d5f40c0e9d0b5fb7356dc3b4028 Signed-off-by: pmikus <pmikus@cisco.com>
2017-05-17Fix: use pci/rescan to avoid occasional bind issue on Centos7Jan Gelety1-1/+7
- rarelly binding of one of TG interfaces fails with "No such device" error; usage of rescan should avoid such situations Change-Id: Icbeb48ea6f8adb863e6517d4a35d6aca4238309a Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-04-03HC Test: revert to using restconf over httpselias1-2/+8
- use http instead of https for restconf connection - add missing import to proxyARP robot library - use VAT interface dump to identify interfaces in VAT ip address dump Change-Id: Ic381ff3f9b56a6c633382450559134f5389956c2 Signed-off-by: selias <samelias@cisco.com>
2017-03-30HC Test: address and cleanup test failuresselias1-1/+3
Change-Id: If3c570dbc5036915fdc68ade7a9ccc45ad21299e Signed-off-by: selias <samelias@cisco.com>
2017-02-24CSIT-522 HC Test: tests for secondary IP addressselias1-0/+23
- fix and update ipv4 and ipv6 tests - add tests for ipv6 neighbor and vrf-id - add tests for secondary IP address on ipv4, ipv6 Change-Id: I1e422e61108493a63a65ad91f649e69dfff0842f Signed-off-by: selias <samelias@cisco.com>
2017-02-22The interface must be assigned to the VRF and then given a prefixNeale Ranns1-4/+8
Change-Id: I6a2fc503989576f806413ae98845e3e3676889b8 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-10CSIT-518: Add testpmd numa awarenessTibor Frank1-44/+88
Change-Id: I982834de1fbe71cf5303808ea58d4b58e530ffcb Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-01-17VIRL test: Replace IP probe for VXLAN testMatej Klotton1-0/+3
Change-Id: Ic16f91beabdc2ac2e19ccc65c04790d36c15d477 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-11-22Remove workaround for ip_address_dumpselias1-2/+0
As of change https://gerrit.fd.io/r/3816, ip_address_dump returns IP addresses properly. Change-Id: If3b4a32e5166bd517beaa2ddb35262c406b1dcea Signed-off-by: selias <samelias@cisco.com>
2016-11-07CSIT-468 Issue retrieving numa node of NICpmikus1-3/+17
Issue retrieving numa node of NIC Change-Id: Ia6f826c100a012b23e046e48fe1e505ed0c4c8e8 Signed-off-by: pmikus <pmikus@cisco.com>
2016-11-04CSIT-457: Address Honeycomb test failuresselias1-0/+2
- tag all not-implemented features with EXPECTED_FAILING - add workarounds for known issues with VAT dump commands - replace hardcoded test data with parametrized - separate IP neighbor and IP address into two test cases - support unordered lists with compare_data_structures keyword Change-Id: I2c683162325cee720ba496489787fa50e9c72b8c Signed-off-by: selias <samelias@cisco.com>
2016-09-05CSIT-229: ip4-lispgpe-ip4Tibor Frank1-0/+22
- main fib, - vrf, - phy2lisp Change-Id: Ic9bacef4574dc07b25041c4cd0653825a65c94fb Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-08-25CSIT-237: VPN routed forwarding (VRF) - baseline for IPv6Zdeno Olsovsky1-2/+7
Change-Id: I5c3053c692df29255a1da22a66f7ac282e3d5624 Signed-off-by: Zdeno Olsovsky <zolsovsk@cisco.com>
2016-08-08CSIT-338 PCI numa_node discoveryMiroslav Miklus1-1/+28
Allow to discover PCI - numa node relationship. Change-Id: I04a445e42b3cbbf450b990ebbc2c83ac313815f1 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-07-26CSIT-106 Vpp config - use only test-related interfacesMiroslav Miklus1-2/+4
Current behaviour is to add all interfaces from topology, we only want to add interfaces from computed path. Change-Id: I9c5d4e765dbe399ee06dd13f0d25c48d3d8e5127 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-07-22CSIT-158: Tap interface testsZdeno Olsovsky1-0/+20
Change-Id: I30a4562ea5fca9b839d854118243daa70378b0ae Signed-off-by: Zdeno Olsovsky <zolsovsk@cisco.com>
2016-07-21CSIT-49: HC Test: Policy - security groupsselias1-0/+23
- 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-07-21CSIT-183: Vpn baseline routed forwarding (VRF)Zdeno Olsovsky1-0/+21
- Setup 2 VRF tables on each DUT - Test traffic - each port accessible within one vrf - Test traffic - ports inaccessible to different vrf Change-Id: I34256a683039734608509a38857dbdcbdd15bcf9 Signed-off-by: Zdeno Olsovsky <zolsovsk@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-07-20CSIT-188 IPv4 Reverse Path Forwarding testsPatrik Hrnciar1-0/+13
Change-Id: I45ea3316c5a3ef23d08530b256558cba72ccde07 Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
2016-07-19CSIT-34: VLAN tag rewrite translate tests with x-connects - IPv4Jan Gelety1-10/+23
- VLAN tag rewrite translate-1-1 - VLAN tag rewrite translate-1-2 - VLAN tag rewrite translate-2-1 - VLAN tag rewrite translate-2-2 REMARK: Negative test cases will be tagged with SKIP_PATCH after merge. Change-Id: I76045e1416fe1a72298ccc2090cd373fac09b468 Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-07-11CSIT-184: Add Honeycomb sub-interface ipv4 testsselias1-1/+1
- add tests for sub-interface ipv4 support - add keywords and methods used in tests Change-Id: I98af193a4c4f0d3822eb9637f01acead37accb8c Signed-off-by: selias <samelias@cisco.com>
2016-06-30CSIT-24 Proxy ARP testPatrik Hrnciar1-0/+19
Change-Id: Ia41af7e29dcb8c41d58c07134a385428ac1b285c Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
2016-06-28Use interface key instead of interface name.Miroslav Miklus1-17/+29
JIRA: CSIT-141 Change-Id: I75cef6d570ab45ea9c4af838b6bf68cefc7c1a91 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-06-08Add Tests for Honeycomb VxLAN GPE supportTibor Frank1-0/+50
JIRA: CSIT-131 - add tests for Honeycomb VxLAN GPE support - add keywords needed for tests Change-Id: I460ecd30835bb95140958b20946b1d41ac6d9abc Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-06-01Add Honeycomb sub-interface and VLAN testsTibor Frank1-6/+6
JIRA: CSIT-94 JIRA: CSIT-48 - add Honeycomb sub-interface tests - add Honeycomb VLAN tests - add keywords for sub-interface tests - add keywords for VLAN tests Change-Id: I89cd3b41dd9c60bfd946e24567d0ff93e5ea9fff Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-05-20Add Honeycomb TAP interface testselias1-2/+26
JIRA: CSIT-75 - add test suite for TAP interface management through Honeycomb - add keywords required for TAP interface tests - move Honeycomb suite setup and teardown to new __init__ file - cleanup unused imports in Honeycomb test case files - modify "...should be empty" keywords to allow more reuse Change-Id: Ie3dc9069678b60c359f69c5a216e452e856a0107 Signed-off-by: selias <samelias@cisco.com>
2016-05-20Tests for vhost-user interface configurationTibor Frank1-0/+15
JIRA: CSIT-76 - add tests for vhost-user interface manipulation: - create, modify, delete - add negative tests: - wrong interface type - wrong configuration Change-Id: I09239ef099a6f9672895f9540762e5044123f7ec Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-05-16CSIT-18: Add GRE tunnel libraries and tests.Matej Klotton1-1/+34
Change-Id: I91ccd65a26ea1782611bccc3badd91e64366a162 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-05-13Add possibility to create a VxLAN interface.Tibor Frank1-12/+21
JIRA: CSIT-51 - add a keyword which adds a new VxLAN interface - change InterfaceUtil.vxlan_dump to be able to return info about all VxLAN interfaces. Change-Id: I8ad3dc1d414924e74ea1ecea1f316ca5c648e2d0 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-05-11Add iACL IPv4/IPv6 tests.Patrik Hrnciar1-0/+25
- IPv4: CSIT-15 - IPv6: CSIT-16 Change-Id: I6e66aa853dfaebf1388f1191dbb63f5216820325 Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
2016-05-09Interface VxLAN testTibor Frank1-0/+26
JIRA: CSIT-45 - add test: Honeycomb modifies interface configuration - VxLAN - add keywords used in these tests to set and verify configuration - add method and vat template for dumping an interface's configured VxLAN - fixed requirements.txt Change-Id: I6d6c360a4d478a0e40eecf7c0235969e7c06f7a9 Signed-off-by: Tibor Frank <tifrank@cisco.com> Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-05-06Add Honeycomb interface management tests (ipv4, ipv6, ethernet, routing)selias1-0/+31
- 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>