Commit Graph

1013 Commits

Author SHA1 Message Date
Donald Sharp
cc95fbd9ff topotests: Start abstraction of module_present for other platforms
Start abstraction of the module_present into module_present_linux and freebsd
To allow for multiple platforms that the topotests can be run on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-15 10:54:11 -05:00
Donald Sharp
af99f19eb2 topotests: Cleanup diagnose_env to allow thought about multi-platforms
Start the cleanup of diagnose_env to allow the running of topotests
on platforms besides linux.

So we split up diagnose_env into linux and freebsd variants.
At this point in time freebsd doesn't have any special code.
To be determined in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-15 10:49:59 -05:00
Donald Sharp
b7822d2016 topotests: Add a basic route leak vrf test
A recent commit broke this functionality, so add a very basic
route leak vrf test.

router bgp 99 vrf DONNA
  address-family ipv4 uni
    redistribute connected
    import vrf EVA
router bgp 99 vrf EVA
  address-family ipv4 uni
    redistribute connected
    import vrf DONNA

Routes should be leaked between the two vrf's.  Ensure that it does.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-12 13:37:46 +01:00
Christian Franke
cffe9e34de tests/topotests: Pull docker image from registry
We have set up automated builds for the topotest images at dockerhub.
Therefore, people don't need to perform a local build to run the
topotests on docker, but can use the image built by dockerhub.

As there is not much benefit in building locally, but the disadvantage
of weird errors if using an outdated image, change the topotests target
to always pull the most recent image from dockerhub.

Add an environment variable to disable this, e.g. for local development.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-10 18:01:34 +01:00
Renato Westphal
99fb518fef lib, tests: add support for keyless YANG lists
YANG allows lists without keys for operational data, in which case
the list elements are uniquely identified using a positional index
(starting from one).

This commit does the following:
* Remove the need to implement the 'get_keys' and 'lookup_entry'
  callbacks for keyless lists.
* Extend nb_oper_data_iter_list() so that it special-cases keyless
  lists appropriately. Since both the CLI and the sysrepo plugin
  use nb_oper_data_iterate() to fetch operational data, both these
  northbound clients automatically gain the ability to understand
  keyless lists without additional changes.
* Extend the confd plugin to special-case keyless lists as well. This
  was a bit painful to implement given ConfD's clumsy API, but
  keyless lists should work ok now.
* Update the "test_oper_data" unit test to test keyless YANG lists in
  addition to regular lists.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-12-09 13:58:53 -02:00
