Commit graph

61 commits

Author SHA1 Message Date
Mark Stapp 1e5b2db644 tests: avoid python2 regex syntax
Update a few regexs to avoid python2-specific syntax

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26 15:40:00 -04:00
Mark Stapp 45c3045aef tests: report uname info once per test
Report 'uname' info once per test, not once per
configured router in each test.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26 15:40:00 -04:00
Mark Stapp 61196140a6 tests: improve unicode handling
Support more of the string/unicode interactions in various
topotests.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26 15:40:00 -04:00
Mark Stapp 11761ab0f4 tests: python3 compat fixes for topotests: tabs and misc
Use only spaces in python files; no tabs; also a couple of small
api fixes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26 15:40:00 -04:00
Donald Sharp dfc51e66bf
Merge pull request #6814 from gpnaveen/ospf_basic_functionality
tests: ospf basic functionality topojson testcases.
2020-09-18 21:20:04 -04:00
Mark Stapp e5f0ed147b tests: use .items instead of .iteritems in topotests
Avoid py2-only .iteritems() api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-18 15:55:23 -04:00
nguggarigoud 035267a374 tests: Adding daemon check for ospfd in common_config.py
start ospfd only when ospf config is used.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2020-09-18 15:13:46 +05:30
naveen 4256a20961 tests: ospf_basic_functionality topojson testcases.
1. Adding 18 ospf testcases to topojson.
2. Adding ospf.py library.

Test suite execution time is ~18 minutes.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-09-18 15:13:46 +05:30
Martin Winter 576cada54c
Merge pull request #7066 from donaldsharp/more_test_speedups
tests: Speed up topotests by being more aggressive
2020-09-16 22:27:16 +02:00
nguggarigoud f052d1fc39 tests: Addressing lint error.
Added new line to remove git link error.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-09-15 15:51:07 +05:30
naveen 3dfd384ec4 tests: Moving kernel version check to API.
Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-09-15 15:44:10 +05:30
Donald Sharp 9fa352cfb7 tests: Speed up topotests by being more aggressive
We have a bunch of tests that wait *then* check a command for success/failure.
Modify the tests to check *first* then to wait.  This reduces test
run times on my system by ~1400 seconds for a full run.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-11 20:20:42 -04:00
Kuldeep Kashyap 985195f2b4 tests: Add bgp_vrf_dynamic_route_leak test suite
1. Added test to verify bgp vrf dynamic route leak functionality
2. Total execution time is ~8 mins
3. Added kernel version check, these script would be run for kernel version >= 4.19

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-01 16:11:24 +00:00
Kuldeep Kashyap bc0a514728 tests: Add f/w support for bgp_vrf_dynamic_route_leak tests automation
1. Adding f/w support for bgp_vrf_dynamic_route_leak tests automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-01 15:48:10 +00:00
Rafael Zalamena 48a1bbdf76
Merge pull request #6925 from kuldeepkash/bgp_basic_functionality
tests: Add new tests to bgp-basic-functionality-topo1
2020-08-30 07:40:28 -03:00
Mark Stapp cd79342c12 tests: small topotest improvements for python3
Avoid unnecessary use of StringIO in one place, use version-
dependent method in another. Remove a couple of other py2->py3
problems.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-28 10:10:46 -04:00
Kuldeep Kashyap 19f4da0bec tests: Add new tests to bgp-basic-functionality-topo1
1. Added new tests to bgp-basic-functionality-topo1
3. Execution time increased by 55 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-08-28 12:24:20 +00:00
Donald Sharp dbb0ba05aa tests: no learning is not accepted
The vxlan `ip... ` command is failing because we are passing in
`no learning` and that is failing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-06 16:32:04 -04:00
Kuldeep Kashyap 1b66072ce0 tests: Adding test suites evpn_type5_test_topo1
1. Added 15 test cases to test evpn type5 functionality
2. Total execution time is ~9 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 09:04:16 +00:00
Kuldeep Kashyap 3c334c3915 tests: Adding framework support for EVPN-Type5 automation
1. Added APIs to create evpn related config.
2. Added APIs to verify evpn config and routes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 06:12:55 +00:00
Kuldeep Kashyap f6f20a77e8 tests: [topojson] Increase BGP convergence wait time
1. Increasing BGP convergence wait time to overcome Ubuntu 16.04 arm8 box, as
bgp neighorship is taking more time in this particular testbed.
2. Debugged bgp-ecmp-topo2 failures and here also it seems to be bgp convergence
issue, doing some enhancement in scripts to handle it

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-14 13:09:06 +00:00
Mark Stapp 8b547a6dab test: use ipaddress module instead of ipaddr
Use the standard ipaddress module instead of installing 'ipaddr',
which may be deprecated now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 12:32:10 -04:00
Kuldeep Kashyap c39fe454e2 tests: Generate support bundle/dump data on tests failures
1. It will generate support bundle/sump data on test failures
2. It used /usr/lib/frr/generate_support_bundle.py utility to dump the data

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-07 16:02:22 +00:00
Mark Stapp c4f9205763 tests: fix interface and debug config diff in topojson framework
Include vrf name with interface name when topojson framework
generates interface configuration. This matches the output of
'show runn', and makes config reset less disruptive. Also
stop removing configured debugs and log output when re-generating
config.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-24 11:27:15 -04:00
Kuldeep Kashyap f8d572e88f tests: Framework support for BGP Multi-VRF automation
1. Added/Enhanced APIs to created bgp multi-vrf config and to
verify config/functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-20 04:48:47 +00:00
Kuldeep Kashyap 35ba1e3db8 tests: Adding test suite bgp_gr_functionality_topo1
1. Test suite has 25 test cases to verify BGP-graceful-restart functionality
2. Execution time is ~21 Mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 18:52:50 +00:00
Kuldeep Kashyap a5a52d6608 tests: Add library support for BGP-Graceful-Restart automation
1. Adding APIs to common_config.py to support BGP-Graceful-Restart automation
2. Adding APIs to create BGP-GR config to bgp.py
3. Adding verification API for BGP-GR functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 17:15:55 +00:00
Kuldeep Kashyap afee014eda tests: Added new tests to bgp-basic-functionality-topo1
1. Added 2 new test cases to bgp-basic-functionality-topo1
2. Enhanced 2 tests to run for both static routes and network advvertise command

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-04-09 09:23:59 +00:00
Kuldeep Kashyap 38c3547ac8 tests: Adding new test suite bgp_communities_topo1
1. Added 1 test case to verify NO-ADVERTISE Community functionality
2. Enhanced bgp.py to exclude routers from verification, if doesn't have bgp config

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-04-08 12:27:23 +00:00
reformat 787e762445 tests: Run python formatter (black) for topotests
Mostly ' => ", whitespace changes.

