Commit Graph

1013 Commits

Author SHA1 Message Date
Kuldeep Kashyap
380bb6d16b tests: Enhance support to create bgp community-list or large-community-list
Adding new API to create bgp community-list or large-community-list

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

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
9920237e4f tests: Add route-map to initial config creation from JSON
To enable route-map config build from JSON

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
7f55cb6a88 tests: Adding API verify_bgp_attributes() to bgp.py
This API is to verify BGP attribute values set by route maps

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Donald Sharp
0cddbb1b6c
Merge pull request #5050 from LabNConsulting/working/lb/tt-update
topotest: bgp_l3vpn_to_bgp_vrf allow for different interface output
2019-09-24 16:07:35 -04:00
Renato Westphal
8f4f95e08a tests: remove more topotest backward-compatibility cruft
This isn't necessary anymore since topotest was integrated into
the FRR repo.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-23 09:38:05 -03:00
Lou Berger
05916dd519 topotest: bgp_l3vpn_to_bgp_vrf allow for different interface output
Signed-off-by: Lou Berger <lberger@labn.net>
2019-09-22 13:06:48 -04:00
Olivier Dugeon
1b3f47d04c isisd: Update TLVs processing for TE, RI & SR
In preparation to Segment Routing:
 - Update the management of Traffic Engineering subTLVs to the new tlvs parser
 - Add Router Capability TLV 242 as per RFC 4971 & 7981
 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25

Modified files:
 - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs
 - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process
   TE subTLVs, Router Capability TLV and SR subTLVs
 - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing
 - isis_te.[c,h]: remove all old TE structures and managment functions,
   and add hook call to set local and remote IP addresses as wellas update TE
   parameters
 - isis_zebra.[c,h]: add hook call when new interface is up
 - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs
 - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-09-17 17:35:50 +02:00
Quentin Young
df54f0536e tests: update tests for pthread init changes
Need to init frr_pthreads manually in tests now.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16 16:12:04 +00:00
Donald Sharp
840806a627
Merge pull request #4975 from opensourcerouting/disable-ecmp2-test
Disable bgp-ecmp-topo2 topotest until proper fix is developed
2019-09-14 07:43:31 -04:00
Sri Mohana Singamsetty
921308a535
Merge pull request #4969 from ton31337/feature/rewrite_bgp_aggregate-address_route-map_test
tests: Improve bgp_aggregate-address_route-map test
2019-09-13 11:03:36 -07:00
Olivier Dugeon
3c5ae0248e
Merge pull request #4949 from opensourcerouting/mpls-zapi-improvements
MPLS zapi improvements
2019-09-13 17:36:16 +02:00
Olivier Dugeon
d22a64e06f
Merge pull request #4948 from opensourcerouting/show-mpls-table
zebra: improve the output of "show mpls table"
2019-09-13 17:24:52 +02:00
Donatas Abraitis
65f40ecdb5 tests: Improve bgp_aggregate-address_route-map test
Rewrite some parts to add more visibility what's going on if test fails.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-13 11:16:32 +03:00
Martin Winter
4e5441e749 tests: Disable bgp-ecmp-topo2 topotest until proper fix is developed
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2019-09-13 02:13:12 +02:00
Donald Sharp
963d10dfb0 tests: Add admin distance 255 static routes
Add a couple of test cases to ensure that admin distance of
255 actually causes the route to be accepted by zebra but
not installed into the linux kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-11 07:53:43 -04:00
Donald Sharp
bce69e3c54 tests: Fix topotests due to json error
Recent commit: 5fba22485b added a new topotest that used
an older version of FRR that referenced some json code
that was changed in between when the PR was submitted
and when it got in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-10 23:16:01 -04:00
Lou Berger
ccc13acc0f
Merge pull request #4866 from ton31337/feature/apply_route-map_for_aggregate-address
bgpd: Apply route-map for aggregate-address
2019-09-10 11:59:10 -04:00
Renato Westphal
635a039eef lib, zebra: rename LSP type used for OSPF SR
SR support for IS-IS is coming so we need to be able to distinguish
OSPF and IS-IS LSPs.

