Commit Graph

2224 Commits

Author SHA1 Message Date
Mobashshera Rasool
8a86be272f tests: Adding ospfv3 asbr summarisation
Total cases 9.

Authored-by: nguggarigoud <nguggarigoud@vmware.com>
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-26 12:05:31 +00:00
Donatas Abraitis
66aa87d03e
Merge pull request #8637 from opensourcerouting/pim-vrf-acl-fixes
Pim vrf acl fixes
2021-07-26 12:20:54 +03:00
Donald Lee
26693b3afc lib: typo in tests
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-24 03:35:09 +08:00
Donald Sharp
0775caa958
Merge pull request #9082 from ton31337/feature/bgp_alias_route-map_match
bgpd: `match alias` for route-map
2021-07-22 08:30:15 -04:00
Igor Ryzhov
1527899504 tests: fix invalid multiline format
`format` can't be used per-line when we have a multiline string.

This was recently broken in 3881d05.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-07-21 15:37:15 +03:00
Donatas Abraitis
90737805d9
Merge pull request #8956 from pguibert6WIND/bgp_loop_through_itself
bgpd: prevent routes loop through itself
2021-07-21 09:28:21 +03:00
Donatas Abraitis
903b3fff7d tests: Check if match alias works for route-maps
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-21 09:26:15 +03:00
nguggarigoud
db56171c86 tests: Adding ospfv3 basic functionality test cases
1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-20 02:34:24 -07:00
Mark Stapp
b747851a5d tests: skip tests after errors in bgp-evpn-vxlan
In bgp-evpn-vxlan, skip test cases if there's been a failure;
a couple of cases were missing this.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-07-19 10:36:12 -04:00
Donald Lee
64d457d7ac lib: Rename frrscript_unload to delete
frrscript_load now loads a function instead of a file, so frrscript_unload
should be renamed since it does not unload a function.

Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
8a04c1e74e tests: Add more examples to get_result
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
ad6e9b854d test: Use frrscript_unload
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
5090d7249f tests: Add test for frrscript_get_result
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
7948c5d27a tests: Add errorneous test cases
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
4535b6113c tests: Add test for calling Lua function
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Sharp
c24e832ae9
Merge pull request #8946 from gpnaveen/bgp_lib_changes
tests: Adding lib changes for bgp peer type verification.
2021-07-16 09:15:36 -04:00
Donald Sharp
eeef611bad
Merge pull request #9068 from ton31337/fix/reduce_converge_time
tests: Reduce bgp_conditional_advertisement converge time 10x
2021-07-16 08:34:46 -04:00
Christian Hopps
be4a9b0570 tools: improve frr-reload.py delta file creation
- Remove incorrect requirement for `service integrated-vtysh-config`
  when producing a delta.
- Add `--test-reset` option which suppresses non-parseable lines from the
  produced delta
- Use new features in common_config.py

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-15 22:12:01 -04:00
Donatas Abraitis
2c3d4b28bd tests: Reduce bgp_conditional_advertisement converge time 10x
~15min vs. ~1min.

Before:
```
1 passed, 1 skipped in 908.61 seconds
```

