aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
AgeCommit message (Collapse)AuthorFilesLines
2018-09-28CSIT-1321 Add IP4base tests using AVF driverPeter Mikus1-9/+18
Change-Id: I960c2b4170efa06597851853cfc15bda1c60fe94 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-19CSIT-1291 Improve service handling with container detectionPeter Mikus1-164/+82
Change-Id: Iaeac10676f46e0267041afee927bc6e3201146b2 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-05CSIT-1205 Create AVF driver testPeter Mikus1-107/+217
- 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/+19
+ 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-08-20Refactor VHOST codePeter Mikus1-0/+166
CSIT-1164 Create VM vhost tests for 2-node topology CSIT-1173 Implement VM vhost KWs for 2-node topology - Cleanup QemuUtils.py Library (PEP8, some TODOs, readability, multi queue, ring size, qemu version detection) - Cleanup VHOST KWs perf (Unify running QEMU on N-node topology) - Add ability to configure Queues, Hyperthreading, automatically compute number of CPU for VM/Testpmd and RXQ for Testpmd workload. - Partial cleanup of configuration KWs (l2xc, l2bd) for 2-node - Create IPv4 2-node KW Change-Id: I8aae1355bafa651de715cd438fe706c443ea1d88 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-03CSIT-1046 Make uio driver configurable from topofilesPeter Mikus1-0/+13
Currently we are configuring uio_driver from global variable. This may not be suitable for various topologies where we need different driver per TB. This patch is suppose to put uio_driver into topology files. Change-Id: I56af0697e8b2359ccb126151217976408720c1ba Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-02Compatibility fixes with Ubuntu 18.04Peter Mikus1-4/+18
Currently we are using ip:port socket to for VPP to listen for incoming connections. There is only one place in code this socket is used for detection if VPP is responding after restart. This patch is supposed to change ip:port to sock:file which is default preffered way in VPP. This way we can start using vppctl. netcat on the other side with ip:port remains hanged in console for infinite time not returning back. There is also need to check whether uio_module is loaded and eventually load it. As uio_pci_generic is not working there, we will fallback to main igb_uio (uio_pci_generic being only lightweight subset of igb_uio). This patch also add additional verbose output to console during setup to better understand if failure happens during copy/extract/setup. Change-Id: I0b8a3b76dce3316496a3ad928f58718b6e73057d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-06-22CSIT-1043: Execute pci rescan only if neededjuraj.linkes1-7/+24
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-05-04Fix various pylint 1.5.4 warningsVratko Polak1-2/+1
+ 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-4/+4
+ 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-04-23CSIT-1009: SRv6 proxy testsJan Gelety1-0/+1
- SRv6 with endpoint to SR-unaware Service Function via static proxy - SRv6 with endpoint to SR-unaware Service Function via dynamic proxy - SRv6 with endpoint to SR-unaware Service Function via masquerading proxy Change-Id: I6a6062cb41d810bf9e27dacfd866181bfde4c693 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-04-11Create unified service operationsPeter Mikus1-22/+69
- Add ability to dump the logs from service unit (since last start) - Cleanup service code to more streamlined way. Change-Id: I6e332dce3229727dd36fd72a8ecfb9fc9efe4d63 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-03-22FIX: check OS on DUT instead on hostJan Gelety1-1/+3
CSIT-1010 Change-Id: I21303c22a50c0fe7914f769aca61ef350287ccb5 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-03-19FIX: remove all vpp packages installedJan Gelety1-10/+10
Change-Id: I1a2e51fada2f16fb236499a5cbff735f5e08aae2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-03-16VPP install and verify in __init__.robotAndrej Kilvady1-0/+125
Move VPP installation to separate test in test suite setup phase to clearly indicate any issue with VPP installation. Added test to check VPP responsiveness after installation. Change-Id: Idc2c78152e23aa7301bb5dbf9b1b6f4b639c3e84 Signed-off-by: Andrej Kilvady <andrej.kilvady@pantheon.tech>
2018-03-14Robot logs archiving for trending jobsPeter Mikus1-4/+0
- Add output.xml auto-archiving to logs.fd.io. - Cleanup from obsolete code. Change-Id: Iafa9ef802264d2ad36ca0f556cb14d2b3ca0f179 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-17CSIT-675: SRv6 performance testsJan Gelety1-2/+29
- update L1 KWs - update L2 KWs - tests with one SID (no SRH insertion) - tests with two SIDs (SRH inserted) and decapsulation - tests with two SIDs (SRH inserted) without decapsulation - enabled packet traces and logged packet traces in the test case tear down if test failed Change-Id: I3a0f4c350eed3f42509c6d49e832faa78fe64dbb Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-12-15CSIT-861: SW cryptodev perf testsJan Gelety1-35/+89
Change-Id: I687216ca43569542d38be681ca04c898010fc65d Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-08CSIT-665: Re-write L1 robot keywords in pythonDasa Simkova1-2/+12
Change-Id: Iddd823375ddd17b9abd5f02ee3aea3bfcb625149 Signed-off-by: Dasa Simkova <dspropagacie@gmail.com>
2017-07-26Fix pylint errorsTibor Frank1-14/+15
Change-Id: I9b8d69978ee35bf7610cdfd372135ce3515eec96 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-06-20VIRL VPP PID fixJan Gelety1-23/+24
- use three tries to get PID of VPP process Change-Id: If72784dfc2c5600aae703dff9170c4f491a3b685 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-05-30Do not fail test case when no vpp pid detected in the tear downJan Gelety1-4/+9
- currently when no pid (or more pids) detected in the test case tear down of successfully run test case not only the WARN message is logged but the whole test case is failed - to change this behaviour but keep test case failure if no vpp pid (or more vpp pids) detected in test case setup the low level KW "Get VPP PID" behaviour has been changed to return one or more pids or None w/o raising an error and check has been moved to higher level KW "Save VPP PIDs" - there was added suite name and test case name to WARN message when no pid or more pids detected in the test case tear down Change-Id: I04f8d81c1ca48a1e4a45bd0e58f00d36d51c6933 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-04-10IPsec Multi-Tunnel performance test suiteKirill Rybalchenko1-0/+184
Change-Id: I4b0ba83960e50089f29cab9a30ab760241c6f566 Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
2017-03-28Use "No VPP PID found on node X" when vpp pid is not returnedJan Gelety1-2/+6
Change-Id: Idfe6d674355bf57fdc24219cdaf8664ec23dfce9 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-16Pylint fixesTibor Frank1-3/+4
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-11-07CSIT-465: Common test setup and teardownTibor Frank1-0/+45
This test setup and teardown is aimed to be used with all functional tests. It does not include functionality to manipulate VMs (qemu). Test setup includes: - Setup all DUTs before test - Save VPP PIDs - Setup all TGs before traffic script - Update All Interface Data On All Nodes Test teardown includes: - Show Packet Trace on All DUTs - Show vpp trace dump on all DUTs - Vpp Show Errors On All DUTs - Check VPP PID in Teardown Change-Id: Ifee0bd58b7865442c5b510852908fd8363e3c543 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-10-27Increase timeout for 'vpp restart' operationsMiroslav Miklus1-2/+2
Systemd first send SIGTERM and wait 90s (default value) to send SIGKILL to terminate the vpp service. Change-Id: Ia582cfdc4bebc5d3530e82692856fe733d0b001e Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-10-04Fix pylint warnings in python librariesselias1-2/+12
- no functional changes - fixes 80+ PEP-8 violations Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7 Signed-off-by: selias <samelias@cisco.com>
2016-06-30CSIT-180 Add VPP api trace dump after each TCpmikus1-0/+20
- Add VPP api trace dump after each TC Change-Id: I7c8bc0ffbca620f6fdb48369014a2ca9ffa3b3e4 Signed-off-by: pmikus <pmikus@cisco.com>
2016-06-14CSIT-163: Add show vpp version verbosepmikus1-0/+11
- Add output of vpp version verbose Change-Id: Ia74b97be4636d55b115246d495a5d6eea0a94bb7 Signed-off-by: pmikus <pmikus@cisco.com>
2016-04-22Reformat python libraries.Matej Klotton1-12/+15
PEP8 reformat fix typos docstrings reformat Change-Id: Ic48ba4e06490630808b8e2ab1ab0b046ec7eeed7 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-03-11Update VPP version downloaded from Nexus.Matej Klotton1-3/+3
Change-Id: Iae2ee6d576347262d9f3f9a9e9b9cc65dbc5bf5e Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-02-17Test VIRL connection.Stefan Kobza1-1/+15
Change-Id: I812ff9c8c9669b63907469c643c839e8bd3b419a Signed-off-by: Stefan Kobza <skobza@cisco.com>
2016-02-08New version of RF tests.Stefan Kobza1-0/+41
Change-Id: I241a2b7a7706e65f71cfd4a62e2a40f053fc5d07 Signed-off-by: Stefan Kobza <skobza@cisco.com>