While here, add missing case statement for LDP on
lsp_type_from_re_type().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
e29f8d0db3 tests: remove topotest compatibility with older ldpd versions
Now that topotest was integrated into the FRR repository, we
don't need to worry anymore about creating tests that work across
different FRR versions. The topotests present on any branch need
to be compatible only with the FRR daemons from that same branch.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 20:58:09 -03:00
Renato Westphal
a971aeb68e zebra: improve the output of "show mpls table"
Use the table generator to adjust the columns width according to
the table's content.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 20:54:59 -03:00
Stephen Worley
a4e6a2f808 topotests: Add libcap-dev to the Dockerfile
Add libcap-dev to the Dockerfile now that its a required depency.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-09-06 18:20:47 -04:00
Donald Sharp
dfff0ef449 tests: Ensure we wait 1 bgp timeout period before declaring failure
The lib/bgp.py test code is bringing up neighbors and clearing them
to test that things are working appropriately.  The problem we have
is that we are only waiting 30 seconds for declaration of failure.
In a high load system packets can be lost and as such the initial
convergence may not happen.  Modify the test to wait for 1 retry
window test period before declaring failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-06 08:46:27 -04:00
David Lamparter
0cf6db21ec *: frr_elevate_privs -> frr_with_privs
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-03 17:18:35 +02:00
Ashish Pant
c7d88b2d10 tests: Fix topojson address-family configuration
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

address-family configuration was commented out in earlier commit
by mistake. Re-enabling it now.
2019-09-03 09:42:30 +05:30
Ashish Pant
243daff303 tests: Fix topojson static route tests
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Fix static route test in bgp-basic-functionality-topo1 and
example-topojson-test after lib changes

Add example-topojson-test to ignore from pytest.ini
2019-09-03 07:22:33 +05:30
Ashish Pant
27d9695dd5 tests: Add ecmp test cases
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adds ecmp test case for ibgp and ebgp topology.
2019-09-03 07:22:22 +05:30
Stephen Worley
6d9effdf85 tests: Update Dockerfile to a valid libyang version
The built docker container was installing an old version of libyang.
Updated it to point to the most recent build for Debian.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-08-31 10:51:34 -04:00
Donald Sharp
955e2c3ec5 tests: Ensure topotests are actually waiting appropriately for peers to come up
The FRR bgp topotests are employing a luCommand that looks for bgp peering
to be up on the first router with a `wait` sub-command.  Please note that
a variety of tests are using this.  This wait command has a variety of time
outs being used `30`, `90`, and `300`.  BGP peering with how we compile
it have very long timers and 30( and possibly 90) seconds is clearly not enough when
we are waiting, given the nature of our test beds.  Additionally we were employing a model
where once the first summary command succeeded we automatically assumed that all
subsuquent summary commands( to look at other routers ) would not need to
possibly wait.  This is insufficient in that if I have multiple peerings in
multiple vrf's there is no guarantee that one router peers being up will
be sufficient information to know that all the other routers peers are up.

Modify the test cases to be a bit more conformant about this and to
allow peer checks to actually wait a reasonable amount of time for
all peers to have a chance to come up.

Signed-off-by: Donald Sharp <sharpdc@cumulusnetworks.com>
2019-08-29 09:33:47 -04:00
Donatas Abraitis
cf3b331d45
Merge pull request #4896 from donaldsharp/docker_dev_build
tests: Modify docker build for local to have dev build
2019-08-29 10:15:52 +03:00
Martin Winter
4298dfd12e
Merge pull request #4852 from ashish12pant/fix_log
tests: Enhance execution logs in topojson
2019-08-29 04:35:37 +02:00
Donald Sharp
1b7412c866 tests: Modify docker build for local to have dev build
Allow a local build of a frr docker container to be built with
`--enable-dev-build`.  This allows better decodes of symbols
which could be useful when you are trying to fix something
that is broken inside the docker container.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-28 15:50:23 -04:00
Donatas Abraitis
5fba22485b topotests: Add test for checking if route-map is applied for aggregate-address
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-08-28 16:45:44 +03:00
Dinesh G Dutt
5cb5f4d04d bgpd: Eliminate all incorrect formulations of afi/safi in JSON
In a number of places, the JSON output had invalid key names for
AFI/SAFI. For example, the key name in JSON was "IPv4 Unicast" which
is invalid as a JSON Key name. Many JSON tools such as those used in
Ansible, jq etc. all fail to parse the output in these scenarios. The
valid name is ipv4Unicast. There's already a routine afi_safi_json()
defined to handle this change, but it was not consistently called.
The non-JSON version was called afi_safi_print() and it merely returned
the CLI version of the string, didn't print anything.

