Commit Graph

803 Commits

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