Using https://github.com/psf/black

Signed-off-by: reformat <reformat@nobody.nobody>
2020-04-03 19:41:28 +03:00
Donatas Abraitis 0a9fe278f6 tests: Remove/change JSON attributes for show bgp ... json
This is related to some attributes changes: aspath, med, localPref.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-01 23:59:45 +03:00
David Lamparter 2159152d9f topojson: use empty vtysh.conf for frr-reload.py
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06 15:13:32 +01:00
Kuldeep Kashyap c7bb8a05ff tests: Enhance BGP Path attribute APIs
Modified affacted APIs to supported BGP Path attributes modification
and verification

Signed-off-by: Kuldeep Kashyap <kuldeepkas@gmail.com>
2019-10-21 09:47:00 +05:30
Ashish Pant 6d32a6a18a tests: Update cli error list and retry function
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Add cli error returned for invalid bgp-community-list command

Fix retry function to avoid retries when expected is False
2019-10-17 09:17:03 +05:30
Ashish Pant ca2ef9e6ff tests: Add verify community list api
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Api checks if community list is present in the system or not
2019-10-17 09:17:03 +05:30
Ashish Pant 287d692409 tests: Add step api in topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Print messages with a step number to log from test case
2019-10-17 09:17:03 +05:30
Ashish Pant 915bed88d8 tests: Add topojson route-map for nexthop
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Add route-map option for ipv6 nexthop

Fix typo in bgp configuration
2019-10-03 07:15:20 +05:30
Ashish Pant 161572bdf9 tests: Fix topojson link local ipv6 address
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Removed code that disabled link local ipv6 address on the interface
2019-10-03 07:15:11 +05:30
Kuldeep Kashyap 8aa6292547 tests: Add API to shut/noshut router interface
This API would help to shut/nohut specified router interfaces

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap 21a51c4d0f tests: Adding verification APIs for bgp route-maps and community-lists
APIs to verify bgp route-maps, bgp community and large community configurations

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap 380bb6d16b tests: Enhance support to create bgp community-list or large-community-list
Adding new API to create bgp community-list or large-community-list

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap 89f86e8c7b tests: Enhance framework to create and delete route-map
Added APIs to create and delete route-maps configuration

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Ashish Pant 27d9695dd5 tests: Add ecmp test cases
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adds ecmp test case for ibgp and ebgp topology.
2019-09-03 07:22:22 +05:30
Ashish Pant bca7983774 tests: Enhance execution logs in topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

1. Add check if show running output is corrupted as frr-reload does
   not return cause of failure, just the error codes.
2. Change logger level to debug for some extra information.
3. Modify logger messages for more clear information.
4. Print configuration commands to console instead of show running
5. Print show command output to console.
6. Move show running output within flag show_router_config.
7. Add retry decorator for retyring show commands.
2019-08-22 16:24:45 +05:30
Rafael Zalamena 91c939dc12 topotest: improve common_config.py
Don't wait for `True` results when the return type is a string.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Rafael Zalamena 3857e52f12 topotest: improve reliability of verify_rib
Attempt to run the function multiple times to make sure we got the
result we expected. This is a middle ground between big sleeps and short
test intervals.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Donald Sharp 1d90adee9d tests: Topotests are not giving sufficient time to propagate data
A bunch of our current tests setup data and redistribute
it across some bgp connections and then test for it
being there.  A delay of 2 seconds that was initially
there to ensure that the data has propagated does not
actually work all the time when you have a loaded
virtualized environment.

Make the sleep 10 seconds.  I agree this is not the ideal
solution but I would rather get the damn tests up and running
again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-11 14:40:31 -04:00
Ashish Pant 870fc40f7a tests: Fix info messages print in std_error
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

frr-reolad.py invocation sends info message to stderror channel
Redirected stderror from frr-reload.py to stdout

Fixed verify_convergence when more than one link is present
2019-07-09 10:26:53 +05:30
Ashish Pant 6bb29e5ea9 tests: Fix logdir creation
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Creates logdir everytime in start_topology, removed stop_topoloy.
Using tgen.stop_topology in test case now.
2019-07-09 10:26:53 +05:30
Ashish Pant 0c5c6e2e64 tests: Fixing ipv6 address generation
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
2019-07-09 10:26:53 +05:30