This patch deals with this issue by:
   - Renaming afi_safi_print to get_afi_safi_str()
   - get_afi_safi_str takes an additional param, for_json which if true
     will return the JSON-valid string
   - Renaming afi_safi_json to get_afi_safi_json_str()
   - Creating a new routine get_afi_safi_vty_str() for printing to vty
   - Consistently using get_afi_safi_str() with the appropriate for_json
     value

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
2019-08-27 14:05:39 +00:00
Ashish Pant
bca7983774 tests: Enhance execution logs in topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

1. Add check if show running output is corrupted as frr-reload does
   not return cause of failure, just the error codes.
2. Change logger level to debug for some extra information.
3. Modify logger messages for more clear information.
4. Print configuration commands to console instead of show running
5. Print show command output to console.
6. Move show running output within flag show_router_config.
7. Add retry decorator for retyring show commands.
2019-08-22 16:24:45 +05:30
Donald Sharp
a7e52bd7b6 tests: Add a couple simple Null0 spelling tests
Add a bit of code to test different spelling of Null0 routes.
This was broken at some point in the past and with recent
changes is working again, but it would be nice to
know when this breaks again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-21 11:44:48 -04:00
Marcel Röthke
24b7eb485d bgpd: fix bgp_table range lookup
In case the topmost node has a larger prefix length than the lookup
prefix it never matches even if it was still lower than maxlen

This also alters a test case to check for this bug.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-16 16:42:11 +02:00
Sri Mohana Singamsetty
5acb534daf
Merge pull request #4802 from donaldsharp/static_blackhole
staticd: Fix blackhole routes being installed
2019-08-12 20:49:17 -07:00
Donald Sharp
76eb017923
Merge pull request #4497 from opensourcerouting/rcu
RCU support
2019-08-08 08:41:07 -04:00
Donald Sharp
a6e85307c3 staticd: Fix blackhole routes being installed
When we are ready to install a route, we were treating
blackhole routes as something that should be nexthop tracked
which does not work as well as one would expect.

Additionally add some test code to show that this actually
fixes this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-07 21:55:23 -04:00
Donald Sharp
3a738964ec
Merge pull request #4763 from opensourcerouting/ds-work
lib: get rid of pqueue_*, use DECLARE_HEAP in thread.c
2019-08-07 16:45:02 -04:00
Quentin Young
3c1c172f02
Merge pull request #4790 from opensourcerouting/ctype-cast
*: fix ctype casts
2019-08-06 13:21:13 -04:00
David Lamparter
fefa5e0ff5 *: fix ctype (isalpha & co.) casts
The correct cast for these is (unsigned char), because "char" could be
signed and thus have some negative value.  isalpha & co. expect an int
arg that is positive, i.e. 0-255.  So we need to cast to (unsigned char)
when calling any of these.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-08-06 16:54:52 +02:00
Igor Ryzhov
c7975431e6 all: remove logical-router functionality
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-08-02 17:10:11 +03:00
Sri Mohana Singamsetty
b7655d8476
Merge pull request #4713 from ton31337/fix/set_comm-list_delete_into_config_memcpy
bgpd: Strip `delete` keyword when looking up for communities
2019-08-01 21:19:43 -07:00
David Lamparter
b21ea71ea9
Merge pull request #4758 from donaldsharp/test_epoch
tests: Do not use peerUptime as a measure of if a clear worked
2019-08-01 17:07:43 +02:00
David Lamparter
77faa5bd79 lib: remove pqueue_* (again)
All users of the pqueue_* implementations have been migrated to use
some new data structure (TYPEDSKIP for ospf, HEAP for thread.c).

Remove.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-08-01 17:02:53 +02:00
Donald Sharp
abdb6bcebd tests: Do not use peerUptime as a measure of if a clear worked
The peerUptime data received from a `show bgp ipv4 uni summ json`
gives you the time in seconds since the peer has come up.
The clear_bgp_and_verify function is checking the peerUptime
for before and after and if they are the same then the test
was declaring a clear failure.

The problem with this is of course that the tests can run fast
enough that the peerUptime is the same for before and after the clear.

Modify the test case to use peerUptimeEstablishedEpoch.
This value is the seconds since the epoch since the establishment
of the peer.  This will allow us to know that a clear happened.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-31 12:33:55 -04:00
Stephen Worley
7de7c75b29 tests: Add asserts to check return on list *_del
Add some asserts where `list_del()` is called to verify they object
was found when it was deleted.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-07-31 11:35:21 -04:00
David Lamparter
6046b690b5 lib/seqlock: avoid syscalls in no-waiter cases
When we have no contention on the seqlock, we shouldn't incur the cost
of syscalls.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-31 03:33:41 +02:00
Donald Sharp
42fc558ee3 zebra, tests: Remove ROUTE_ENTRY_NEXTHOPS_CHANGED
The flag ROUTE_ENTRY_NEXTHOPS_CHANGED is only ever set or unset.
Since this flag is not used for anything useful, remove from system.

