Commit Graph

1866 Commits

Author SHA1 Message Date
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
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
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