aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/topology.py
AgeCommit message (Collapse)AuthorFilesLines
2022-06-28feat(telemetry): ReworkPeter Mikus1-1/+3
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I0a84ce88b318c488ba2d519b20237c88b9f9f1e6
2021-09-10back-to-back tests: add TG testsViliam Luc1-12/+43
Change-Id: I9d028294deb1e31b6d185deb1c7523e0226a0ada Signed-off-by: Viliam Luc <vluc@cisco.com>
2021-06-10Add gtpu sw performance test casesxinfeng zhao1-1/+2
Signed-off-by: xinfeng zhao <xinfengx.zhao@intel.com> Reviewed-by: Yulong Pei <yulong.pei@intel.com> Change-Id: Ibe4420529192559a3cdbb84e0a67859750a9e0d5
2021-06-04Performance: Add AF_XDP testspmikus1-2/+2
- enabling for fortville, columbiaville - enabling experimental for mlx Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I1b7ceb54769f4a0089ac7309350499e60c5cca0a
2020-12-17PAPI: Cache connected client instancesVratko Polak1-0/+1
Disconnect+connect cycle is expensive and slow. This change tracks connected client instances so later "connect" to the same target uses it. Explicit disconnects are allowed (and executed before VPP ends), but once again disconnected instances are cached and reused, as creating a new instance is more expensive than just connect. + Add missing checks on interfaces being up to appropriate keyword. + Use appropriate keywords. + Add a comment explaining why a simpler keyword is not appropriate. + Improve VPP checks in containers. + Fix the vppctl check to actually work. + Add PAPI check to ensure VPP is really ready. + Delay/reorder checks to make them faster with multiple containers. + Leave some TODOs to improve various lifecycles later. + As we do not stop VPP in test/suite teardown: + One final disconnect is needed, added to __init__.robot teardowns. - Import of the final disconnect keyword is ugly, but it works. - We could use a hashable class for distinguishing node+socket pairs. - Are we connecting to VPP inside VMs? Change-Id: I49cd726740c3e8cae1591c7c84b85a447241228f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-12-03vpp-device: GENEVE tunnel test, l3 modeJan Gelety1-1/+1
Jira: CSIT-1769 Change-Id: I98510cd8e627d7347f77d0032b7bac28f2e36c61 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2020-12-08Revert "vpp-device: GENEVE tunnel test, l3 mode"Peter Mikus1-1/+1
This reverts commit a9f54ca5080aeef17686f300a6807bf9b46b7c90. Reason for revert: DO NOT MERGE BROKEN TESTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! https://logs.fd.io/production/vex-yul-rot-jenkins-1/csit-vpp-device-master-ubuntu1804-1n-skx/9918/archives/log.html.gz Change-Id: I2ce2970a43e5dd7487eeb54d1ccbb149e06cf8fa Signed-off-by: pmikus <pmikus@cisco.com>
2020-12-03vpp-device: GENEVE tunnel test, l3 modeJan Gelety1-1/+1
Jira: CSIT-1769 Change-Id: I0ab906966f760b809b8431530c010a8f0835d62c Signed-off-by: Jan Gelety <jgelety@cisco.com>
2020-03-17NodePath: Make path computation deterministicVratko Polak1-3/+4
In Python3, set operations seem to result in indeterministic order. + Remove verbose logging from topology.py Change-Id: I47cc90637a0b2969e1686b4216b7d8fe4fe2aaab Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-15Hoststack perf infrastructure refactoringDave Wallace1-1/+19
- 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-13FIX: eth interfaces need numa_node information in topology fileJan Gelety1-1/+4
Change-Id: I9a3c6947da8ab5033e29b39833c97bcdafdc3ca9 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-12-11Introduce VPP-IPsec container tests.Ludovit Mikula1-10/+20
Change-Id: Ie64d662e81879bd52785e0188450d998bf056bda Signed-off-by: Ludovit Mikula <ludovit.mikula@pantheon.tech>
2019-12-05Deal with some "pylint: disable=" commentsVratko Polak1-1/+5
+ 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-156/+157
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-09-10Refactor getting telemetryPeter Mikus1-1/+71
+ Ability to get stats from CNF via SocketPAPI - Remove obsolete functions Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I4d1b32a7279244592be96644e4f8a530c4f29a15
2019-08-14FIX: Remove eth_avf and portX_vifY interfaces from topo in TC/TS tear downJan Gelety1-1/+30
Change-Id: I90901c4ab14dfa76dc3e1f786a4b986479e0ba47 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-08-07FIX: PylintPeter Mikus1-1/+2
- my bad Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I8c1f57f6b648b99338f3f6a6ff9ec943082e9bc4
2019-08-06Add: Dot1Q + L2BD + GBPPeter Mikus1-1/+2
Change-Id: I0050f715011ecfa92b3ee88b301809a56abb7946 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-08-06VPPD: Dot1QPeter Mikus1-0/+28
Change-Id: I0d3c925ea4a6896a0df98db6ddaf4238e6291bf1 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-12PapiExecutor always verifiesVratko Polak1-7/+7
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>
2018-09-05CSIT-1205 Create AVF driver testPeter Mikus1-0/+13
- 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-18/+18
+ 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-05-31DPDK link bonding: xor modeJan Gelety1-1/+1
CSIT-1073 CSIT-1074 CSIT-1077 Change-Id: I248e079021c30988210fd792b32d5afdca71aadb Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-04-25Fix warnings reported by gen_doc.shVratko Polak1-10/+8
+ 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>
2018-01-10add new topology parameter: archGabriel Ganne1-0/+16
if unset, arch variable will default to "x86_64" * Note on "arm64" vs "aarch64" debian-based uses arm64 rhel-based uses aarch64 qemu binaries of both distribs uses aarch64 dpdk uses arm64 vpp uses aarch64 python machine modules uses aarch64 => prefer aarch64 to use the same nomenclature as vpp * add ARCH argument to: init_dpdk.sh, install_dpdk.sh, run_l2fwd.sh, install_tldk.sh, run_tldk.sh. default to x86_64 converts "aarch64" if needed for dpdk naming convention * fixed terminal end detection to allow "~]# " add dut node arch as param to all robot set bin calls * add --target-list flag to qemu_build.sh defaults to x86_64-softmmu * add arch flag to all the topology files * topologies/available/ (and example file) * resources/tools/virl/topologies/ * set _qemu_bin path using node['arch'] in qemu_set_node() Change-Id: If46d88d064d213d3e4c6fc584bb8e0d4b6428cb8 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-01-10CSIT-866: wrk onboarding in CSITTibor Frank1-2/+2
- 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>
2018-01-04FIX: Pylint errorsPeter Mikus1-1/+1
Change-Id: I93eae6d25da6a7cb51465e622ab068f408ab4079 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-04TRex ASTF onboarding Part IPeter Mikus1-0/+15
- Preparing initialization of TRex in L7 mode - Updating Topology files - Adding sample ASTF profiles Change-Id: If71f7f8f3db66425a1b543f1d29069a7543f4090 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2017-11-10CSIT-843: Update actual topology in case of new/updated/deleted interfaceJan Gelety1-34/+118
Change-Id: I6adfe86bd0b9cdf3d194a1b871e52481c333d8e7 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-04-10IPsec Multi-Tunnel performance test suiteKirill Rybalchenko1-0/+29
Change-Id: I4b0ba83960e50089f29cab9a30ab760241c6f566 Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
2016-12-16Pylint fixesTibor Frank1-4/+4
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-12-01CSIT-481: HC Test: Port mirroring (SPAN)selias1-0/+13
- add port mirroring test suite - add relevant keywords Change-Id: I4ff398dd2ab4323e2a53af2812bf07cbb7043252 Signed-off-by: selias <samelias@cisco.com>
2016-11-28CSIT-474: CSIT doc auto-generationTibor Frank1-1/+4
- See resources/tools/doc_gen/README.rst for details Change-Id: Ie5704c93a41e456d65fcd6df2d9d8c96987deebb Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-10-20CSIT-427: Honeycomb ietf-ACL tests - L2selias1-1/+1
- add keywords for accessing Honeycomb's ietf-acl node - add variable file with ietf-acl test data - add ietf-acl traffic test suite - modify bridge domain teardown keyword to unassign interfaces from the bridge domain before delete Change-Id: I6df1771f2fb9b42f30b5af8f54a384c6714f5949 Signed-off-by: selias <samelias@cisco.com>
2016-10-20Add topology method for generic handling of interface referencesselias1-1/+78
- add "convert_interface_reference" to topology.py This is a convenience method, mainly intended for Honeycomb tests which often require conversions between interface key, name and sw_if_index. Change-Id: I427736111f2a1dc07a581c9ccc25e181065bb6fd Signed-off-by: selias <samelias@cisco.com>
2016-10-04Fix pylint warnings in python librariesselias1-0/+2
- no functional changes - fixes 80+ PEP-8 violations Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7 Signed-off-by: selias <samelias@cisco.com>
2016-10-03CSIT-405: Honeycomb test update and cleanupselias1-6/+28
- update suite setup and constants to allow test runs again - cleanup basic interface keywords - cleanup L2-fib test data - add "continue on failure" keyword to some partially failing tests - add teardown to all suites, restarts honeycomb if suite had test failures - fix minor PEP-8 violations in Topology.py Change-Id: Ic5b434af71f77855f81461b280299b8318932c5a Signed-off-by: selias <samelias@cisco.com>
2016-08-08CSIT-338 PCI numa_node discoveryMiroslav Miklus1-1/+80
Allow to discover PCI - numa node relationship. Change-Id: I04a445e42b3cbbf450b990ebbc2c83ac313815f1 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-06-28Use interface key instead of interface name.Miroslav Miklus1-125/+198
JIRA: CSIT-141 Change-Id: I75cef6d570ab45ea9c4af838b6bf68cefc7c1a91 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-04-26Extend host topology with NIC type filteringMiroslav Miklus1-6/+34
JIRA: CSIT-1 Changes to allow filtering based on NIC model. Switched xconnect perf test to use filtered topology. Change-Id: Id526f47dc28f92bf26d070e54819ad29bccc0440 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-04-22Reformat python libraries.Matej Klotton1-60/+71
PEP8 reformat fix typos docstrings reformat Change-Id: Ic48ba4e06490630808b8e2ab1ab0b046ec7eeed7 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-04-13VXLAN test with dot1q tagging.Matej Klotton1-11/+13
Change-Id: I3dbd12983736e338d757c580570d91680aedd83f Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-04-13Move methods from topology.py to more appropriate place.Matej Klotton1-176/+0
Change-Id: I2612a9466095b3d79a4a9d938fcdbf9f93133f69 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-03-14Add VM to NodeTypeMatus Fabian1-0/+2
Change-Id: Ic3a313837f48a1c7bd1c70876c82799ac1994f2f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-03-07Modify sweep ping test casesJuraj Sloboda1-4/+20
- Write separate sweep ping test cases for jumbo frames - Compute sweep ping end size from reported MTU on DUT interface - Set MTU on TG according to MTU on DUT interface - Log VPP packet traces on IPv4 and IPv6 tests failure - Remove VM_ENV tag from sweep ping test cases for jumbo frames Change-Id: I47aa7977bcff9c4366c67578aef542924a1d055b Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-02-29Add VXLAN testMatej Klotton1-22/+22
Change-Id: Id1d37fda2697fbfb7aa7a79318f8316b80e96963 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-02-17Test VIRL connection.Stefan Kobza1-1/+4
Change-Id: I812ff9c8c9669b63907469c643c839e8bd3b419a Signed-off-by: Stefan Kobza <skobza@cisco.com>
2016-02-17Refactor IPv4 utilsFilip Tehlar1-0/+17
Change-Id: Iae12444efba33e2d37b5d7beb1620e859abd84d7 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-02-17LF testbed2 topology, T-REX upgrade, vpe->vpp renameMiroslav Miklus1-1/+1
Testing testbed2 infrastructure T-REX upgrade 1.88 -> 1.91 Rename "vpe" to "vpp" Change-Id: Ia03c363e2b3c77a4e469509460b25028e5e1814f Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-02-12Last bulk update of CSIT.Stefan Kobza1-0/+63
Change-Id: I815e4d54e74a49fd19a9927554ce5c37a2719f7e Signed-off-by: Stefan Kobza <skobza@cisco.com>