By changing this flag we have re-ordered `internalStatus' of json
output of zebra rib routes.  Go through and fix up tetsts to
use the new values.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-29 14:53:58 -04:00
Rafael Zalamena
5d45cea234 topotest: fix bgp-path-attributes-topology
The first RIB check wants to assert that we don't have the r7's routes
in r1, so right after that code the routers r2 and r3 are configured
then `verify_rib` is called again to check for those routes.

This test never passed, but it didn't cause failures because of the
`try`/`except`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-26 17:35:45 -03:00
Donatas Abraitis
5bb05ccebb topotests: Check if set-comm-list is working under route-map scope
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-07-26 09:18:17 +03:00
Rafael Zalamena
91c939dc12 topotest: improve common_config.py
Don't wait for `True` results when the return type is a string.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Rafael Zalamena
a6fd124a2a topotest: add new run_and_expect variant
The new `run_and_expect` variant - called `run_and_expect_type` - tests
the return value type of the test function and optionally the return
value.

Now we can implement tests from test functions that return different
return types.

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

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Rafael Zalamena
c50435c1c2 topotest/bgp_l3vpn_to_bgp_vrf: stabilize test
Increase wait times between commands execution to help avoid bogus test
failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Rafael Zalamena
0f94985fdd topotest: adjust luCommand to accept wait_time
Allow users of `luCommand` to specify wait time between commands
execution and simplify the `wait` method implementation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:20 -03:00
Rafael Zalamena
2a76b0a8e2 topotest: fix Lou's framework command wait
Fix two main issues:

  * Don't use float to figure out if we spent the time user asked;
  * Don't depend on system clock to find we reached the end of time;

The fix is basically pre caculating the amount of wait cycles we are
going to peform and use a counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:26:15 -03:00
Donald Sharp
44d2a6775b Test: Add back a bit more debugging to see what is going on
All debug logging has been thrown to the floor in this loop.
Add it back in and additionally add a bit more debugging to
know what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-18 07:50:10 -04:00
Mark Stapp
974c214ba9
Merge pull request #4680 from donaldsharp/test_longer
tests: Topotests are not giving sufficient time to propagate data
2019-07-17 13:34:51 -04:00
Mark Stapp
ad79beb1dd
Merge pull request #4687 from qlyoung/fix-test-ntop-strlen-assert
tests: remove strlen assert in inet_ntop tests
2019-07-15 15:25:09 -04:00
Quentin Young
2516237674 tests: remove strlen assert in inet_ntop tests
Some platform libc's like to render some v6 addresses as v4 mapped where
others render the same addresses as v6 with leading zeroes. Binary
equivalence checks pass but strlen checks sometimes fail here. Remove
assert causing the failure.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-07-15 17:19:14 +00:00
Renato Westphal
07a4ddf2b6
Merge pull request #4660 from manuhalo/label_manager_fixes
Label manager improvements + refactor
2019-07-12 17:09:33 -03:00
Donald Sharp
1d90adee9d tests: Topotests are not giving sufficient time to propagate data
A bunch of our current tests setup data and redistribute
it across some bgp connections and then test for it
being there.  A delay of 2 seconds that was initially
there to ensure that the data has propagated does not
actually work all the time when you have a loaded
virtualized environment.

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

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-11 14:40:31 -04:00
Emanuele Di Pascale
0b0b502f08 tests: remove lm-proxy-topo1 topotest
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-07-10 15:50:22 +02:00
Emanuele Di Pascale
ff90cc95d5 tests: remove test_lblmgr.c
This is not part of the make check tests and it has been broken
for a while, apparently. The way the label manager is coded makes
it very hard to code unit tests, and testing the relay of requests
to an external label manager is probably better done through
a topotest, so remove this.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-07-10 15:20:27 +02:00
Emanuele Di Pascale
0e3b6a926a lib, zebra: support label chunk requests for SRGB
For SRGB, we need to support chunk requests starting at a
specific point in the label space, rather than just asking
for any sufficiently large chunk. To this purpose, we extend
the label manager api to request a chunk with a base value;
if the base is set to 0, the label manager will behave as it
currently does, i.e. fetching the first free chunk big enough
to satisfy the request.

update all the existing calls to get chunks from the label
manager so that they use MPLS_LABEL_BASE_ANY as the base
for the requested chunk

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-07-10 15:20:27 +02:00
Ashish Pant
870fc40f7a tests: Fix info messages print in std_error
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

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

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

Creates logdir everytime in start_topology, removed stop_topoloy.
Using tgen.stop_topology in test case now.
2019-07-09 10:26:53 +05:30
Ashish Pant
66e98bc169 tests: Adding example cases for topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Example JSON and test cases for 3 types being added:
1. Single link between routers
2. Multiple linke between routers.
3. BGP session over loopback interface
2019-07-09 10:26:53 +05:30
Ashish Pant
c557d0174e tests: Adding bgp path attribute tests
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding multiple test cases for bgp attributes.
Adding verfication APIs for them.
2019-07-09 10:26:53 +05:30
Ashish Pant
0c5c6e2e64 tests: Fixing ipv6 address generation
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
2019-07-09 10:26:53 +05:30
Ashish Pant
81e3d6095f tests: Adding bgp tests for prefix-lists
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

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

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

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

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

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

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

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

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

Adding mulitple methods to form BGP configuration and other
helper methods.
If "bgp" is given in JSON the configuration will be created
2019-07-09 10:26:53 +05:30
Ashish Pant
7659b8d4e4 tests: Adds basic config load and interface API
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adds method to load configuration on the router. Save configuration
for resetting.
Adds method for configuring interfaces ip address on router.
Adds logdir and other pytest.ini option
2019-07-09 10:26:53 +05:30
Ashish Pant
27339562f8 tests: Adding start and stop topology
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding methods for staring and stopping routers in topology
2019-07-09 10:26:53 +05:30
Ashish Pant
2ad3d000f0 tests: Intial commit for topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Adding JSON parser for creating router and assinging ip addresses to
each interface
2019-07-09 10:26:53 +05:30
David Lamparter
1df0492687
Run-time log filtering via vtysh commands (#4524)
Run-time log filtering via vtysh commands
2019-07-03 14:39:59 +02:00
Lou Berger
d850e66733 topotest: reduce chattiness of lutil output
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-26 20:30:59 +00:00
Lou Berger
487921759c bgp_l3vpn_to_bgp_vrf: report zebra memory stats
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-26 17:54:20 +00:00
Lou Berger
26732abf54 bgp_l3vpn_to_bgp_vrf: refactor to try to avoid periodic failure, also collect more info
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-26 17:53:46 +00:00
Quentin Young
878918edaa
Merge pull request #4522 from LabNConsulting/working/master/issue4479
bgpd: address issue #4479 crash during instance removal
2019-06-25 11:45:19 -04:00
Sri Mohana Singamsetty
920c100807
Merge pull request #4549 from donaldsharp/multiple_instance
Multiple instance
2019-06-20 13:32:34 -07:00
Stephen Worley
4aaea8fb49 tests: Make checkRouterRunning() show logging
Adding in the command `show log-filter` made `show log`
ambiguous. Change the checkRouterRunning() test to do
full `show logging` so it works again.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-06-19 17:20:24 -04:00
Mark Stapp
e30f24fd8d topotest: configure l3mdev_accept for a range of kernels
Improve vrf support in the l3vpn topotest by configuring
l3mdev_accept for a range of kernels.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-06-19 14:55:48 -04:00
Donald Sharp
0c38bc3257 tests: Remove bgp multiple-instance command from topotests
The `bgp multiple-instance` command has been deprecated and
removed.  Finish off this by removing it from topotests too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-18 09:32:18 -04:00
Lou Berger
5b5971483e tests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scaling tests
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-18 11:54:57 +00:00
Lou Berger
90d5fc83c0 tests/topotests: add bgp_instance_del_test to test for crashes seen during bgp instance deletes
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-18 11:54:57 +00:00
Donald Sharp
7ec5e2bf70
Merge pull request #4514 from opensourcerouting/warnings-20190612
*: kill more warnings
2019-06-17 15:19:42 -04:00
David Lamparter
277aee6fc9
eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test (#4521)
eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test
2019-06-14 21:48:34 +02:00
Lou Berger
dc06452e68 tests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scaling tests
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-13 21:01:30 +00:00
Quentin Young
42aac9b2ab
Merge pull request #4500 from opensourcerouting/clippy-improve
clippy: batch of improvements
2019-06-13 15:06:24 -04:00
Quentin Young
17bf75735c tests: add prefix2str test
Only tests IPv4 and IPv6 right now.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-06-13 18:30:28 +00:00