After:
```
1 passed, 1 skipped in 82.94 seconds
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-15 23:40:42 +03:00
Donald Sharp
0f8de6a8d8
Merge pull request #9055 from ton31337/fix/show_pfxsnt_even_when_default_route_originated
bgpd: Reflect changes to pfxSnt when using default-originate
2021-07-15 15:54:01 -04:00
nguggarigoud
ea234209a1 tests: Fixing timing issue in evpn script.
Modified bgp timer values for faster convergence.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-15 05:57:25 -07:00
Donald Sharp
5f179a1a61
Merge pull request #9018 from LabNConsulting/chopps/triage-features
tests: add triage features: strace, asan-abort, and shells/vtys/gdbs for docker runs too
2021-07-15 08:37:15 -04:00
nguggarigoud
ad03ea8ebf tests: Adding lib changes for bgp peer type verification.
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-15 05:28:08 -07:00
Donatas Abraitis
5fa869fcc7 tests: Check if pfxSnt is adjusted when default-originate is used for BGP
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-15 00:10:38 +03:00
Christian Hopps
0ba1d257be tests: add triage features: strace, asan-abort, docker exec
TMUX and Screen support when running topotests inside docker. This
allows the gdb, shell and vtysh features to correctly work even when
running the tests inside docker.

Add options:
--asan-abort :: aborts the process on ASAN errors
--strace-daemons :: strace some or all daemons

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-14 15:55:40 -04:00
Russ White
000df71ccd
Merge pull request #8767 from opensourcerouting/ospfd-gr
ospfd: introduce support for Graceful Restart (restarting mode)
2021-07-13 06:39:53 -04:00
Philippe Guibert
3881d05175 bgp_basic_functionality: fix pylint errors
fix pylint errors found.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-07-12 13:57:36 +02:00
Philippe Guibert
654a5978f6 bgpd: prevent routes loop through itself
Some BGP updates received by BGP invite local router to
install a route through itself. The system will not do it, and
the route should be considered as not valid at the earliest.

This case is detected on the zebra, and this detection prevents
from trying to install this route to the local system. However,
the nexthop tracking mechanism is called, and acts as if the route
was valid, which is not the case.

By detecting in BGP that use case, we avoid installing the invalid
routes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-07-12 13:57:36 +02:00
Donald Sharp
75e8e36b4d
Merge pull request #8945 from ton31337/fix/check_only_ebgp_peer
bgpd: Parse as withdrawal if AS-PATH contains 0 within the path
2021-07-06 16:06:54 -04:00
Martin Winter
511184897b
tests: Add IGMP/PIM VRF test
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2021-07-06 14:23:55 +02:00
Donald Sharp
432bb280fb
Merge pull request #8939 from LabNConsulting/chopps/sup-bund-fixes
Speedup support bundles, fix bugs, add CLI timestamp
2021-07-06 07:58:19 -04:00
Martin Winter
fe3c85de1a
tests: Add PIM ACL-based RP selection test
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2021-07-06 01:44:36 +02:00
Martin Winter
80c5c45b0b
tests: fix hang during topology shutdown when CLI connection fails
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2021-07-06 01:44:36 +02:00
David Lamparter
fa8e714a6f
tests/lib: add a simple prefix list query tool
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-07-06 01:44:35 +02:00
David Lamparter
f8f4aec3b0
tests/lib/cli: allow using YANG modules
Since the common CLI code calls nb_init, allow specifying some modules
to load by overriding test_yang_models.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-07-06 01:44:35 +02:00
Renato Westphal
b2a2107ade tests: add OSPF graceful restart topotest
Add a new topotest that features a topology with seven routers spread
across four OSPF areas:
* 1 backbone area;
* 1 regular non-backbone area (0.0.0.1);
* 1 stub area (0.0.0.2);
* 1 NSSA area (0.0.0.3).

All routers have both GR and GR helper functionality enabled in
the configuration. The test consists of restarting each router,
one at time, and checking that all forwarding planes (and LSDBs)
are kept intact during those restarts.

A successful run takes about three minutes to finish.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-07-05 11:43:02 -03:00
Renato Westphal
5957a1a11f tests: add "save_config" parameter to kill_router_daemons()
Using "write memory" to save the daemons' configurations before
restarting them can cause log files to stop working correctly. Add
a new "save_config" to the kill_router_daemons() function to prevent
that from happening when saving the configurations isn't necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-07-05 11:43:02 -03:00
Donatas Abraitis
12536067cc
Merge pull request #8979 from opensourcerouting/msdp-topotest-speedup
topotests: speed up MSDP convergence speed
2021-07-05 09:16:27 +03:00
Quentin Young
71bae95e4a
Merge pull request #8888 from dlqs/lua-call 2021-07-05 04:13:20 +00:00
Rafael Zalamena
616bbd94c8 topotests: speed up MSDP convergence speed
Decrease the connection retry time to reduce test duration on connection
failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-07-04 11:17:10 -03:00
Donald Sharp
70ec4ea388
Merge pull request #8871 from opensourcerouting/msdp-peer-rework
pimd: rework MSDP peer and add tests
2021-07-01 07:31:21 -04:00
Christian Hopps
0ef5bf1905 tests: generate support bundles in parallel, fix bugs
Speedup (large topo): OLD: ~6 minutes NEW: ~1 second
  (when paired with generate_support_bundle.py changes)
- Collect from each node in parallel

Bug fixes:
- sub-directory test name was the same internal pytest function name
  for any test, and not the actual test name.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-30 15:46:10 +00:00
Christian Hopps
396b072f9c tests: extend timeout period for failing mcast test
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-30 15:46:10 +00:00
Quentin Young
5e02b133bf
Merge pull request #8943 from idryzhov/build-warn
tests: fix build warning
2021-06-30 04:33:30 +00:00
Quentin Young
f27e08373c
Merge pull request #8887 from LabNConsulting/chopps/fix-test-retries 2021-06-29 19:24:59 +00:00
Donatas Abraitis
23b73f1957 tests: Treat as withdraw if AS-PATH contains 0 within the path
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 17:17:55 +03:00
Donatas Abraitis
d0046e9acc tests: Add a test case for BGP AS-PATH 0 in the path
We should withdraw prefixes with ASN 0 within the path.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 16:29:32 +03:00
Igor Ryzhov
f102386a04 tests: fix build warning
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-29 16:13:12 +03:00
Trey Aspelund
b01830dc5b tests: Include evpn in bgp-default-afi-safi.py
Expands "bgp default" tests to include l2vpn evpn in addition
to ipv4/ipv6 unicast.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-06-28 20:55:51 +00:00
Trey Aspelund
4a804cedc8 tests: rename bgp_default_ipv4_ipv6 to _afi_safi
Replaces the ipv4/ipv6-specific naming with generic afi/safi reference.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-06-28 20:53:59 +00:00
Rafael Zalamena
858252d0c5 topotests: bump MSDP mesh group test wait time
On a loaded machine running FRR with ASAN I've got the following result:

  INFO: waiting MSDP connection from peer 10.254.254.3 on router r1
  INFO: 'router_json_cmp' polling started (interval 1 secs, maximum 30 tries)
  INFO: 'router_json_cmp' succeeded after 22.53 seconds

Which is very close to the limit, so lets bump the value 4x to avoid a
test false positive.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 15:06:20 -03:00
Rafael Zalamena
3bed07f60f topotests: topology to test MSDP peers
Test the following items:
 - Multicast route installation
 - MSDP peering/SA/RPF

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 15:06:20 -03:00
Donald Lee
555f7625a8 tests: put lua scripting unit tests behind flag
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-25 17:29:15 +08:00
Christian Hopps
ed776e38f6
tests: apply KISS to retry fixture
This python fixture was way too complex for what is needed.

Eliminate gratuitous options/over-engineering:

- Change from non-deterministic `wait` and `attempts` to a single
`retry_timeout` value. This is both more deterministic, as well as
what the user should actually be thinking about.

- Use a fixed 2 second pause between executing the wrapped function
rather than a bunch of arbitrary choices of 2, 3 and 4 seconds
spread all over the test code.

- Get rid of the multiple variables for determining what "Positive" and
"Negative" results are. Instead just implement what all the user code
already wants, i.e., boolean False or a str (errormsg) means
"Negative" result otherwise it's a "Positive" result.

- As part of the above the inversion logic is much more comprehensible
in the fixture code (and more correct to boot).

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-25 05:33:04 +00:00
Christian Hopps
d8c3138cd9 tests: fix pylint cleanup damage
Pylint cleanup in commit 914faab594 removed a crucial function
parameter that inverted the logic of verify function calls.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-25 02:33:03 +00:00
Kuldeep Kashyap
25b43d5654 tests: Fix generate support bundle issue for test_route_map_topo1
1. There was a false condition, which was causing support bundle to be generated.
Issue is fixed.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-06-24 15:26:59 -07:00
Russ White
e88ed0d667
Merge pull request #8912 from gpnaveen/ospf_asbr_summary
tests: Adding ospfv2 summarisation test cases.
2021-06-24 16:19:22 -04:00
nguggarigoud
e6a472a05a tests: Adding ospfv2 summarisation test cases.
Total cases 6.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-23 13:57:12 -07:00
Donald Sharp
43d985e414
Merge pull request #8860 from ton31337/fix/aspath_prepend_default-originate
bgpd: Allow aspath prepending for default-originate with route-maps
2021-06-23 10:13:29 -04:00
Donald Sharp
792ae3b3b5
Merge pull request #8901 from ton31337/feature/bgp_default_route_originate_match
tests: Add an additional conditional BGP default route advertisement
2021-06-23 07:53:39 -04:00
Patrick Ruddy
fa855f8fa3
Merge pull request #6695 from adharkar/frr-master-gateway_ip
EVPN route type-5 gateway IP overlay Index
2021-06-23 09:23:54 +01:00
Donald Lee
4b827e08a1 tests: enable lua script tests in ubuntu-20 ci
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-23 00:58:39 +08:00
Donald Lee
e06feaf8fe tests: Add unit test for lua encoders/decoders
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-23 00:58:39 +08:00
Donald Lee
1e0e4d2355 tests: Add unit test for lua scripting
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-23 00:58:04 +08:00
Russ White
b79f1e068e
Merge pull request #8725 from pjdruddy/ospfv3_fair_socket
OSPFv3 socket rework
2021-06-22 10:58:33 -04:00
Donatas Abraitis
8cfca51df5 tests: Add an additional conditional BGP default route advertisement
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-22 17:34:59 +03:00
Donatas Abraitis
cc54c07298 tests: Check if as-path prepends work with route-maps and default-originate
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-22 15:51:07 +03:00
Donald Sharp
457d4ee329
Merge pull request #8868 from ranjanyash54/redistribute_fix
ospf6d: redistribute command minor fixes
2021-06-19 12:20:04 -04:00
Igor Ryzhov
80fb1cf446 tests: use correct metric type and value for OSPFv3 redistributed routes
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-18 16:05:01 +03:00
Donald Sharp
21b0c655e1
Merge pull request #8843 from idryzhov/isis-dyn-hostname-cache
isisd: per-instance dynamic hostname cache
2021-06-18 08:20:25 -04:00
Pat Ruddy
d01673b4cd tests: Modify topotests to include write-multiplier config
Modify both the default and vrf ospf6 topologies to include a test
where write-multiplier is configured to a non-default value and
the ospf6 neighbors are reset then checked.
Run black on both test files.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Quentin Young
9b1bc4d661
Merge pull request #8856 from LabNConsulting/chopps/topo-valgrind 2021-06-16 18:57:25 +00:00
Christian Hopps
e58133a78e tests: add valgrind memleaks run options and detection
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-16 02:56:15 -04:00
nguggarigoud
2448d00200 tests: Adding ospfv3 basic functionality test cases
1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-15 17:00:17 -07:00
Martin Winter
05a7c65a15
Merge pull request #8814 from kuldeepkash/topojson_framework
tests: Fixing common pylint error for topojson
2021-06-15 17:03:57 +02:00
Igor Ryzhov
240f48b36b isisd: per-instance dynamic hostname cache
Currently, the dynamic hostname cache is global. It is incorrect because
neighbors in different VRFs may have the same system ID and different
hostnames.

This also fixes a memory leak - when the instance is deleted, the cache
must be cleaned up and the cleanup thread must be cancelled.

Fixes #8832.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-11 18:30:47 +03:00
Donald Sharp
59ec133a03
Merge pull request #8561 from opensourcerouting/msdp-refactor-v2
pimd: rework MSDP mesh groups
2021-06-10 09:44:28 -04:00
Rafael Zalamena
0614153799
Merge pull request #8733 from idryzhov/ipv6-ospf6-area
ospf6d: fix interface area configuration
2021-06-10 10:34:45 -03:00
Donatas Abraitis
8d6aca7f21
Merge pull request #8754 from louis-oui/bgp-summary-filter
bgpd: improve show bgp summary display
2021-06-10 09:58:31 +03:00
Rafael Zalamena
1771900c02 topotests: new test topology for MSDP
Add basic topology test for MSDP meshed groups.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09 12:32:24 -03:00
Rafael Zalamena
ab59579a12 topotests: support adding hosts
Add API to topogen so we can build topology with simple hosts instead
of routers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09 12:32:24 -03:00
Igor Ryzhov
cdde8b4bc7 tests: replace "interface IFNAME area" with "ipv6 ospf6 area"
Only one test is modified yet, to have both new and deprecated commands
tested by the CI.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-08 21:38:09 +03:00
Igor Ryzhov
6869bb921e tests: fix ospf6_topo1_vrf
ospf6d (and all other daemons except zebra) doesn't correctly process
`interface X vrf Y`, because it doesn't know existing VRFs at the time
of configuration file reading. Therefore it doesn't apply configuration
provided in the interface node.

Fix the problem by removing `vrf Y` part, having just an interface name
is enough.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-08 21:36:09 +03:00
Olivier Dugeon
da721863c3
Merge pull request #7096 from gpnaveen/ospf_asbr_summarisation
tests : Adding 2 ospf asbr summary testcases.
2021-06-08 17:20:33 +02:00
Russ White
1c5cc08128
Merge pull request #8727 from opensourcerouting/ospfv3-nssa
ospf6d: implement NSSA area support
2021-06-08 10:24:29 -04:00
Quentin Young
7b450535c9
Merge pull request #8713 from LabNConsulting/chopps/grpc-unit-test 2021-06-08 14:00:10 +00:00
Louis Scalbert
96c81f6671 bgpd: add terse display option on show bgp summary
Add a terse option to show bgp summary to shorten output.

Do not show the following information about the BGP
instances: the number of RIB entries, the table version and the used memory.
The "terse" option can be used in combination with the "remote-as", "neighbor",
"failed" and "established" filters, and with the "wide" option as well.

Before patch:

ubuntu# show bgp summary remote-as 123456
IPv4 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0
BGP table version 0
RIB entries 3, using 552 bytes of memory
Peers 5, using 3635 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
10.200.200.2    4     123456     81432         4        0 56092    0 00:00:13       572106        0 N/A

Displayed neighbors 1
Total number of neighbors 4

IPv6 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0
BGP table version 0
RIB entries 3, using 552 bytes of memory
Peers 5, using 3635 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
% No matching neighbor

Total number of neighbors 5

After patch:

ubuntu# show bgp summary remote-as 123456 terse
IPv4 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
10.200.200.2    4     123456     81432         4        0 56092    0 00:00:13       572106        0 N/A

Displayed neighbors 1
Total number of neighbors 4

IPv6 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 1

% No matching neighbor

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-08 10:47:35 +02:00
Louis Scalbert
ce1944f06a bgpd: add counter of displayed show bgp summary when filtering
When filtering sessions on show bgp summary with failed, established,
neighbor and remote-as options, add a counter of displayed neighbors
in addition to the total number of neighbor :

"Displayed neighbors X"

ubuntu# show bgp summary failed remote-as external
IPv4 Unicast Summary (VRF default):

Neighbor        EstdCnt DropCnt ResetTime Reason
10.200.200.2          0       0     never Waiting for NHT
172.16.29.2           0       0     never Waiting for NHT
10.22.1.2             0       0     never Waiting for NHT

Displayed neighbors 3
Total number of neighbors 5

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-08 10:46:57 +02:00
Louis Scalbert
c3c4e52850 bgpd: display pretty VRF/view name on no such neighbor
Display on which VRF/view the neighbor was not found. Useful when
selecting "vrf all".

Before patch:
No such neighbor in this view/vrf

After patch:
No such neighbor in VRF default

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-08 10:46:37 +02:00
Kuldeep Kashyap
3c41ebf8ea tests: Fixing common pylint error for topojson
Issue: There was an error reported by Pylint regarding "expected" keyword:
   Unexpected keyword argument 'expected' in function call (unexpected-keyword-arg)
Fix: We have defined expected keyword in all topojson APIs.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-06-07 22:23:34 -07:00
Ameya Dharkar
eb3859f2f4 tests: Topotest for BGP EVPN Overlay Index Gateway IP feature
Following functionality is covered:

         +--------+ BGP     +--------+ BGP  +--------+      +--------+
    SN1  |        | IPv4/v6 |        | EVPN |        |      |        |
   ======+ Host1  +---------+   PE1  +------+   PE2  +------+  Host2 +
         |        |         |        |      |        |      |        |
         +--------+         +--------+      +--------+      +--------+

Host1 is connected to PE1 and host2 is connected to PE2
Host1 and PE1 have IPv4/v6 BGP sessions.
PE1 and PE2 gave EVPN session.
Host1 advertises IPv4/v6 prefixes to PE1.
PE1 advertises these prefixes to PE2 as EVPN type-5 routes.
Gateway IP for these EVPN type-5 routes is host1 IP.
Host1 MAC/IP is advertised by PE1 as EVPN type-2 route

Following testcases are covered:
TC_1:
Check BGP and zebra states for above topology at PE1 and PE2.

TC_2:
Stop advertising prefixes from host1. It should withdraw type-5 routes. Check
states at PE1 and PE2
Advertise the prefixes again. Check states.

TC_3:
Shut down VxLAN interface at PE1. This should withdraw type-2 routes. Check
states at PE1 and PE2.
Enable VxLAN interface again. Check states.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-06-07 17:59:45 -07:00
Christian Hopps
bb2cfcd010 tests: timing large config operations
To start we use 10k static route config. This test goes along with
recent batching changes it will fail w/o them (b/c some operations w/o
batching take 100 times as long).

This test should be added to over time for other large config
items (e.g., acl, policy, etc)

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-07 21:34:29 +00:00
Olivier Dugeon
09c9134e2d
Merge pull request #8756 from volta-networks/ospfd_sr_blocks
ospfd, doc: combined SRGB/SRLB command
2021-06-07 11:15:03 +02:00
Christian Hopps
deca28a33b tests: add grpc unit test
Test uses staticd which required some C++ header protections.
Additionally, the test also runs in the ubuntu20 docker container as
grpc is supported there by the packaging system.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-06 18:03:17 +00:00
Mark Stapp
e4768d32b8
Merge pull request #5865 from slankdev/slankdev-zebra-srv6-manager
zebra: srv6 manager
2021-06-04 13:41:55 -04:00
Emanuele Di Pascale
6443a4be57 ospfd, doc, tests: combined SRGB/SRLB command
similarly to what was done for IS-IS in commit 01d43141, combine
the SRGB and SRLB commands for OSPF-SR, so that we can replace
overlapping ranges in one sweep change.

Also allow the range configuration to be stored before SR is enabled.
There is no reason why we should not - in fact that constraint meant
that we were always requesting the default label ranges regardless
of what we actually wanted to use.

Finally, update the topotests now that we do not need to refresh
the SRGB/SRLB/MSD after disabling SR. Note that the prefix-sid still
needs to be re-added.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-06-04 17:22:38 +02:00
Louis Scalbert
6cac2fcc47 bgpd: modify VRF/view display in show bgp summary
Modify VRF/view display in show bgp summary:
- to be more concise
- to display on which VRF/view no neighbor was found

Before patch:
ubuntu# show bgp vrf all summary

Instance default:

IPv4 Unicast Summary:
BGP router identifier XX.XX.XX.XX, local AS number XXXX vrf-id 0
(...)
IPv6 Unicast Summary:

Instance private:

IPv4 Unicast Summary:

ubuntu# show bgp vrf all ipv4 multicast summary
% No BGP neighbors found
% No BGP neighbors found

After patch:
ubuntu# show bgp vrf all summary

IPv4 Unicast Summary (VRF default):
BGP router identifier XX.XX.XX.XX, local AS number XXXX vrf-id 0
(...)
IPv6 Unicast Summary (VRF default):
(...)
IPv4 Unicast Summary (VRF private):
(...)

ubuntu# show bgp vrf all ipv4 multicast summary
% No BGP neighbors found in VRF default
% No BGP neighbors found in VRF private

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-04 15:03:10 +02:00
Louis Scalbert
7ff6a42763 topotests: remove uneccessary vtysh cmd request
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-04 15:03:04 +02:00
Rafael Zalamena
12a97d4668 topotests: OSPFv3 NSSA test LSA type 7
New OSPFv3 NSSA test:
 * When a static route is redistributed to an NSSA router it should be
   type 7 and should show up in OSPFv3 route database.
 * Test LSA Type 7 and route removal.

Co-authored-by: Soman K.S <somanks@gmail.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-04 07:23:10 -03:00
Kaushik
d87586c6d6 topotests: add tests for OSPFv3 NSSA/Stub
New test verification:
 * Stub and NSSA areas contain no external routes

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-04 07:23:10 -03:00
Donald Sharp
d64162ce84
Merge pull request #8210 from LabNConsulting/chopps/always-batch
northbound: KISS always batch yang config, it's faster.
2021-06-02 18:13:42 -04:00
Hiroki Shirokura
c60c1ade86 *: delete ZEBRA_FLAG_SEG6*_ROUTE and add ZAPI_NEXTHOP_FLAG_SEG6*
https://github.com/FRRouting/frr/pull/5865#discussion_r597670225

As this comment says. ZEBRA_FLAG_XXX should not have been used.
To communicate SRv6 Route Information. A simple Nexthop Flag would
have been sufficient for SRv6 information. And I fixed the whole
thing that way.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
e2a5888d7c tests: update sharpd srv6 route command
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
a2df1e4f9a sharpd: follow the practice on cli design for json output
The "show sharp segment-routing srv6" command was a
json output command, but it did not follow the common
practice of the other commands.

It follows the review and outputs the json format by
using the json keyword. Otherwise, it produces human
readable output.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
04d43dbd02 tests: fix json style on srv6_locator test
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
7c653fc53e topotests: bgp_srv6l3vpn_to_bgp_vrf (step4)
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
b83127e156 bgpd: fix prefix-sid crash bug and add topotest (step4)
This commit fix bgpd's prefix-sid type4,5 feature which has
miss implementation from https://github.com/FRRouting/frr/pull/5653
was merged. Due to some nessesary lines are not presented.

When bgpd receives multi update message with same service-sid on
prefix-sid type-5 attribute, bgpd will crash arround path-attribute's
values object reference count.

And also, this commit add a topotest to check that feature work fine.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
c5a044e055 topotests: for zapi's seg6 route configuration (step3)
This commit checks seg6 route configuration via ZAPI is
working fine.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:48 -04:00
Hiroki Shirokura
96d423f7c9 topotests: keep srv6-locator feature fine (step2)
This commit is a part of #5853 works.
This commit add new topotest to verify SRv6-manager's functionality.
Following tests are performed on this topotest.

- check that SRv6-locator is set correctly
- check that default SRv6-function locator is set correctly
- check that SRv6-function is installed as ipv6 route correctly

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:47 -04:00
Hiroki Shirokura
0adde13a58 topotests: for zapi's seg6local route configuration (step1)
This commit checks seg6local route configuration via ZAPI is
working fine.

SRv6 feature is little young feature as kernel feature so netlink
interface may be changed/updated in the future. And this ZAPI extention
is something to support new routing paradigm, so it should be checked by
topotests until srv6 feature of linux kernel will be well stable.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-06-02 10:24:47 -04:00
Christian Hopps
fd396924d6 northbound: KISS always batch yang config (file read), it's faster
The backoff code assumed that yang operations always completed quickly.
It checked for > 100 YANG modeled commands happening in under 1 second
to enable batching. If 100 yang modeled commands always take longer than
1 second batching is never enabled. This is the exact opposite of what
we want to happen since batching speeds the operations up.

Here are the results for libyang2 code without and with batching.

| action        |  1K rts |  2K rts | 1K rts | 2K rts | 20k rts |
|               | nobatch | nobatch |  batch |  batch |   batch |
| Add IPv4      |    .881 |    1.28 |   .703 |   1.04 |    8.16 |
| Add Same IPv4 |    28.7 |     113 |   .590 |   .860 |    6.09 |
| Rem 1/2 IPv4  |    .376 |    .442 |   .379 |   .435 |    1.44 |
| Add Same IPv4 |    28.7 |     113 |   .576 |   .841 |    6.02 |
| Rem All IPv4  |    17.4 |    71.8 |   .559 |   .813 |    5.57 |

(IPv6 numbers are basically the same as iPv4, a couple percent slower)

Clearly we need this. Please note the growth (1K to 2K) w/o batching is
non-linear and 100 times slower than batched.

Notes on code: The use of the new `nb_cli_apply_changes_clear_pending`
is to commit any pending changes (including the current one). This is
done when the code would not correctly handle a single diff that
included the current changes with possible following changes. For
example, a "no" command followed by a new value to replace it would be
merged into a change, and the code would not deal well with that. A good
example of this is BGP neighbor peer-group changing. The other use is
after entering a router level (e.g., "router bgp") where the follow-on
command handlers expect that router object to now exists. The code
eventually needs to be cleaned up to not fail in these cases, but that
is for future NB cleanup.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-02 14:05:26 +00:00
Rafael Zalamena
d532d1092e
Merge pull request #8644 from idryzhov/fix-vrf-bind
lib: fix binding to a vrf
2021-06-02 10:47:10 -03:00
Russ White
3d7bd27619
Merge pull request #8683 from kuldeepkash/bgp_gshut
tests: Add bgp_gshut_topo1 test suite
2021-06-01 11:43:48 -04:00
Donatas Abraitis
2cdd73387c
Merge pull request #8698 from donaldsharp/pim_black_tests
tests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py
2021-06-01 09:41:04 +03:00
Igor Ryzhov
60070c3d02 tests: remove tcp_l3mdev_accept setting
This is not necessary anymore with fixed `vrf_bind`.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-31 22:12:55 +03:00
Igor Ryzhov
36eef8586d lib: fix binding to a vrf
There are two possible use-cases for the `vrf_bind` function:
- bind socket to an interface in a vrf
- bind socket to a vrf device

For the former case, there's one problem - success is returned when the
interface is not found. In that case, the socket is left unbound without
throwing an error.

For the latter case, there are multiple possible problems:
- If the name is not set, then the socket is left unbound (zebra, vrrp).
- If the name is "default" and there's an interface with that name in the
  default VRF, then the socket is bound to that interface.
- In most daemons, if the router is configured before the VRF is actually
  created, we're trying to open and bind the socket right after the
  daemon receives a VRF registration from zebra. We may not receive the
  VRF-interface registration from zebra yet at that point. Therefore,
  `if_lookup_by_name` fails, and the socket is left unbound.

This commit fixes all the issues and updates the function description.

Suggested-by: Pat Ruddy <pat@voltanet.io>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-31 22:12:55 +03:00
Louis Scalbert
8c1d4cd512 bgpd: add show bgp summary filter by neighbor or AS
Add ability to filter session on show bgp summary by neighbor or
remote AS:

ubuntu# show bgp summary ?
  neighbor     Show only the specified neighbor session
  remote-as    Show only the specified remote AS session
ubuntu# show bgp summary neighbor ?
  A.B.C.D   Neighbor to display information about
  WORD      Neighbor on BGP configured interface
  X:X::X:X  Neighbor to display information about
ubuntu# show bgp summary remote-as ?
  (1-4294967295)  AS number
  external        External (eBGP) AS sessions
  internal        Internal (iBGP) AS sessions

This patch includes the documentation and the topotest.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-05-26 16:16:08 +02:00
Mark Stapp
2d3eb91699
Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra
Zebra OPAQUE data from other daemons stuff
2021-05-24 07:48:02 -04:00
Donatas Abraitis
99447cf226
Merge pull request #8705 from donaldsharp/ospf_sr_topo1_speedup
tests: Speedup ospf_sr_topo1 by over 100 seconds
2021-05-21 14:30:34 +03:00
Donald Sharp
2db528e384
Merge pull request #8701 from ton31337/feature/show_ip_bgp_alias
bgpd: Show BGP prefixes by community alias
2021-05-21 07:23:10 -04:00
Donatas Abraitis
a418752d47
Merge pull request #8662 from idryzhov/fix-check-linux-vrf
tests: fix bgp_l3vpn_to_bgp_vrf
2021-05-21 10:03:21 +03:00
Donald Sharp
21967e4e82
Merge pull request #8628 from idryzhov/isis-vrf-redist
isisd: fix redistribution in vrf
2021-05-20 09:00:46 -04:00
Donald Sharp
bd7fb46e5b tests: Speedup ospf_sr_topo1 by over 100 seconds
Add some basic timer operations to speed up convergence.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-19 16:01:01 -04:00
Donald Sharp
8863a71845
Merge pull request #8684 from kuldeepkash/multicast-sm-topo1
tests: Fix for multicast_pim_sm test failure
2021-05-19 14:28:48 -04:00
Donatas Abraitis
b15be1605a tests: Show BGP prefixes by community alias
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-19 18:11:39 +03:00
Donald Sharp
8a2b922c34 tests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-19 08:04:50 -04:00
nguggarigoud
bcce695415 tests : Adding 2 ospf asbr summary testcases.
Test suite execution time is ~1 minutes.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-05-17 19:52:54 -07:00
nguggarigoud
8694dd78db tests: adding ospf basic 2 testcases.
Test cases included are 1 ospf cost, 1 ospf mtu.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-05-17 19:23:15 -07:00
Kuldeep Kashyap
f0cbb887f1 tests: Fix for multicast_pim_sm failure
Test case test_verify_mroute_when_5_different_receiver_joining_same_sources_p0
is failing intermittently in master. Fixed the issue.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-05-17 18:52:55 -07:00
Kuldeep Kashyap
ba00df52eb tests: Add bgp_gshut_topo1 suite
1. Automated test cases to verify BGP Graceful Shutdown community functionality,
   with 2 different topologies.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-05-17 17:49:10 -07:00
Igor Ryzhov
d769bde5be tests: fix missing gitignore entry
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-17 13:01:55 +03:00
Donatas Abraitis
1ebc214ea6 tests: Check if opaque data from BGP is accessable in Zebra
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-14 22:12:33 +03:00
Igor Ryzhov
5cfffcdd8d isisd: fix dangling instances
We only need an instance when we have at least one area configured in a
VRF. Currently we have the following issues:
- instance for the default VRF is always created
- instance is not removed after the last area config is removed

This commit fixes both issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-14 17:12:38 +03:00
Igor Ryzhov
8c6482db8c isisd: fix redistribution in vrf
When the redistribution is configured in non-default VRF, isisd should
redistribute routes from this VRF instead of default.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-14 17:12:35 +03:00
Russ White
a63273a5b4
Merge pull request #8556 from donaldsharp/bgp_pbr_weird
Bgp flowspec cleanups
2021-05-13 23:14:34 -04:00
Martin Winter
d8baf3db2d
Merge pull request #8144 from LabNConsulting/chopps/ly2
libyang2
2021-05-14 01:12:06 +02:00
Christian Hopps
3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Donald Sharp
16a8eb4d00
Merge pull request #8649 from ton31337/fix/unify-naming-for-topotests-directory
tests: Rename tests/topotests directories to be consistent
2021-05-13 07:26:15 -04:00
Igor Ryzhov
440daf95fd tests: fix bgp_l3vpn_to_bgp_vrf
Too many arguments for format string.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-12 18:55:40 +03:00
Donald Sharp
21ef301cad tests: Add pytestmark to the flowspec topotest
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-12 07:33:08 -04:00
Donald Sharp
b8bd26ad12 tests: Fix pylint issues in test_bgp_recursive_route_ebgp_multi_hop.py
Tests had format for strings with 2 variables but 1 place to put the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-12 07:30:47 -04:00
Olivier Dugeon
31db7fc227
Merge pull request #8509 from volta-networks/pathd_ls_client
pathd: Traffic Engineering Database support
2021-05-12 09:42:56 +02:00
Donatas Abraitis
93a3eae793 tests: Skip example_topojson_test and example_test from being tested
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-12 09:00:30 +03:00
Donatas Abraitis
764b81858f tests: Unify directory naming for topotests
Change every `-` to `_` in directory names. This is to avoid mixing _ and -.

Just for consistency and directory sorting properly.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-11 14:14:26 +03:00
Javier Garcia
f008db919d pathd. TED support . Topotest - [part 3/4]
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-10 15:25:13 +02:00
David Lamparter
3b20069fd6
Merge pull request #8648 from idryzhov/fix-test-assert
tests: fix build warning
2021-05-10 12:52:21 +02:00
David Lamparter
83f5d2581a
Merge pull request #8441 from mjstapp/fix_topo_pylint1 2021-05-09 19:48:33 +02:00
David Lamparter
2ab691e6c0
Merge pull request #8626 from idryzhov/fix-isis-topo1
tests: fix isis-topo1 topologies
2021-05-09 19:46:01 +02:00
David Lamparter
de10458d6e
Merge pull request #8380 from mjstapp/nexthop_cmp_basic 2021-05-09 19:29:45 +02:00
David Lamparter
b4a0d49a68
Merge pull request #8640 from pjdruddy/fix-bgp-auth-key-error
tests: fix intermittent key error in bgp-auth topotest
2021-05-09 19:22:55 +02:00
Igor Ryzhov
f3d2d1e0be tests: fix build warning
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-09 18:23:43 +03:00
Quentin Young
556beacf10 bgpd: rework BGP_MAX_PACKET_SIZE & friends
BGP_MAX_PACKET_SIZE no longer represented the absolute maximum BGP
packet size as it did before, instead it was defined as 4096 bytes,
which is the maximum unless extended message capability is negotiated,
in which case the maximum goes to 65k.

That introduced at least one bug - last_reset_cause was undersized for
extended messages, and when sending an extended message > 4096 bytes
back to a peer as part of NOTIFY data would trigger a bounds check
assert.

This patch redefines the macro to restore its previous meaning,
introduces a new macro - BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE - to
represent the 4096 byte size, and renames the extended size to
BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE for consistency. Code locations
that definitely should use the small size have been updated, locations
that semantically always need whatever the max is, no matter what that
is, use BGP_MAX_PACKET_SIZE.

BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE should only be used as a constant
when storing what the negotiated max size is for use at runtime and to
define BGP_MAX_PACKET_SIZE. Unless there is a future standard that
introduces a third valid size it should not be used for any other
purpose.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-05-06 11:54:02 -04:00
Pat Ruddy
650e0d1bb8 tests: fix intermittent key error in bgp-auth topotest
There is a rare case where with prefix peers the peer is
completely absent from the json output when checking the
peer state resulting in a python key error. Check key exists
before checking the state.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-05-06 14:36:52 +01:00
Rafael Zalamena
4478793c43
Merge pull request #8636 from idryzhov/ospfv3-vrf-support
OSPFv3 VRF support
2021-05-06 08:50:32 -03:00
Donald Sharp
dd82f72543
Merge pull request #8497 from ton31337/feature/bgp_community_alias
bgpd: Create BGP alias names for community/large-community
2021-05-06 06:07:07 -04:00
harios_niral
0681195e86 tests: add topotest for ospf6d vrf support
Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
2021-05-06 10:54:31 +03:00
Donald Sharp
c41e4b45e7
Merge pull request #8598 from idryzhov/fix-topotest-bgp-auth
tests: fix bgp-auth topotest
2021-05-05 11:17:37 -04:00
Donatas Abraitis
b820f3d0a3 tests: Check if bgp community alias NAME ALIAS commands works
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-05 16:37:01 +03:00
Donatas Abraitis
48c2039199
Merge pull request #8564 from rameshabhinay/bgp_tcp_mss
bgpd: Support tcp-mss for bgp neighbors
2021-05-05 13:45:39 +03:00
Igor Ryzhov
3adfae9613 tests: fix isis-topo1 topologies
parse_topology function doesn't correctly process vertex types with
spaces. Therefore the reference topology files are completely messed up,
we have values in incorrect fields - types in metrics, metrics in
parents, etc.

This commit fixes the parsing function and the reference files.

The same fix was done for isis-topo1-vrf in #8365.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-05 12:26:38 +03:00
Mark Stapp
403e26cd03 tests: add unit test for nexthop comparisons
Add a nexthop unit test module, just exercising the 'basic'
comparison api for now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-04 15:51:01 -04:00
Abhinay Ramesh
4ab467017e bgpd: Support tcp-mss for bgp neighbors
Problem Statement:
=================
In scale setup BGP sessions start flapping.

RCA:
====
In virtualized environment there are multiple places where
MTU need to be set. If there are some places were MTU is not set
properly then there is chances that BGP packets get fragmented,
in scale setup this will lead to BGP session flap.

Fix:
====
A new tcp option is provided as part of this implementation,
which can be configured per neighbor and helps to set the TCP
max segment size. User need to derive the path MTU between the BGP
neighbors and set that value as part of tcp-mss setting.

1. CLI Configuration:
	[no] neighbor <A.B.C.D|X:X::X:X|WORD> tcp-mss (1-65535)

2. Running config
    frr# show running-config
    router bgp 100
     neighbor 198.51.100.2 tcp-mss 150       => new entry
     neighbor 2001:DB8::2 tcp-mss 400        => new entry

3. Show command
    frr# show bgp neighbors 198.51.100.2
    BGP neighbor is 198.51.100.2, remote AS 100, local AS 100, internal link
    Hostname: frr
      Configured tcp-mss is 150, synced tcp-mss is 138     => new display

4. Show command json output

    frr# show bgp neighbors 2001:DB8::2 json
    {
      "2001:DB8::2":{
        "remoteAs":100,
        "bgpTimerKeepAliveIntervalMsecs":60000,
        "bgpTcpMssConfigured":400,                               => new entry
        "bgpTcpMssSynced":388,                                  => new entry

Risk:
=====
Low - This is a config driven feature and it sets the max segment
size for the TCP session between BGP peers.

Tests Executed:
===============
Have done manual testing with three router topology.
1. Executed basic config and un config scenarios
2. Verified if the config is updated in running config
   during config and no config operation
3. Verified the show command output in both CLI format and
   JSON format.
4. Verified if TCP SYN messages carry the max segment size
   in their initial packets.
5. Verified the behaviour during clear bgp session.
6. done packet capture to see if the new segment size
   takes effect.

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2021-05-04 06:21:24 +00:00
David Lamparter
62cd66d90b tests: add scapy to topotests Docker
Not having scapy in the docker image leads to very obtuse failures in
the pim bsm tests (obtuse, as in, it just fails without any hint as to
why...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03 20:56:55 +02:00
David Lamparter
507e0e5d66 lib: add *_swap_all to typesafe containers
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03 20:55:04 +02:00
Mark Stapp
f71e1ff6a9
Merge pull request #8545 from opensourcerouting/assert-our-own
*: make our own assert() actually work
2021-05-03 11:17:36 -04:00
David Lamparter
8dff30f801 tests: fix assert.h header change fallout
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-02 16:27:17 +02:00
David Lamparter
64dd77361f lib: rework how we "override" assert()
The previous method, using zassert.h and hoping nothing includes
assert.h (which, on glibc at least, just does "#undef assert" and puts
its own definition in...) was fragile - and actually broke undetected.

Just provide our own assert.h and control overriding by putting it in a
separate directory to add to the include path (or not.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-02 16:27:17 +02:00
Igor Ryzhov
b32454e10c tests: fix bgp-auth topotest
Individual tests must not depend on each other. In particular, a test
can't be sure that the previous test config is applied or cleared.
It is definitely not true when a single test is executed, for example:
`test_bgp_auth.py::test_prefix_peer_remove_passwords`.

This commit makes all tests independent of each other. It also adds a
call to check_all_peers_established at the start of "remove_passwords"
tests to make sure that we not only block new peers with an incorrect
password, but also clean the existing peers.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-01 01:31:26 +03:00
Rafael Zalamena
058d0236b6
Merge pull request #8588 from idryzhov/a-lot-of-isis-fixes
a lot of isis fixes
2021-04-30 07:58:19 -03:00
Igor Ryzhov
ec62fbaa07 isisd: fix ldp-sync configuration
YANG model and CLI commands allow user to configure LDP-sync per area.
But the actual implementation is incorrect - all commands are changing
the config for the whole VRF instead of a single area. This commit fixes
this issue by actually implementing per area configuration.

Fixes #8578.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov
bcf2208156 isisd: allow arbitrary order of area/interface configuration
Currently we don't allow to configure the interface before the area is
configured. This approach has the following issues:

1. The area config can be deleted even when we have an interface config
   relying on it. The code is not ready for that - we'll have a whole
   bunch of stale pointers if user does that.
2. The code doesn't correctly process the event of changing the VRF for
   an interface. There is no mechanism to ensure that the area exists
   in the new VRF so currently the circuit still stays in the old VRF.

This commit allows an arbitrary order of area/interface configuration.
There is no more need to configure the area before configuring the
interface.

This change fixes both the issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
rgirada
2fbb8f4543 ospfd: show ip ospf interface only shows BDR info, Added DR info.
Description:
	DR information is missing under "show ip ospf interface [json]".
	Added DR infomation to display in "show ip ospf interface".

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-04-29 04:20:14 -07:00
Quentin Young
e70620f6a6
Merge pull request #8546 from ton31337/fix/add_markers_for_recent_bgpd 2021-04-28 19:51:28 +00:00
Jafar Al-Gharaibeh
fa4154ef8b
Merge pull request #8322 from qlyoung/topotests
Assorted topotests cleanup
2021-04-28 10:40:25 -05:00
Igor Ryzhov
8d3dab20b5 tests: fix topotest polling log
The current log prints maximum wait time which is not actually correct,
because it doesn't include the command execution time. We usually have
"failed after X seconds" log with X being far longer than this maximum.

Let's print the maximum number of tries instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-28 02:52:58 +03:00
Donatas Abraitis
ad889e0d17 tests: Add pytest bgpd markers for recent BGP tests
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-27 09:23:58 +03:00
Rafael Zalamena
ae08637827
Merge pull request #8540 from donaldsharp/kill_them_all
tests: Remove kill_mininet_router_process
2021-04-26 11:52:38 +00:00
Rafael Zalamena
cd66038b98
Merge pull request #8555 from idryzhov/fix-bfd-test
tests: fix bfd-bgp-cbit-topo3 test
2021-04-26 11:49:00 +00:00
Igor Ryzhov
f49bdb86eb tests: fix bfd-bgp-cbit-topo3 test
This test is completely incorrect on test_bfd_loss_intermediate step.
It shuts down the interface and then "waiting" for the BGP session to
fail. But instead of the actual wait it compares the output of "show bfd
peers" with the "up" state. As it does this comparison right after the
interface shutdown, the BFD session has not yet failed and the comparison
is always successful except very rare cases when the command takes a lot
of time to execute (due to the heavy load on CI system I suppose).

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-24 01:33:32 +03:00
Igor Ryzhov
2ccc493333
Merge pull request #8495 from opensourcerouting/ospfv3-bfd-rework
ospf6d: rework BFD integration and add BFD profiles support
2021-04-24 00:47:31 +03:00
Rafael Zalamena
d5f9847a9e topotests: test PIM BFD profile integration
Test that PIM BFD profile integration works.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23 09:29:00 -03:00
Rafael Zalamena
0d00ac9cb5 topotests: add new basic PIM topology test
Test for PIM (re)convergence and BFD usage.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23 09:29:00 -03:00
David Lamparter
6a0eb6885b *: drop zassert.h
It's not actually working properly...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-23 12:06:35 +02:00
Donald Sharp
ec8f360f2d tests: Remove kill_mininet_router_process
This function kills all processes that happen to have the same
name to frr processes and it was only ever used in the setup.
Setup should not be used to kill old runs.  That should be a
separate process.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-22 15:47:37 -04:00
Rafael Zalamena
7fcb9ef4cc topotests: test OSPFv3 BFD profiles
See if the BFD sessions created by OSPFv3 are using the configured BFD profiles.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-22 16:10:04 -03:00
Rafael Zalamena
4a9e802c3c topotests: converge OSPFv3 faster
Tweak OSPFv3 interface configuration to converge faster.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-22 16:10:04 -03:00
David Lamparter
0c4285d77e build: properly split CFLAGS from AC_CFLAGS
`CFLAGS` is a "user variable", not intended to be controlled by
configure itself.  Let's put all the "important" stuff in AC_CFLAGS and
only leave debug/optimization controls in CFLAGS.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:36 +02:00
Martin Winter
6e0368f61a
Merge pull request #8434 from donaldsharp/python_bullshit
Python pylint stuff
2021-04-16 23:17:04 +02:00
Martin Winter
0575d5a8f8
Merge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep
tests: Do not sleep(5) when verifying bgp communities
2021-04-15 14:03:37 +02:00
Donald Sharp
afbb000e26 tests: test_bgp_vrf_dynamic_route_leak_topo1.py was missing a variable
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-15 07:17:10 -04:00
Donald Sharp
6882ab5e7f tests: Fix test_bgp_multi_vrf_topo2.py string formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-15 07:17:10 -04:00
Donald Sharp
0b711f0a20 tests: test_bgp_multi_vrf_topo1.py fix formatting issues pointed out by pylint
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-15 07:17:10 -04:00
Donald Sharp
f4baa8fe25 tests: Remove unnecessary formating for strings
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-15 07:17:10 -04:00
Donald Sharp
d9df892180 tests: Remove duplicate functions in python code
We have basically two identical functions in test_bgp_gr_functionality_topo1.py
Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-15 07:17:06 -04:00
Sri Mohana Singamsetty
e64a538c70
Merge pull request #8448 from ton31337/feature/show_rpki_state_in_global_show_bgp
bgpd: Show RPKI short state in `show bgp <afi> <safi>`
2021-04-13 17:32:37 -07:00
Mark Stapp
d7265db9b3 tests: run black over mcast-pim-static, static_routing_with_[ei]bgp
Run black and clean up formatting along with pylint cleanup.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-04-13 13:34:57 -04:00
Mark Stapp
ec3ed7234d tests: fix pylint errors in static_routing_with_ibgp
Fix pylint errors.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-04-13 11:45:55 -04:00
Mark Stapp
aa59a7090a tests: fix pylint errors in static_routing_with_ebgp tests
Fix pylint errors; also enable the test in 'topo4', which has never
run.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-04-13 11:45:55 -04:00
Mark Stapp
914faab594 tests: fix pylint errors in mcast-pim-static-rp-topo1
Fix pylint errors.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-04-13 11:45:55 -04:00
Mark Stapp
f3dbd9d3ef
Merge pull request #8145 from pguibert6WIND/nhrp_use_zebra
nhrp: use zebra
2021-04-13 08:02:56 -04:00
Donatas Abraitis
d89b48fe28 tests: Add BGP RPKI show header to outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-12 10:34:52 +03:00
Philippe Guibert
e63801cd5f topotests: add standard nhrp test between spoke and hub
This test establishes a binding between nbma ip of a spoke and its
protocol address. This information is pushed to hub.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-04-09 18:29:58 +02:00
Donald Sharp
9e7fd5ecbd tests: Do not sleep(5) when verifying bgp communities
There are better ways of ensuring that the remote side
has your change instead of sleeping

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 12:02:18 -04:00
Donald Sharp
0b25370e95 tests: More black fixups
Just another round of fixups found by running black on the code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 08:35:05 -04:00
Donald Sharp
98ca91e181 tests: Add some more pytest marks for bgpd
Just another round of trying to add pytest.mark.bgpd.  Not finished yet just
what I could stand doing for a few minutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 08:34:45 -04:00
Donatas Abraitis
6740a191ad Revert "bgpd: BGP session not established for ipv6 link local address with vrf config"
This reverts commit 0b6d35324e.
2021-04-09 10:14:32 +03:00
Patrick Ruddy
fb94a2e65d
Merge pull request #8402 from opensourcerouting/debian10-topotest-fix
tests: fix for l3mdev topotests on kernel 4.19
2021-04-08 14:54:54 +01:00
Donatas Abraitis
9d78be6aac
Merge pull request #7434 from sudhanshukumar22/bgp-link-local-address
bgpd: BGP session not established for ipv6 link local address with vrf config
2021-04-08 09:26:55 +03:00
Mark Stapp
a702694a60
Merge pull request #8365 from aldobrrrr/fix_parse_topology_function_in_isis_topo1_vrf_test
topotests: fix 'parse_topology' function in test_isis_topo1_vrf.py
2021-04-07 15:01:12 -04:00
Quentin Young
660c59ed6f tests: fix use of undefined variable in pim lib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Quentin Young
5aab262b74 tests: fix improper format strings in pim lib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Quentin Young
8ab4625666 tests: remove duplicate pim test function
Twice defined

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Quentin Young
c287dfd25c tests: provide sane default for --topology-only
Fixes:

/usr/lib/python3.9/site-packages/_pytest/config/__init__.py:1463: in getoption
    val = getattr(self.option, name)
E   AttributeError: 'Namespace' object has no attribute 'topology_only'

The above exception was the direct cause of the following exception:
/usr/lib/python3.9/site-packages/pluggy/manager.py:127: in register
    hook._maybe_apply_history(hookimpl)
/usr/lib/python3.9/site-packages/pluggy/hooks.py:333: in _maybe_apply_history
    res = self._hookexec(self, [method], kwargs)
/usr/lib/python3.9/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.9/site-packages/pluggy/manager.py:84: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
tests/topotests/conftest.py:62: in pytest_configure
    if config.getoption("--topology-only"):
/usr/lib/python3.9/site-packages/_pytest/config/__init__.py:1474: in getoption
    raise ValueError(f"no option named {name!r}") from e
E   ValueError: no option named 'topology_only'

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Russ White
63caaeb2c1
Merge pull request #8407 from ton31337/fix/nexthop_should_not_be_changed_if_peer_shares_common_subnet
tests: Nexthop should not be changed if peer X shares a common subnet
2021-04-06 11:02:19 -04:00
Mark Stapp
1832ff8b49
Merge pull request #8295 from opensourcerouting/ospf6-topo-stabilize
topotest: stabilize OSPFv3 topology
2021-04-06 09:48:45 -04:00
Donatas Abraitis
b1367d6859 tests: Nexthop should not be changed if peer X shares a common subnet
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-06 10:32:02 +03:00
David Schweizer
6a93e3df4e
tests: fix python3 backported iproute2 vrf check
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:55 +02:00
David Schweizer
b04af734aa
tests: fix l3mdev config in isis-topo1-vrf topotest
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:54 +02:00
David Schweizer
b7589f4e5c
tests: fix l3mdev config in bgp_vrf_lite_ipv6_rtadv topotest
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:53 +02:00
David Schweizer
f2d729056e
tests: fix l3mdev config in bgp_l3vpn_to_bgp_vrf topotest
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:52 +02:00
David Schweizer
a94d054dfd
tests: fix l3mdev config in bgp_evpn_rt5 topotest
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:51 +02:00
David Schweizer
3d762f26a6
tests: add l3mdev config helpers for VRF topotests
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:50 +02:00
Kuldeep Kashyap
2268cf50d5 tests: Fix for BGP_GR test failures
Few tests were failing in BGP-GR intermittently. Fixing the failures.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-04-05 00:15:40 -07:00
sudhanshukumar22
0b6d35324e bgpd: BGP session not established for ipv6 link local address with vrf config
Description:
BGP session not established for ipv6 link local address with vrf config

Problem Description/Summary :
BGP session not established for ipv6 link local address with vrf configyy
1.Configure ipv6 link-local address fe80::1234/64 on dut1 and fe80::4567/64 on dut2
2.Configure BGP neighbors for ipv6 link-local on both dut1 and dut2
3.Verify BGP session is UP over link-local ipv6 address
4.Observed that bgp session not established for ipv6 link local address

Expected Behavior :
BGP session should be established for ipv6 link local address with vrf config

Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
2021-04-01 02:43:51 -07:00
Mark Stapp
e2efe13327
Merge pull request #8350 from opensourcerouting/printfrr-revamp
lib: `printfrr()` care package
2021-03-31 09:10:30 -04:00
David Lamparter
7798203f5c lib: add %pSQ and %pSE string escape formats
These are for string quoting (`%pSQ`) and string escaping (`%pSE`); the
sets / escape methods are currently rather "basic" and might be extended
in the future.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-30 22:34:56 +02:00
David Lamparter
a4cb97a6c1 lib: add %*pHX + %*pHS hexdump in printfrr
(I'll get to `zlog_hexdump()` in a separate pass.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-30 22:34:51 +02:00
David Lamparter
9c4380daee lib: add %pVA recursive printfrr
Analogous to Linux kernel `%pV` (but our mechanism expects 2 specifier
chars and `%pVA` is clearer anyway.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-30 22:32:59 +02:00
David Lamparter
cb4928ce77 lib: add FMT_NSTD() for non-standard printf exts
... to suppress the warnings when using something that isn't quite ISO C
compatible and would otherwise cause compiler warnings from `-Wformat`.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-30 22:32:59 +02:00
Russ White
1bed7a6fef
Merge pull request #8057 from ranjanyash54/default-route
ospf6d: Default Route functionality
2021-03-30 10:34:05 -04:00
Russ White
a2d351d19e
Merge pull request #8137 from Orange-OpenSource/ospf_ls
ospfd: Add Link State support
2021-03-30 10:28:37 -04:00
Russ White
40bf85a391
Merge pull request #8056 from jmmikkel/peertype
bgpd: Add "bgp bestpath peer-type multipath-relax"
2021-03-30 10:26:57 -04:00
Emanuele Altomare
dbceeaa502 topotests: fix 'parse_topology' function in test_isis_topo1_vrf.py
Now the parse_topology function handles well the vertex type identifier.

Signed-off-by: Emanuele Altomare <emanuele@common-net.org>
2021-03-29 17:41:16 +02:00
Rafael Zalamena
bcddbefe04 topotests: add tests for OSPFv3 default route
Three new tests:

 - OSPFv3 convergence using 'ipv6 ospf6 neighbor json'
 - Default route functionality:
   * Check that the LSA is present
   * Check that the route was installed

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-29 06:37:10 -07:00
David Lamparter
487eefcfbe lib: record output positions in printfrr
This replaces `%n` with a safe, out-of-band option that simply records
the start and end offset of the output produced for each `%...`
specifier.

The old `%n` code is removed.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-27 17:01:29 +01:00
David Lamparter
212e04e5a7 lib: rework printfrr extensions to output directly
Allowing printfrr extensions to directly write to the output buffer has
a few advantages:
- there is no arbitrary length limit imposed (previously 64)
- the output doesn't need to be copied another time
- the extension can directly use bprintfrr() to put together pieces

The downside is that the theoretical length (regardless of available
buffer space) must be computed correctly.

Extended unit tests to test these paths a bit more thoroughly.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-27 16:56:55 +01:00
David Lamparter
9a5d359ce8
Merge pull request #8317 from mjstapp/fix_short_printfrr_buf 2021-03-26 19:40:21 +01:00
Donald Sharp
ecf9b1bb50
Merge pull request #8167 from LabNConsulting/chopps/tests-add-gdb
tests: add option for auto-launching gdb
2021-03-25 10:27:50 -04:00
ckishimo
4436ba8d46 ospfd: add topotest for suppress-fa feature
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-24 16:00:35 +01:00
Igor Ryzhov
09e2d8ed97
Merge pull request #8203 from opensourcerouting/ospf-bfd-napi
ospfd,doc,topotests: rework OSPFv2 BFD integrantion
2021-03-24 10:36:48 +03:00
Mark Stapp
f62fd2ac9f tests: use printfrr to use extended format specs
Test was using 'pFX' with printf() - need to use printfrr().

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-23 14:50:14 -04:00
Joanne Mikkelson
1a9cb083b7 bgpd: Allow next hop recursion in zebra if any multipath is not eBGP
When "bgp bestpath peer-type multipath-relax" is enabled, multipaths
with both eBGP and iBGP learned routes may exist. It is not desirable
for the iBGP next hops to be discarded from the FIB because they are not
directly connected. When publishing a nexthop group to zebra, the
ZEBRA_FLAG_ALLOW_RECURSION flag is normally not set when the best path
is eBGP; when "bgp bestpath aspath multipath-relax" is configured, the
flag will now be set if any paths are from iBGP peers. This leaves
all-eBGP multipaths still requiring nexthops over connected routes.

Signed-off-by: Joanne Mikkelson <jmmikkel@arista.com>
2021-03-23 08:59:33 -07:00
Joanne Mikkelson
ee88563ac2 bgpd: Add "bgp bestpath peer-type multipath-relax"
This new BGP configuration is akin to "bgp bestpath aspath
multipath-relax". When applied, paths learned from different peer types
will be eligible to be considered for multipath (ECMP). Paths from all
of eBGP, iBGP, and confederation peers may be included in multipaths
if they are otherwise equal cost.

This change preserves the existing bestpath behavior of step 10's result
being returned, not the result from steps 8 and 9, in the case where
both 8+9 and 10 determine a winner.

Signed-off-by: Joanne Mikkelson <jmmikkel@arista.com>
2021-03-23 08:59:33 -07:00
Russ White
638fa8dd4e
Merge pull request #8253 from opensourcerouting/topotest-python3-backports
tests: iproute2 VRF capability check for topotests
2021-03-23 11:25:35 -04:00
Olivier Dugeon
927b08024e topotest: Add new OSPF TE topotest
This new test launches a small network composed by 4 OSPF routers with
Traffic Engineering and Segment Routing configuration. To assess the Link
State Traffic Engineering feature, the TED of each router is compared
against the reference TED which corresponds to the network topology.
Then a series of 6 steps, where Link, TE & SR configurations are modified
up to r4 shutwdown, are used to verify that the TED is correctly updated
on the 4 routers.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-03-23 15:39:29 +01:00
Russ White
38981e4bba
Merge pull request #8120 from ton31337/feature/bgp_ipv6_default_activated
bgpd: Activate ipv6-unicast for peer automatically if globally defined
2021-03-23 09:36:43 -04:00
Rafael Zalamena
8d69272b8f topotests: test OSPF BFD profile
Use BFD profiles in test to make sure it doesn't break.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23 10:18:42 -03:00
Rafael Zalamena
c98581cdc8 topotests: improve OSPF(v2|v3) convergence test
Wait until all routers are actually `Full` instead of just looking at routes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23 10:13:19 -03:00
Rafael Zalamena
639b03ca24 topotests: remove old configuration files
We version the tests with FRR so it is no longer necessary to support
old versions.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23 10:12:40 -03:00
Rafael Zalamena
25329da182 topotest: stabilize OSPFv3 topology
Changes:
- Decrease hello interval to avoid packet loss slow downs
- Decrease dead interval to converge faster
- Remove previous 'Full' state check that wasn't checking for all
  peers (only one per router)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23 09:48:16 -03:00
Donald Sharp
cb39b2d4aa
Merge pull request #8280 from kuldeepkash/bgp_convergence_test
tests: Fix bgp convergence issue mentioned in #8279
2021-03-22 10:15:36 -04:00
Donatas Abraitis
37916b2b11
Merge pull request #8121 from opensourcerouting/macro-cleanup
*: require ISO C11 + semicolons after file-scope macros
2021-03-22 11:00:34 +02:00
Donald Sharp
6dfe243c38
Merge pull request #8278 from ckishimo/ospfv3_iface
ospf6d: fix iface commands lost when removing from area
2021-03-20 20:11:16 -04:00
Christian Hopps
3f950192fe tests: add options for debugging topotest failures
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-03-19 12:45:37 -04:00
Donald Sharp
e43ba29689
Merge pull request #8263 from opensourcerouting/docker-update
tests: docker fixes & improvements
2021-03-18 13:59:30 -04:00
Kuldeep Kashyap
53402dbf1e tests: Fix bgp convergence issue mentioned in #8279
1. Enhance verify_bgp_convergence() to solve issue mentioned in #8279

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-17 17:43:57 -07:00
Donald Sharp
28bada3d8f
Merge pull request #8255 from pjdruddy/fix-ifindex-test
Fix ifindex test
2021-03-17 09:10:20 -04:00
David Lamparter
53abc26569 tests: simplify docker rsync & support worktrees
The previous, more complex mechanism failed to take into account that
git worktrees only have a stub .git file & copying the worktree itself
is not enough.  Just extract a file list beforehand & don't bother with
git inside the container.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 13:42:20 +01:00
David Lamparter
071f5c1664 tests: add libelf-dev to Dockerfile
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 13:42:20 +01:00
Rafael Zalamena
57e627628d
Merge pull request #8229 from idryzhov/bfdd-echo-rx-tx
bfdd: separate echo rx/tx timers
2021-03-17 10:41:33 +00:00
ckishimo
d205f01e1d tests: fix too many arguments for logging
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-17 09:35:47 +01:00
David Lamparter
80413c2073 *: require semicolon after FRR_DAEMON_INFO & co.
... again ...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
David Lamparter
960b9a5383 *: require semicolon after DEFINE_<typesafe...>
Again, see previous commits.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
David Lamparter
bf8d3d6aca *: require semicolon after DEFINE_MTYPE & co
Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet.  Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition.  And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...

With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.

Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:17 +01:00
ckishimo
9b1bb522e0 tests: fix warning when checking ospfv3 convergence
The following error is shown when running the OSPFv3 tests

2021-03-16 23:37:44,792 INFO: Function returned global name 'data_rid' is not defined
2021-03-16 23:37:44,792 INFO: Retry [#1] after sleeping for 2s
2021-03-16 23:37:46,794 INFO: Verifying OSPF6 neighborship on router r1:
2021-03-16 23:37:46,993 INFO: Output for command [ show ipv6 ospf6 neighbor ] on router r1:
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:03     Full/PointToPoint    00:00:01 r1-r2-eth0[PointToPoint]

Fix the "data_rid" warning by using the correct variable

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-17 00:19:54 +01:00
Igor Ryzhov
4df3e31c3d bfdd: separate echo rx/tx timers
Currently there is a single interval for both RX and TX echo functions.
This commit introduces separate RX and TX timers for echo packets.

The main advantage is to be able to set the receive interval to zero
when we don't want to receive echo packets from the remote system.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-16 22:14:57 +03:00
Pat Ruddy
a1997ea033 tests: re-enable RTE tests after removing fixed ifindices
Change ifindex test to grab the correct indices using the API
provided.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-03-16 15:29:20 +00:00
Pat Ruddy
2bf118962f tests: fix formatting error to make black clean
Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-03-16 15:29:19 +00:00
Karen Schoener
eb44a85454 tests: update LDP SNMP topotest to walk mib objects that are statistics
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-16 10:23:34 -04:00
lynne
83543d89ae test: fix isis-snmp test
Remove ifindex values being tested because it can change
between runs of the test.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-16 08:00:41 -04:00
David Schweizer
83d2076e4f tests: add. iproute2 VRF capability check example
Additional example usage of iproute2_is_vrf_capable check in
isis-topo1-vrf topotest.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-03-16 09:34:21 +01:00
David Schweizer
ddbc1ad2a0 tests: iproute2 VRF capability check examples
Example usage of iproute2_is_vrf_capable check in bgp_multi_vrf_topo1
and bgp_multi_vrf_topo2 topotests.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-03-15 12:49:59 +01:00
David Schweizer
0414a76446 tests: check for iproute2 VRF capability
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-03-15 12:48:38 +01:00
Renato Westphal
bfa46e3bdd
Merge pull request #8147 from volta-networks/feat_ldp_snmp_without_stats
ldpd: Add support for read-only snmp mib objects (excluding statistics)
2021-03-14 22:25:00 -03:00
Renato Westphal
e1908ceb42
Merge pull request #7945 from volta-networks/feat_isis_snmp
isisd: add support for read-only snmp mibs objects
2021-03-14 22:14:27 -03:00
Rafael Zalamena
5b2906f4b4 topotests: temporary disable test assert
The test has been failing often recently and it is causing some false
positives for unrelated PRs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-14 10:15:20 -03:00
Rafael Zalamena
296951b598 topotests: remove some interface index check
Don't expect the interface index to be always the same.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-12 17:33:23 -03:00
Rafael Zalamena
0085000b9e topotests: remove some FRR version checks
We version the tests with the source code so we should no longer attempt
to support old versions in development branch.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-12 17:32:12 -03:00
GalaxyGorilla
17128dea27 tests: Replace ospf-sr-topo1 by ospf-sr-topo2
The new ospf-sr-topo2 tests are much broader and detailed,
hence it makes no sense to keep the old ospf-sr-topo1
tests.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-03-10 10:37:58 +00:00
GalaxyGorilla
9dd6fc9ded tests: OSPF SR topotests (ospf-sr-topo2)
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-03-10 10:14:38 +00:00
Russ White
7c7e4db935
Merge pull request #8123 from gromit1811/fix_topotest_ipv6_linklocal
tests: Fix determination of IPv6 link-local addresses
2021-03-09 11:25:10 -05:00
David Lamparter
6adedc6fe3
Merge pull request #8176 from LabNConsulting/chopps/fix-locale-fail
tests: Sort expected and actual to avoid locale issues
2021-03-09 12:34:38 +01:00
Donatas Abraitis
f79d311b3e
Merge pull request #8180 from kuldeepkash/topojson_framework
tests: Improve error/assert message logging
2021-03-08 09:32:09 +02:00
Donatas Abraitis
7b94dd35dd
Merge pull request #8195 from qlyoung/fix-community-type-command
tests: fix community-list invalid command
2021-03-07 17:04:57 +02:00
Kuldeep Kashyap
5cbb02ebde tests: Improve error/assert message logging
1. Improved error meesage logging.
2. No functionality changes only put some meaningfull error messages.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-06 00:51:43 -08:00
Donald Sharp
122a7974dd
Merge pull request #8196 from ton31337/feature/rfc8654_bgpd
bgpd: Add BGP Extended message support
2021-03-05 07:18:42 -05:00
Rafael Zalamena
ee56932473
Merge pull request #8165 from wesleycoakley/misc-qol-fixups
staticd, pimd, tests: small fixups and cov fix
2021-03-05 11:22:47 +00:00
Christian Hopps
00756aa345 tests: Sort expected and actual to avoid locale issues
Avoid undocumented topotest dependency on installing en_US locale.
With this change dependency is removed.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-03-04 12:33:26 -05:00
Quentin Young
bb4bcaad9a
Merge pull request #8190 from gromit1811/fix_topotest_pylint
tests: Fix topotest.py pylint errors
2021-03-03 15:43:38 -05:00
Donatas Abraitis
8b6ff0de56 tests: Use BGP Extended Message length
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-03 22:21:08 +02:00
Rafael Zalamena
fecbc5d2e7
Merge pull request #8189 from idryzhov/topotest-mkdir
tests: don't complain when /tmp/topotests exists
2021-03-03 19:30:11 +00:00
Quentin Young
60e7da0cff tests: fix community-list invalid command
Didn't test this but it's already randomly broken so cant be worse

Hopefully fixes:

raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp
large-community-list standard Test1 permit

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-03-03 13:56:39 -05:00
Martin Buck
67c3bf97c3 tests: Fix topotest.py pylint errors
Fix 2 string formatting errors (cosmetic only - remove unused string
formatting arguments). Also fix obvious typos in empty class FreeBSDRouter
implementation.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2021-03-03 16:19:59 +01:00
Igor Ryzhov
f60e5fd3d1
Merge pull request #8183 from kuldeepkash/multicast_pim_bsm
tests: Fix for test failure in PR #8158
2021-03-03 18:05:41 +03:00
Igor Ryzhov
cac0ed050e tests: don't complain when /tmp/topotests exists
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 14:22:15 +03:00
Wesley Coakley
23f3a92e34
tests: address coverity / styling issues in topotests
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 20:44:15 -05:00
Mark Stapp
0c449b017b tests: make the topogen object available when starting daemons
Pass the topogen 'tgen' object into the startRouterDaemons()
method. it can be used to start a debug cli immediately after
starting a daemon, and that can be handy.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-02 13:59:35 -05:00
Donald Sharp
17d1e8a386 tests: Don't generate support bundles when we get the results we want
We are generating support bundles for tests being run that
are passing.  Tell the system...

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-02 13:41:50 -05:00
Donald Sharp
9dfe1acd2a tests: Remove sleep(60) and look for convergence
Sleeping when convergence is not guaranteed in 60 seconds
and then testing the rib to see if it has the data is
not a great way to have a test complete all the time.

Modify the code so that we check for convergence
and if we have converged then look in the rib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-02 13:41:50 -05:00
lynne
0a4340469e tests: Adding test for ISIS SNMP
Adding test to verify walking of the ISIS SNMP MIB

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-02 10:06:31 -05:00
Kuldeep Kashyap
d99438d27d tests: Fix for test failure in PR #8158
1. There were few tests where routes were configured with blackhole and
non-blackhole nexthops simultaneously, enhanced tests accordingly and
verified in master branch and with PR #8158 changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-02 05:32:28 -08:00
Donald Sharp
5980ad0ae0 tests: Run black against tests again to clean up formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 09:18:49 -05:00
Donald Sharp
b9a210f951 tests: Add pytest.mark.snmp
Add the ability to run snmp tests

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 09:17:53 -05:00
Donald Sharp
5ad1fd54a8 tests: Add some pytest.mark.bgpd
Add some pytest.mark.bgpd.  This is about all I could stomach doing
in one patch.  I'll do another pass at another time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 09:11:38 -05:00
Donatas Abraitis
484ff4899b tests: Check if bgp default ipv[46]-unicast commands work
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-02-28 19:51:12 +02:00
Renato Westphal
784f92f052 isisd: handle corner case involving TI-LFA and the SR No-PHP flag
When the last SID in the TI-LFA repair list is an Adj-SID from the
penultimate hop router towards the final hop, the No-PHP flag of the
original Prefix-SID must be honored in the repair list itself since
the penultimate hop router won't have a chance to process that SID
and pop it if necessary.

Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-02-26 15:54:01 -03:00
Kuldeep Kashyap
5900cf46f7 tests: Fix for blackhole test in test_mcast_pim_bsmp suite
1. Fixed for blackhole test in test_mcast_pim_bsmp suite

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-02-25 23:49:58 -08:00
Karen Schoener
0534e94c10 tests: add topotest for LDP SNMP
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-02-24 17:38:02 -05:00
Anuradha Karuppiah
6bf6282da9 tests: increase ping attempts in EVPN MH to fix failures on ARM
There are two fixes to handle slow convergence on ARM -
1. Ping on every re-try attempt to account for initial packet loss
2. Handle incomplete show outputs gracefully

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Russ White
a09016c833
Merge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp
tests: Test if BGP AGGREGATOR attribute is discarded if ASN comes as 0
2021-02-23 11:06:34 -05:00
Donald Sharp
fa17cdc70f
Merge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp
tests: JSON comparison command for LabN topotests
2021-02-22 09:38:03 -05:00
Mark Stapp
6589cae5f8
Merge pull request #7920 from donaldsharp/more_pytest_cleanup
More pytest cleanup
2021-02-22 07:31:22 -05:00
David Schweizer
92cf76677b
tests: example using new "jsoncmp_pass" command
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-02-22 10:49:36 +01:00
David Schweizer
4e3828b771
tests: JSON comparison command for LabN topotests
The changes add the "jsoncmp_pass" and the "jsoncmp_fail" commands to
compare VTY shell's JSON output to an expected JSON object during
topotests using the LabN testing framework. This helps to eliminate
false negative test results (i.e. due to routes beeing out of order
after convergence or cosmetic changes in VTY shell's text output).

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-02-22 10:31:57 +01:00
Martin Buck
fd03dacd03 tests: Fix determination of IPv6 link-local addresses
When parsing the output of "ip -6 address", allow arbitrary base interface
names (the part after "@" in the interface name), not just "if0-9". Without
this, link-local addresses sometimes are attributed to the wrong interface
because we're not matching the interface name but still handle the
interface's addresses.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2021-02-22 09:48:16 +01:00
Mark Stapp
e9867ca57b tests: report kernel version check failures
Report kernel version check failures in the test log.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-16 11:55:47 -05:00
Martin Winter
9ee2ebdc82
Merge pull request #8015 from mjstapp/fix_topo_gen_support
tests: make generate support bundle python3
2021-02-16 17:49:18 +01:00
Mark Stapp
70b99f2fff tests: make generate support bundle python3 only
Make the generate-support-bundle script and interactions more
python3-friendly, and use python3 explicitly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-15 08:13:06 -05:00
Martin Winter
7a9c641d5c
Merge pull request #7917 from pjdruddy/l3vpn-mpls-snmp-upstream-1
L3vpn mpls snmp upstream 1
2021-02-10 01:37:58 +01:00
Pat Ruddy
f40594ca77 tests: mplsL3vpn SNMP topotest
Tests to exercise the MPLS-L3VPN-STD MIB

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-02-09 17:04:49 +00:00
Donald Sharp
350bdbdd95 tests: Modify timers on bgp_blackhole_community
Modify the timers on the bgp_blackhole_community test to
be more aggressive so our test system will recover faster
when we drop packets.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-08 19:37:58 -05:00
Quentin Young
5609ba6ad4
Merge pull request #7946 from ckishimo/ospfv3_json_2
tests: add ospf6 support via json files
2021-02-08 01:23:25 -05:00
Quentin Young
658186e8b6
Merge pull request #7937 from pjdruddy/topotest-evpn-svi-advertise
tests: update EVPN VXLAN for SVI behaviour change
2021-02-05 14:30:55 -05:00
Donatas Abraitis
f3e438f21c tests: Test if BGP AGGREGATOR attribute is discarded if ASN comes as 0
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-02-05 20:35:58 +02:00
Donald Sharp
6ddbc710cc
Merge pull request #7218 from kuldeepkash/multicast_pim_bsm
tests: Add multicast-pim-bsm-topo1 suite
2021-02-05 10:20:15 -05:00
Donald Sharp
1889e8e876
Merge pull request #7126 from vijaykug/multicast_with_static_rp
tests: Add multicast-pim-static-rp-topo1 test suite
2021-02-05 09:37:40 -05:00
Donald Sharp
5c0d9617e5
Merge pull request #7998 from volta-networks/fix_isis_attach_bit
isisd: When adjacencies go up and down add support to modify attached-bit
2021-02-04 18:46:19 -05:00
Donald Sharp
efb62eeddf tests: Add pytest.mark.staticd to topotests
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:35:42 -05:00
Donald Sharp
47679d6e44 tests: staticd is not being used in bgp_rr_ibgp test
Clean this up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:29:46 -05:00
Donald Sharp
785eb4f72f tests: Add pytest.mark.pathd
Go through and mark tests using pathd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:29:45 -05:00
Donald Sharp
2c647bcdc8 tests: Add pytest.mark.nhrpd
Go through all tests and mark pytest.mark.nhrpd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:29:04 -05:00
Donald Sharp
3dedee4fe1 tests: Add pytest.mark.ospfd to tests
Add pytest marking for ospfd.  This commit also has some other test markings
because I do not want to have to go through the same test multiple times.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:28:36 -05:00
Donald Sharp
6907ac7e2c tests: Fixup to use the new pytestmark = syntax
Go through all the current tests and convert over to correct syntax

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 18:20:31 -05:00
Donald Sharp
ad39be1f59 tests: The ldp-sync-isis-topo1 test does not use ospf
We have a ospfd.conf file in the r2 directory but the
ldp-sync-isis-topo1 test does not use ospf.  Let's remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04 17:54:47 -05:00
Mark Stapp
ecd32c7741 tests: fix ospf6_topo1 missing ref files
Only one of the four reference files was present; add the missing
three. The test just silently passed if a ref file was missing:
change that to a failure.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-03 16:28:18 -05:00
Donald Sharp
cc73a06499
Merge pull request #7314 from kuldeepkash/multicast-sm-topo1
Add multicast-pim-sm-topo1 test suite
2021-02-02 10:43:09 -05:00
Russ White
8f57f7413c
Merge pull request #6766 from opensourcerouting/xref
lib: xrefs - general cross-references & unique IDs
2021-02-02 07:44:21 -05:00
lynne
0883be0c5e tests: restore isis-lsp-bits-topo1 test
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-02-01 16:04:10 -05:00
Stephen Worley
13f93db328 topotests: add test for infinite recursion
Add a test for the infinite recursion case fixed
with 0c4dbb5f8fe8fb188fa0e0aa8ce04764e893b79b

See that commit for details of the problem. This test uses a simpler
version of the repro found there as the test.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-02-01 13:27:28 -05:00
David Lamparter
494d842022 tests: add unit test for xrefs
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-01 17:28:11 +01:00
Kuldeep Kashyap
c6d473e53b tests: Add multicast-pim-sm-topo2 test suite
1. Added 8 test cases to verify multicast PIM SM functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-01-29 16:12:48 +00:00
Kuldeep Kashyap
03e7807be0 tests: Add multicast-pim-sm-topo1 test suite
1. Added 10 test cases to verify multicast PIM SM functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-01-29 16:12:48 +00:00
Pat Ruddy
0c2b0c0098 tests: update evpn vxlan for svi behaviour change
This test relied on the default addition of SVI MAC in zebra
now this has been fixed the test needs to be updated to work
with the new behaviour.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-29 09:52:03 +00:00
Karen Schoener
d34cf8a75b tests: update snmp topotest api test_oid_walk
Update snmp topotest api test_oid_walk to validate a subset
of rows in a mib walk.

Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-01-28 19:05:42 -05:00
lynne
d61731fbe3 tests: temporarily remove isis-lsp-bits-topo1 topotest
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-01-28 13:37:52 -05:00
Donald Sharp
e6d17d2fa9
Merge pull request #7933 from deastoe/show-route-header-sep
lib: restore blank line after show route header
2021-01-28 09:55:52 -05:00
ckishimo
3076de892d tests: add dual stack OSPF topotest
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-27 17:31:12 +01:00
ckishimo
1feb577c63 tests: add verify_ospf6_neighbor
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-27 17:31:12 +01:00
ckishimo
1f661c8c90 tests: start ospf6d daemon
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-27 17:30:52 +01:00
Duncan Eastoe
ec20380c34 tests: more robust show route header stripping
In test_converge_protocols() use sed to match the "show ip(v6) route"
header and strip it, rather than using tail which requires hardcoding
the expected length of the header (which is subject to change).

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2021-01-27 12:19:52 +00:00