Donald Sharp
debaa48ba6
Merge pull request #3452 from opensourcerouting/reprobuild-master
[master] build reproducibility
2018-12-09 09:36:24 -05:00
Donald Sharp
64b81b3a64
Merge pull request #3442 from opensourcerouting/confirmed-commits
lib: add support for confirmed commits
2018-12-09 09:35:49 -05:00
Donald Sharp
290e0a7b41
Merge pull request #3420 from LabNConsulting/working/master/topotest/ce4-in-vrf
Topotest: put ce4 into vrf (no default), plus a couple of lib changes
2018-12-08 13:43:01 -05:00
Lou Berger
43c2c66bdf topotest: bgp_l3vpn_to_bgp_vrf put ce4 into vrf (without a default)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08 10:43:44 -05:00
Lou Berger
90892d35e1 topotests/lib: help script writers understand wrong VRF failure
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08 10:43:31 -05:00
Lou Berger
8cd7c744df topotest: remove sleep on staticd startup
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08 10:42:21 -05:00
David Lamparter
e4cdd7ccc5 tests: fix domainname dependency
These are causing random test failures when the host's domainname is
actually set to something (as opposed to empty/unset, which it is 99% of
times.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-07 19:34:45 +01:00
Renato Westphal
fbdc1c0a84 lib: add support for confirmed commits
Confirmed commits allow the user to request an automatic rollback to
the previous configuration if the commit operation is not confirmed
within a number of minutes. This is particularly useful when the user
is accessing the CLI through the network (e.g. using SSH) and any
configuration change might cause an unexpected loss of connectivity
between the user and the managed device (e.g. misconfiguration of a
routing protocol). By using a confirmed commit, the user can rest
assured the connectivity will be restored after the given timeout
expires, avoiding the need to access the router physically to fix
the problem.

When "commit confirmed TIMEOUT" is used, a new "commit" command is
expected to confirm the previous commit before the given timeout
expires. If "commit confirmed TIMEOUT" is used while there's already
a confirmed-commit in progress, the confirmed-commit timeout is
reset to the new value.

In the current implementation, if other users perform commits while
there's a confirmed-commit in progress, all commits are rolled back
when the confirmed-commit timeout expires. It's recommended to use
the "configure exclusive" configuration mode to prevent unexpected
outcomes when using confirmed commits.

When an user exits from the configuration mode while there's a
confirmed-commit in progress, the commit is automatically rolled
back and the user is notified about it. In the future we might
want to prompt the user if he or she really wants to exit from the
configuration mode when there's a pending confirmed commit.

Needless to say, confirmed commit only work for configuration
commands converted to the new northbound model. vtysh support will
be implemented at a later time.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-12-07 11:11:33 -02:00
Donald Sharp
29dfc63cbf
Merge pull request #3437 from opensourcerouting/bugfix/topotests-use-copy
tests/topotests: Use copied tests in Docker
2018-12-06 19:31:26 -05:00
Christian Franke
464e85c84d tests/topotests: Also search sbin for modprobe
We call `modprobe -n` to check if mpls modules are available to be
loaded. We do this as normal user, to only ask for root permissions
if we are actually loading the module.

This breaks if `modprobe` is in `/sbin` and normal users don't have
sbin in path.

So add `/sbin` to the search path to work around this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-06 18:33:21 +01:00
Christian Franke
ebdaa9ce5f tests/topotests: Use copied tests in Docker
If we mount the tests into the container from the host, we also
mount any `*.pyc` files with them, which will lead to issues
as the mount is done read-only to avoid any changes to the host.

Since the tests are now integrated and we already create a writeable
copy of the FRR tree, just use the tests from the FRR tree to avoid
this issue.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-06 15:30:03 +01:00
Ameya Dharkar
436df704e4 bgp: new topotest BGP templates to display default local preference and local-AS in BGP commands
This commit adds a template for "show bgp ipv4/ipv6" display to include default local preference and local-AS O/P.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2018-12-05 11:45:31 -08:00
Olivier Dugeon
5898044382
Merge pull request #3174 from opensourcerouting/feature/isis-triggered-hello
Feature: IS-IS triggered hello
2018-12-04 18:33:36 +01:00
Christian Franke
7fe06d5559 topotests: Update json_cmp_result to return readable result
Before this update, json_cmp_results which were formatted as strings
would not show the error mesage but just an object reference.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-04 16:13:58 +01:00
Christian Franke
32bc1eafb6 topotests/isis-topo1: Set useful IS-IS debugs
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-04 16:13:50 +01:00
Christian Franke
54b60cf9b0 Revert "tests/topotests: Change docker build context"
This reverts commit 659782730b.

Apparently, the build context is inferred from the Dockerfile path.
Yay for sensible documentation. :/

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01 19:40:49 +01:00
Christian Franke
ecd2f14c47 tests/topotests: Set -o cache_dir=/tmp
We are mounting the topotests from the host into the container
and mark them as read-only to avoid any modifications to the host.

Pytest tries to create a .pytest_chache directory in that location
which fails because of the read-only mount.

Configure a different cache dir which is writable to resolve this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01 17:16:01 +01:00
Christian Franke
659782730b tests/topotests: Change docker build context
In order to support automated builds, the build context needs to be
the repository root.

So adapt our dockerfile and buildscript for this. Also, add files which
should not be included into the build context in .dockerignore to limit
the size of the build context to something sensible.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01 16:54:58 +01:00
Christian Franke
b25e517b61 tests/topotests: Update documentation
The documentation needs an update to match the integrated version.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01 16:33:34 +01:00
Donald Sharp
d9d759ff7e
Merge pull request #3396 from opensourcerouting/feature/topotests-docker
feature: docker image for topotests
2018-11-30 15:39:50 -05:00
Russ White
9f7b49e105
Merge pull request #3342 from opensourcerouting/nb-operational-data
Northbound: improved support for YANG-modeled operational data
2018-11-29 15:19:38 -05:00
Christian Franke
5f1ac6d669 topotests: Only set -t when input is a terminal
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
ff37641ba2 topotests: Adapt docker changes for integrated tests
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
f509ad9785 docker/frr-topotests: Fix missing $ in if check
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
937e5dab6a docker/compile_frr: Don't build with disable shared
With libyang, we need to build the frr_user_types.so libyang
plugin for FRR to work.

This means we cannot build with disable shared.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
9b5470a843 docker: Improve README and frr-topotests usage
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
7996f1975d Dockerfile: Install libyang
Recent versions of FRR require libyang to build. So install it from
the FRR CI servers.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
6926d304a8 Docker: Fail if compilation is unsucessful
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
877d4e3642 Docker: Document additional environment variables
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
4242d6e2ae Docker: Use pytest as default command
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
31eae3e3b0 Docker: move openvswitch setup to separate script
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
3311145d70 Docker: Allow executing topotests while in subdir of FRR repo
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
1ab13617bf Docker: really cleanup when TOPOTEST_CLEAN is specified
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
f1c0836f67 Docker: Update buildscript not to delete old images
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
d9e887de2a Docker: Call the run script frr-topotests.sh
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
8e6f0d80f6 Dockerfile: Use iputils-ping instead of inetutils-ping, install strace
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
7b75f8cce3 Docker: Update buildscripts to be more efficient
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
ca64604f47 docker: Install topotests into image
Also: Change directory layout so we can do an indempotent sync from host
later.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
04c63c05b5 docker: reindent shell scripts
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
c12ec8557e docker: Run container with its own network namespace
For normal operation, there is no need for the container to run
in the host network environment or to have access to the users
X Session.

To accomodate usecases which need this, there is now a `TOPOTEST_OPTIONS`
environment variable to provide additional options to the docker run
command.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Christian Franke
e425ee6357 Dockerfile: Move to project root and combine RUNs
According to https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
`apt-get update` should always be combined with `apt-get install` in
the same `RUN` statement, to avoid installation of outdated packages.

Also, combine some more `RUN`s together as to avoid fewer layers.

Finally, remove some comments which are superflous. Comments shouldn't
describe what is done, especially when it's obvious. They should
explain why something is done.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Rafael Zalamena
1e9c095c6f docker: add support for running inside container
Based on the original @cfra idea of running topotest on docker.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-29 16:51:27 +01:00
Donald Sharp
096694da47 topotests: Add ospf-sr-topo1 back in
Due to weird merge issues ospf-sr-topo1 was not pulled in.
This gets this back into the tree.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2018-11-27 20:22:14 -05:00
Donald Sharp
d21321142a Add a tiny breadcrumb to hopefully help end user
Add a breadcrumb for people testing to hopefully allow
them to figure out what is going wrong when they
are testing different versions of FRR using
topotests and staticd is not running because
this version of staticd needs to be cleaned up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
b941f9587f bgp-ecmp-topo1: fix some pylint warnings
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
47bbb80ad2 bgp-ecmp-topo1: fix vrf default change
Python's `string' method 'replace' doesn't actually modify the string,
instead it returns a new string with the modified content.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Philippe Guibert
f847adaf8f bgp-ecmp-topo1: change default vrf name
By default, default vrf name is default, whereas BGP default vrf was
hardcoded to Default. Because this will be fixes, do not care about the
vrf name field and apply a regexp to move Default to default.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Christian Franke
940e6a5f9e ospf6-topo1: Don't compare link-local routes
Topotests would fail with errors like these:

    AssertionError: Linux Kernel IPv6 Routing Table verification failed for router r1:
      --- actual OSPFv3 IPv6 routing table
      +++ expected OSPFv3 IPv6 routing table
      @@ -8,6 +8,6 @@
       fc00:4:4:4::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
       fc00🅰️a🅰️:/64 dev r1-sw5 proto XXXX metric 256 pref medium
       fc00🅱️b🅱️:/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
      -fe80::/64 dev lo proto XXXX metric 256 pref medium
       fe80::/64 dev r1-stubnet proto XXXX metric 256 pref medium
      -fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +unreachable fe80::/64 dev lo proto XXXX metric 256 error -101 pref medium

Resolve this by not comparing link-local routes.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
paco
86c21ac7fc lib, lm-proxy-topo1: label manager proxy test
Label proxy manager test covering both LDP and BGP label requests.

lib/topotest.py:restartRouter() function has been fixed in order to
allow propagating options to deamons other than zebra.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-11-27 20:22:14 -05:00
Martin Winter
fa2adbc528 pick ospf6 router-id syntax based on version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Martin Winter
6bfe4b8bfc lib: checkRouterVersion to determine version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Donald Sharp
9ac2326ed0 Clean up deprecated usage of router-id
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
bd170de3b6 bfd-topo1: import topology picture
Import the graphviz file and the generated picture.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
14bb9445d6 bfd-topo1: add fast reconvergence test
Test that after a link goes down BGPd will be notified and recovered
quickly. Also test that BFD show command tells us that the peer went
down.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
843713317d bfd-topo1: add convergence tests
Test if BFD peers have found each other and if the BGP neighors have
connected.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
4d45d6d3b0 topogen/topotest: add support for BFDd
Allow BFDd to be configured and used.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
d1f4560e7d bgp_rfapi_basic_sanity_config2: allow for slow CI
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
9a75228916 bgp_rfapi_basic_sanity_config2: added rfapi test with partial table download This is identical to bgp_rfapi_basic_sanity with the exception of non-default config
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
7a9a953d7e bgp_rfapi_basic_sanity: added query only NVE
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Martin Winter
2f726781b6 lib: Add support for Ubuntu 18.04 with installed FRR package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
16872f5683 bgp_rfapi_basic_sanity: added multi-path to timeout test
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
1677325096 bgp_rfapi_basic_sanity: added cost to 2nd MP route
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
4ce7be6957 bgp_rfapi_basic_sanity: added multi-path and updated responses
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
d12ac2a975 bgp_rfapi_basic_sanity: wait for clean exit
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
914d749d8a bgp_rfapi_basic_sanity: added check_timeout (uses FRR PR#2934)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
a73fb016ff bgp_rfapi_basic_sanity: added close check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
ccabd61819 bgp_rfapi_basic_sanity: address PR comments (copyright, switch)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
197d4fdad4 bgp_rfapi_basic_sanity: added basic rfapi sanity topotest
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
0eff58207e lib: fix ip4_route_zebra header removal code
The `strip` function is actually a method of the String object.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Christian Franke
41077aa191 lib/ospf-topo1-vrf: don't compare headers of show ip route
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Donald Sharp
a93eb16a51 lib: Always attempt to set mpls platform_labels
The code was not attempting to set the max platform_labels
on a per router basis, leaving us w/ situations where
mpls install would fail because platform_labels was 0.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
9aecc71d53 ospf-topo1-vrf: show errors and reduce code
Use standardized code and fix assert messages to include errors.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Quentin Young
dadd89e672 update ref file for cidr mask display
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Lou Berger
c49edeb452 bgp_l3vpn_to_bgp_vrf: allow for long adjancies, seen with l3mdev_accept=1
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
a945bf0777 bgp_l3vpn_to_bgp_vrf: ignore output of sysctl, reenables test!
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
af01532c45 lib: speedup test exit when startup fails
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
96984a17a5 ldp-vpls-topo1: remove duplicated code and sleep
Use the new standardized code for router output compare and remove a
code sleep.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Philippe Guibert
224737467e ospf-topo1-vrf: replace link_enable api with zebra topotest api
Because on some platforms like i386, 'ip netns ' commands are unstable,
then I use an other API to operate the shutdown/no shutdown operation by
using vtysh.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
f561216813 lib: add zebra api to shutdown an interface
this function operates on vtysh, and performs a shutdown on an
interface.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
918138769c ospf-topo1-vrf: replace ip_route method with ip_route_zebra
To analyse which route has been entered in the kernel, the
 zebra show ip route vrf command is used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
b220b3c83a lib: add ip_route_zebra function
This command permits dumping zebra routes from a vrf

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
35490676eb ospf-topo1-vrf: setup with OSPF VRF
OSPF test with VRF backend NETNS

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
0ab7733f7f lib: topogen support for link_enable on other netns
In the case where vrf backend is based on NETNS, the link enable command
switches from context so as to perform the command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
e3060696ef bgp_vrf_netns: reduce code duplication
Use new standardized functions to reduce code duplication.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
ab4d1656b5 bgp-ecmp-topo1: remove sleep and reduce code
Use new standardized code to test router output and remove the
convergence sleep.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
38b291bca0 ospf-topo1: use new output compare functions
Remove duplicated code and use the new output compare code from
lib.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
9e2201b8aa isis-topo1: use run_and_expect
Use `run_and_expect` instead of manually implementing this code in the
test.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
5cffda1882 lib: implement standardized compare functions
In a effort to migrate more tests to use `run_and_expect` instead of
`sleep`s, this commit imports some common functions used to compare
router output. Retrying output comparison for N times, instead of
relying on arbitrary code `sleep`s, should help CI system tests fail
less and possibly run for less time.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
9683a1bb50 lib: improve normalize_text with another case
When normalizing a text also remove trailing whitespace since external
tools might add them. This commit fixes a test failure in ospf_topo1 on
Ubuntu 18.04.1.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
fd8582906d lib: show run_and_expect spent time
Standardize run_and_expect to show start and end time along with maximum
estimated wait time.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
064c807f63 bgp_l3vpn_to_bgp_direct: imports and more debug Allow for different timings on, and number of, import processing Collect more info for debugging
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
f8d5215d82 bgp_l3vpn_to_bgp_vrf: use l3mdev_accept workaround for known kernel bug
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
62accdecd8 isis-topo1: fix IPv6 changes and remove metric
IPv6 metric for FRR version <3.X is different than for newer versions,
so to avoid extra code logic lets just ignore these checks.

The IPv6 changes weren't detected earlier because of the json_cmp list
fix.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
ae6be66b8c isis-topo1: remove pseudo_TE-IS entries from check
The pseudo_TE-IS entries vary and depend on the way the topology
converges, so lets not rely on that.

The IS-IS routers in the middle TE-IS entries vary the parent
interface, so we also removed that entry to avoid json_cmp comparison
failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
16b3114108 isis-topo1: improve topology parser
Don't match header otherwise it will create an even bigger JSON output
than we need.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
3e379f6e49 topotests: fix json_cmp wrong list handling
Don't quit on the first match. While here add some more `json_cmp` tests
to make sure this doesn't happen again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
a82e5f9a7f lib: improve json_cmp
Allow json_cmp to compare JSON values which begin with a list instead of
a dictionary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
5a2f1e6fbe *: ignore .pytest_cache directories
These folders are being generated by recent py.test versions and should
be ignored.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Christian Franke
f2d6ce41ca lib: check presence of mpls modules, not exitcode of modprobe
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Mark Stapp
cf38bed97a isis-topo1: make isis topology match .dot file
The v6 isis topology didn't really match the illustration. Fix
the configs and the test expectations so that all the parts
agree.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-11-27 20:22:14 -05:00
Philippe Guibert
4b1f7a62db bgp_vrf_netns: swap the order of netns destruction
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Martin Winter
2c805e6cf6 lib: Fix staticd extension
Do not provide a staticd.conf to force staticd to read it's config
from zebra.conf

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Martin Winter
a2a1134c77 lib: Add support for staticd
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
160ce66a28 bgp_l3vpn_to_bgp_vrf: allow some time for updates to propogate
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
ffd3f54493 lib: more logging to aid in failure debugging
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
dce382d4a9 lib: don't report cores on exit as asserts in 5.0
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
436aa319bc lib: don't assert on shutdown errors in rel < 5.0
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
fb80b81b26 lib: add and use Router.checkRouterVersion (based on bdpd version)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
95460a6b7e lib: collect and report shutdown errors across whole topology
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
83c26937f4 lib: collect shutdown errors, add assert on single router shutdown
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
edc7a5036c ldp-topo1: fix ip mpls route output format
Remove the different file as it is no longer needed.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Christian Franke
5c4e963e40 ospf6-topo1: make ip-route comparison more robust
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Christian Franke
3a103f9a46 ldp-topo1: fix parsing for iproute from Ubuntu 18.04
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Lou Berger
6c700097d6 lib: bgprib - get human readable verson of json commands for log
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
b0f0d980b5 lib: allow all rw access to /tmp/topotests (for package support and debug)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
da63d5b319 lib: use per node log directory when topotest is used without topogen
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
deb4cef09a lib: log to start/local (per node) dir, log commands
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
93701fcf98 GUIDELINES.md: update to reflect per node log dirs
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
2b0e32967c *: convert startup logs to use per node directories also have startup and running log files match
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
2a59a86b50 lib: limit checkRouterCores output to once per router start
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Donald Sharp
d3335443bf bgp_l3vpn_to_bgp_vrf: Fixup topo test to write log files to same location at start of run
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Lou Berger
f76774ec9d lib: add check for core and memory issues after routerstop
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
e1dfa45e1b lib: convert to directories per node
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
068df8819b bgp_l3vpn_to_bgp_vrf: more pings... 2018-11-27 20:22:14 -05:00
Lou Berger
e8540bcb55 bgp_l3vpn_to_bgp_vrf: fix wrong table entries 2018-11-27 20:22:14 -05:00
Lou Berger
c941311fef lib: lutil - fix test numbering, add test number to command logging 2018-11-27 20:22:14 -05:00
Lou Berger
8e1bb0b707 bgp_l3vpn_to_bgp_vrf: remote static routes left over from old test versions 2018-11-27 20:22:14 -05:00
G. Paul Ziemba
3675bf4222 bgp_multiview_topo1: more fixes for header changes of PR 2045
For this test, vrf id in headers is unset

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:14 -05:00
G. Paul Ziemba
6a57e10314 bgp: tolerate route-table-show header changes of PR 2045
The table header has changed slightly for "bgp show" commands. Change
all-protocol-startup (test_bgp_ipv4() and test_bgp_ipv6()) and
bgp_multiview_topo1 (test_bgp_routingTable())  to run diffs against multiple
templates (representing the various valid outputs for different versions
of the FRR code) and mark the test "passed" if any one template matches.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
e4992f04e0 bgp_l3vpn_to_bgp_vrf: use FRR PR #2053
Check CE routes from CE in another VRF attached to same PE router. Relies
on FRR bug fix to not require labeled nexthop for paths that go only
through PE router and not mpls core.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
8651b9e617 bgp_l3vpn_to_bgp_vrf: check_linux_mpls: delete obsolete code; formatting
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
518874f48a lib: fix path the led to group_nl_converted being referenced when not set
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
d521440020 lib/bgprib.py: add copyright notice
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
c63906e8cf lib: lutil matching without changing newlines
Prior behavior of luCommand was to convert newlines to spaces in DUT
output before pattern matching. New method operating in parallel uses
re.DOTALL to mimic same behavior and allow preserving original DUT output.
The original output is needed for some scripts that parse line-by-line.

There is also some test code to compare match results using the
old way and new way and log a message if they are different. After
some short time we can develop confidence that using this new method
will not break any existing tests.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
d86321ae94 bgp_l3vpn_to_bgp_vrf: require frr 4.1
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
52a77b80e4 bgp_l3vpn_to_bgp_vrf: update to current vpn-vrf leak syntax and behavior
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
587e28a4f0 lib/bgprib.py: handle empty json results gracefully
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
90d56c6cca lib/ltemplate.py: add KeepGoing parameter to ltemplateTest
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
19246819f4 test_bgp_l3vpn_to_bgp_vrf: match new nexthop=0 code
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
22b888017c test_bgp_l3vpn_to_bgp_vrf: small config comment cleanup
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
7fdc42389a ltemplate.py: start isisd when isisd.conf present
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
09da03d50d ltemplate.py: remove dependency on hard-coded router name r2
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
1630ad4695 bgp_l3vpn_to_bgp_vrf: assign different RDs to customers on r4
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
38770d3c9d bgp_l3vpn_to_bgp_vrf: comment out route-add commands no longer needed
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
953858275e bgp_l3vpn_to_bgp_vrf: check_routes test now uses bgprib for exact route checking
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
044e2a3119 lib/bgprib.py naming rib->bgprib is more accurate
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
b7addc48d3 bgp_l3vpn_to_bgp_vrf: updated config files to current vpn-policy syntax
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
f7af60f202 lutil: expose result method
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
8a28936d41 lib: bgprib utility to compare rib against list of required routes
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba
9c8eda68e9 bgp vpn-vrf leaking: partial changes toward using new functionality
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
Philippe Guibert
1c2bcf650f bgp_vrf_netns: revert changes from topotest 77
revert
https://github.com/FRRouting/topotests/pull/77
bgp_vrf_netns: do not run test on 32 bit linux machines

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Philippe Guibert
505fc1bedf bgp_vrf_netns: increase bgp convergence timer
BGP convergence timer is increased from 90 seconds to 120 seconds.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Philippe Guibert
e0fac6ad5e bgp_vrf_netns: do not run test on 32 bit linux machines
It seems vrf netns is not working on 32 bit platforsm.
For that, the test should be cancelled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Lou Berger
4072a15323 bgp_vrf_netns: attempt cleanup of previous test abnormal exit. skip test if setup fails
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
87d5e16a45 lib: TopoExaBGP.start - report unexpected exabgp output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
1cb051708d bgp_vrf_netns: allow more time for adjacency to come up, report unexpected output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Philippe Guibert
12919c4255 bgp_vrf_netns: add basic test to support netns backend with netns
The test consist in starting a BGP router on a NETNS, and interacting
with an exaBGP instance. The test automatically relies on VRF with netns
backend but can be easily configured so as to perform basic BGP VRF
testing with VRF with VRF-lite backend.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Philippe Guibert
8dd5077d81 lib: zebra support for vrfwnetns parameter
topotest library is being added a new parameter when preparing the
configurationof each daemon. This parameter will be used to call the
daemon with some extra parameters. The -n parameter for zebra is taken
into account.
Also, when a extra parameter is given for calling zebra, a check is done to
see if it is possible to run zebra daemon with that option. This is the
case for vrfwnetns option. If not available, an error message is sent
back.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Lou Berger
14314036ca bgp_l3vpn_to_bgp_vrf: fix route set on non-vrf interface (thanks ben!)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
cc3cf6a883 lib: lutil - fix test counting, add returnJson flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
623afc9d83 ldp-vpls-topo1: support new OSPF JSON format
Support the new OSPF JSON output format for `show ip ospf neighbor
json` introduced in FRR's PR 1723.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Martin Winter
e1e048002d Revert previous 2 commits (pushed by mistake)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Olivier Dugeon
0c9274877a Update OSPF-SR tests to handle various version
In order to avoid failed test on unsupported version:
 - Test that version is greater than 4
 - Check that Segment Routing CLI are available

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2018-11-27 20:22:13 -05:00
Olivier Dugeon
a60948db9c Add OSPF Segment Routing tests
- Build a topology made of 4 routers: 3 PE connected to a P
 - Segment Routing is activated on all 4 routers with various setting
for the MSD, Global Block and Prefix (with or without NO-PHP flag)
 - 2 tests have been elaborated: the first one check the consistency of the
Segment Routing database on each router compared to a reference and the second
one check that the MPLS FIB has been correctly configured on each router,
again compared to a reference

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2018-11-27 20:22:13 -05:00
Martin Winter
d01e89f168 ldp-topo1: Support implicit-null and old format on "show_mpls_table"
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Lou Berger
a209417da6 bgp_l3vpn_to_bgp_direct: use new ltemplate common functions
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
98a1523fc8 bgp_l3vpn_to_bgp_vrf: use new ltemplate common functions
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
89b9abd97e lib: ltemplate add common ltemplateRtrCmd and ltemplateVersionCheck
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
1e21dc870d bgp_l3vpn_to_bgp_vrf: centralize iproute2 check, add checks to appropriate tests
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
a1a359ad8d bgp_l3vpn_to_bgp_vrf: required 4.11 kernel on arm processors
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
a0cbe75d20 bgp_l3vpn_to_bgp_vrf: add test to check linux vrf info
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
6198913449 bgp_l3vpn_to_bgp_vrf: prepend rtr name to vrf name, per Philippe
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
4a17413709 bgp_l3vpn_to_bgp_vrf: skip mpls vrf ping tests when have old iproute2
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
e766417ec9 bgp_l3vpn_to_bgp_vrf: add testing for manually setup MPLS path (until have dynamic)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
cf469a232b isis-topo1: allow up to 90 sec for convergence
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
d868d685e3 bgp_l3vpn_to_bgp_direct: use tgen.hasmpls flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
f2f902aca8 bgp_l3vpn_to_bgp_vrf: catch linux setup failures
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
d1f82d97db bgp_l3vpn_to_bgp_vrf: collect iproute2 package into
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
6dd81dbbfe bgp_l3vpn_to_bgp_vrf: add kernel check (>=4.9)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
1c507d27e3 bgp_l3vpn_to_bgp_vrf: use tgen.hasmpls flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
9711fc7e0b lib: add tgen level mpls init and hasmpls flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
85c81f9540 bgp_l3vpn_to_bgp_vrf: 2nd try at skipping tests when MPLS not available
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
2015a49715 bgp_l3vpn_to_bgp_vrf: skip tests when mpls not available
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
4348027f3e lib: add script name to summary output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
66c5287ec0 lib: add luLast to get last found luCommand regex match
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
8d99289694 bgp_l3vpn_to_bgp_direct: allow for some ping loss
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
f0287609c5 bgp_l3vpn_to_bgp_vrf: allow for some ping loss
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
c0c1496c62 bgp_l3vpn_to_bgp_vrf: add basic data path checks prior to adjacency check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
0bd1c31f5b bgp_l3vpn_to_bgp_direct: add basic data path checks prior to adjacency check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
340ecf297e bgp_l3vpn_to_bgp_xxx: match ltemplate start/stop changes
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
850de337d9 lib: ltemplate simplify start/stop
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
d0c5acabb9 bgp_l3vpn_to_bgp_xxx: avoid collision of customize.py match lutil and ltemplate changes
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
9e219b9af7 lib: scope life of Lutil and _lt to a single test run reorg to support regression environment
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
b9ff36bed7 bgp_l3vpn_to_bgp_vrf: just test adjacencies now - for dev/integration
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
308ae0773f bgp_l3vpn_to_bgp_vrf: don't set vrf-policy, wait for new format
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
856b9cce2d bgp_l3vpn_to_bgp_vrf: add ce4 off of r4 for inter-vrf route leaking
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
c0ace6d8e1 bgp_l3vpn_to_bgp_vrf: in progress version Adjacenies up, MPLS configured on interfaces -- right now provides testbed for code changes
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
4ac1e79fbc bgp_l3vpn_to_bgp_vrf: clone bgp_l3vpn_to_bgp_direct as starting point
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
99f5f0350b bgp_l3vpn_to_bgp_direct: 2nd try at skipping tests when MPLS not available
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
9ed0809e49 bgp_l3vpn_to_bgp_direct: skip tests when mpls not available
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
447f2d5a16 lib: add router.has_mpls check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
46325763aa topogen: fix assertion on routers_have_failure
`errors != ''` is never going to be false so the assert was never being
triggered.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
0e17ee9e03 topogen: import pytest assert function
Use the pytest assert function to be able to report to pytest failures
that happened inside the API.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
d4368260c3 isis-topo1: check IPv6 linux route install
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
d43cd0fd62 isis-topo1: simplify dictionary key removal code
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
88f83773d9 isis-topo1: check ipv6 zebra route installation
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
fc7752c118 isis-topo1: skip test on FRR 2.0
It was noticed that this topology doesn't converge when there are IPv6
configurations, so this commit makes the tests to be skipped when the
version is 2.X.Y.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org
2018-11-27 20:22:13 -05:00
Rafael Zalamena
5836fac223 isis-topo1: add IPv6 ISIS topology test
Configure IPv6 addresses and ISIS distribution, then test the topology
for the newly configured addresses.

This commit also adds support for parsing IPv6 data from the ISIS
topology output while updating the routers topology JSON files.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
29614f56c5 isis-topo1: add support for stable versions
Allow isis-topo1 tests to run on stable versions (2.0.2 and 3.0.2).

There are two differences between the stable versions and master:
1. ISIS nexthops don't show interfaceName nor interfaceIndex
   (on 'show ip route json')
2. New FRR version install ISIS routes in Linux with a different proto
   type identification.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
2d013cdabc isis-topo1: check ISIS kernel route installation
Check if the ISIS learned routes are being installed in the underlying
OS.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
e4d08d5be7 isis-topo1: test ISIS route installation
Check the 'show ip route json' output for installed ISIS routes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
67f1e9ed09 isis-topo1: test ISIS topology convergence
Add function to parse 'show isis topology' and expect the correct
convergence result.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
74bd8dd9ba isis-topo1: add topology graph
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
3aefe20797 isis-topo1: import topology
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Martin Winter
4649eef8e1 ldp-vpls-topo1: new format for ospf neighbor json
Accept new format in ospf neighbor json output in addition to
old version. New format was introduced with PR1659

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:13 -05:00
Lou Berger
8ab91133c7 lib: ltemplate - fix handling of CallOnFail (take 2)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
5859c4be6b lib: ltemplate - fix handling of CallOnFail
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
3eff4cc9dd bgp_l3vpn_to_bgp_direct: fix hook routines for ltemplate
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
2eddcd9ff3 bgp_l3vpn_to_bgp_direct: rename bgp_direct_to_bgp_vpn Rename BGP L3VPN test to have L3VPN at start of test name Also remove unused/pre-ltemplate files
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
c30e3e40a6 bgp_direct_to_bgp_vpn: enable mpls forwarding, add more details on adjacencies
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
db2dbd246e bgp_direct_to_bgp_vpn: convert to lib/ltemplate
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
df437d254a lib: add LabN testing template
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Martin Winter
d75f5f94cd ospf-topo1: Allow IPv6 ECMP version to pass
Check ospf IPv6 routes for ECMP version first and fallback
to previous version if needed.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
a1f1550fc2 ospf-topo1: Add IPv6 addresses to diagram
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Lou Berger
50b15737c9 lib: lutil - make it easier to spot command output and null output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
2fdcc34250 lib: lutil - make requested error logging change
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
bd15005d3a bgp_direct_to_bgp_vpn: scripts - avoid race condition, and test for predicable results
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
ffdac4dbd8 bgp_direct_to_bgp_vpn: add some progress output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
e437365bb9 bgp_direct_to_bgp_vpn: general cleanup use moved lutil.py improve error information adjust to new luCommand default timeout sdd support for CliOnFail, remove no_test_call_mininet_cli scripts - update to correct stable values use topo test's log dir
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
a582a8e9c5 lib: lutil cleanup move utilities/lutil.py -> lib/lutil.py add: luShowFail, CallOnFail, luStart parameter to set log dir change default wait to 10sec
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
7ed102b925 bgp_direct_to_bgp_vpn: convert to new template, skip tests on pre-3.1 versions
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
6d0dbb7996 bgp_direct_to_bgp_vpn: initial version
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger
199a7c79c1 lutil: initial version
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
e600b2d93c topotest: remove pid files
Remove PID files after a SIGKILL or confirmation that the pid file no
longer contains a running PID.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
065bd557f8 topotest: improve informational messages
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
63038f4b02 topotest: show the user that we are waiting
Add a log message to tell the user that we are waiting for zebra.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Lou Berger
3a568b9ca6 lib: speed up router shutdown stopRouter: report when a process is being killed only sleep if actually killed a process add option to not sleep or conduct -7 kill topogen stop: add wait parameter (defaults to old/wait) when stopping routers, first stop all without waiting then do a second pass where will wait if needed
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
08533b7bce topotest: always show diff on json_cmp failure
Append diffs on all json_cmp failures so the reader can compare JSON
field differences.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
479b98aacd topotest: specify why we are waiting
This shows the user why the router teardown is taking 2 seconds long.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
28a9b4f56e doc: update README and add code snippets
Add some pointers in the README documentation that might help users get
ready to use topotest.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
222ea88b2a topotest/topogen: demote some messages level
The messages level of this commit were downgraded because some of them
happen on 'non-error' situations. This should help diminish the error
log verbosity on the CI-system run.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
034237db12 topotest: fix a regression in version_cmp
It was found a regression on an edge case when the second number in the
comparison was (at least) 2 numbers longer the comparison would fail
with a wrong return value. It succeeded for some cases because the
first comparison in the exception was correct, but not the second.
2018-11-27 20:22:12 -05:00
Martin Winter
a018893f7c bgp-ecmp-topo1: Workaround for version check
temp workaround for Issue #43

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
3d6c6f01ac ldp-vpls-topo1: Allow ospf neighbor json command with list (new) and dict (old)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
968afc2848 ldp-vpls-topo1: fix a json_cmp result assert
Use the 'right' assert to show more detailed failure report and remove
a unused variable.
2018-11-27 20:22:12 -05:00
Martin Winter
dd3ddc0663 Fix output to allow it on generic Debian
- Generic Debian only has a single space in front of “proto” in the linux shell routing outptu

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
7c1f9631fc eigrp-topo1: solve output ordering problem
Transform 'show ip eigrp topo' output into data structures and compare
using json_cmp() to avoid expecting output order.
2018-11-27 20:22:12 -05:00
Renato Westphal
13e8bc063f ldp-topo1: Remove check for protocol in installed LSPs
PR #1213 in FRR changed the protocol of installed LSPs. To avoid breaking
older outstanding Pull Requests, remove the protocol check.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
ad59d1f5bb eigrp-topo1: Remove check for EIGRP distance
- Distance used to be wrong (0), new commit fixes this (90). To avoid breaking older outstanding Pull Requests, remove the distance check

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
7bd28cfc67 topotest: improve json error messages
Show a diff of the JSON values instead of dumping the whole
data structures.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
2db5888df5 topotest: json_cmp_result split error lines
When the API user wanted to show newlines we have to break them manually
to get the propper format.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
bc2872fd17 topotest: allow passing options to difflib
Extend the topotest diff functions to allow receiving difflib options.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
566567e9be topotest: remove unused json_cmp unused parameter 2018-11-27 20:22:12 -05:00
Martin Winter
6ae351e837 all-protocol-startup/isis: Fix check for "show isis interface" to allow different circuit ids than 1 2018-11-27 20:22:12 -05:00
Rafael Zalamena
fcfbc7696b topogen: fix diagnostics failure
Don't try to log to file if directory doesn't exist.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
d34f613477 topogen: save zebra version output
Keep the zebra version output for later problem diagnostics.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
7547ebd8cd topogen: log diagnostics to file 2018-11-27 20:22:12 -05:00
Martin Winter
1b46274d5c eigrp-topo1: Cleanup leftover comments from previous commit
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
ee4523a215 eigrp-topo1: Change Route verification to use json
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
555451faa5 all-protocol-starup: Fix triple-output of same vtysh stderr/stdout messages.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
7551168cba lib: Use SIGTERM for killing daemons first and only SIGBUS (7) if the daemons fail to exit.
- This allows daemons to free up memory and avoid false memory leak reports

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
8e957dbb04 multiple_topos: Don't report about StdErr Output if there is no output
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Donald Sharp
9057cd2cc3 eigrp-topo1: Correct eigrp test results.
The values saved for the route table and eigrp topo
were a bit off because they have been corrected
in the eigrp daemon

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
Martin Winter
8ee1273e44 Enable eigrp-topo1
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
44a592b2a6 lib: check for eigrpd available and return warning if missing instead of failing 2018-11-27 20:22:12 -05:00
Rafael Zalamena
e5355a016f eigrp-topo1: convert to topogen 2018-11-27 20:22:12 -05:00
Rafael Zalamena
c267e5b112 topogen: add support for eigrpd and nhrp 2018-11-27 20:22:12 -05:00
Rafael Zalamena
57c5075b7b topogen: router startup failure triggers errors
Makes `router_have_failure()` detect frr startup errors.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
b3b1b1d16c topogen: treat some corner cases on vtysh failure
Don't throw unneeded tracebacks when 'show version' doesn't show us what
we expect, instead gracefully fail.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
1eb633c012 topogen: show pretty output for skipped messages
Format them properly instead of printing a dictionary.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
333139b22e ldp_vpls_topo1: set an error instead of exit
It will have the same effect and code will not have to be repeated since
all functions must call `routers_have_failure()`.
2018-11-27 20:22:12 -05:00
Renato Westphal
f13a242c76 ldp_vpls_topo1: don't use pytest.mark.skipif
This feature from pytest can not be used to detect runtime errors.

Also, remove test_router_running() since all tests should actually check
if all daemons are up and running.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Renato Westphal
c4057baab7 ldp_vpls_topo1: skip all tests on stable/2.0
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Renato Westphal
6fcaea2bc6 ldp_vpls_topo1: add new topology for ldp pseudowires
This is a very simple topology for testing LDP pseudowires.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Donald Sharp
2dad85f432 Basic EIGRP topo test working
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
Donald Sharp
1fccd8e958 Exclude eigrp test from running normally yet
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
Donald Sharp
a4e471cfc5 Add a basic EIGRP topology.
Nothing fancy here, just add 3 routers in a row
attempt to let eigrp come up and start a mininet
xterm to debug, since eigrp doesn't work yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
Donald Sharp
cda83bee9f Allow topotests to work with eigrp and nhrp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
Martin Winter
be7286cc82 ldp-topo1: Use 'label implicit-null' for implicit labels
Signed-off-by: Martin Winter <mwinter@netdef.org>
2018-11-27 20:22:12 -05:00
David Lamparter
91733ef85e topotests: change from "context" to "unified" diff
context diff:
*** before.py
2018-11-27 20:22:12 -05:00
Rafael Zalamena
5684f8100d topotests: add topology name to assert output
Make it easy to identify which topology test we are running.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
e7ba3cd11c topotests: make asserts show up in stderr
Code was based on the pytest default makereport code:
c92760dca8/_pytest/runner.py (L264)
2018-11-27 20:22:12 -05:00
Martin Winter
9427b78f65 lib: Change topology to output INFO and DEBUG to stdout and other levels to stderr
Previously, all logs were sent to stderr
2018-11-27 20:22:12 -05:00
Martin Winter
c11c4cc7d3 lib: add check for mpls kernel modules to diagnose_env()
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
b431b5540f lib: Enhance daemon_available() function to check for mpls modules in case of LDPd
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
e1b2ce6a70 lib: Add check for MPLS kernel modules to exist before trying LDP tests
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
1380ecb1ce ospf-topo1: Remove check for spfLastDurationMsecs value
json check accidently checked for the spfLastDurationMsecs which
isn't always 0 for slower system in our tests. ARM7 sometimes has
a slightly higher value (1).

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
67651166b6 bgp-ecmp-topo1: Check number of routes received for convergence
Add check for number of routes to convergence. InQ=0, OutQ=0
together with correct number of routes received shows that
BGP has converged

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
9a950d76bd bgp-ecmp-topo: add support for FRR 2.0
The FRR 2.0 json output is different from newer version, so add the
appropriate treatment.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
35a00f240f bgp-ecmp-topo: test BGP convergence
Add a test that waits for BGP convergence.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
62271fe3fa bgp-ecmp-topo: use the new sleep function 2018-11-27 20:22:12 -05:00
Rafael Zalamena
570f25d80a topotest: log sleep function
Added a wrapper for the sleep function that should be used to register
in the log files the amount of time spent sleeping.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
1f4c4aec44 bgp-ecmp-topo1: add convergence test
Assert that we got the routes from ExaBGP and they are multipath
enabled.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
91a4415704 bgp-ecmp-topo1: convert to topogen 2018-11-27 20:22:12 -05:00
Rafael Zalamena
0c68b87abc bgp-ecmp-topo1: fix exabgp configuration file
Using relative path to start the exabgp python scripts didn't work out
of the box in my enviroment, so be more specific since we already know
where the scripts are.
2018-11-27 20:22:12 -05:00