Commit graph

53 commits

Author SHA1 Message Date
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
Ashish Pant 81e3d6095f tests: Adding bgp tests for prefix-lists
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adds mulitple test scenarios for prefix-lists in bgp. Verfication
API for prefix-lits

Also adds description for bgp-basic test suite
2019-07-09 10:26:53 +05:30
Ashish Pant cb6b1d9058 tests: Adding 5 test cases to bgp-basic suite
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding test cases and verfication API for new test cases
2019-07-09 10:26:53 +05:30
Ashish Pant 77ef1af6e3 tests: Adding timers and bgp 4 bytes ASN test
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding verify and config apis for bgp timer testcase
Adding verify and config apis for changing ASN to 4 bytes
2019-07-09 10:26:53 +05:30
Ashish Pant e6db2bb135 tests: Adding API for route-map
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding API for reading JSON data and configuring route-map on the
router
2019-07-09 10:26:53 +05:30
Ashish Pant 00db2a8978 tests: Adding API for prefix-list configuration
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding API for prefix-list that reads data from JSON and configures
on the router.
2019-07-09 10:26:53 +05:30
Ashish Pant e466352711 tests: Adding API for static route
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding API for reading data from JSON and configuring static
routes on the router
2019-07-09 10:26:53 +05:30
Ashish Pant 7fa2079a03 tests: First test case and JSON
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adds verification API for bgp, first test case alongwith JSON file
2019-07-09 10:26:53 +05:30
Ashish Pant 3c19bc3134 tests: Adding api for BGP configuration
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding mulitple methods to form BGP configuration and other
helper methods.
If "bgp" is given in JSON the configuration will be created
2019-07-09 10:26:53 +05:30