diff options
| author | Christian Hopps <chopps@labn.net> | 2021-08-31 09:13:23 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2021-08-31 09:45:11 -0400 |
| commit | f5136f63972fee9f8b00c98f520a9adb5f61dc7e (patch) | |
| tree | 6c3b05f991a716f51db7e59b687c21d752bc6f5c | |
| parent | 032d1a65ff14f8a44c6a9df408fff084d7760756 (diff) | |
tests: log bgp nbr changes, and allow config of connect timer
- Allow tests to also change the connect timer as they can for the
keep-alive and holddown timers.
Signed-off-by: Christian Hopps <chopps@labn.net>
| -rw-r--r-- | tests/topotests/lib/bgp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py index 920c428e53..afa7f7fdaf 100644 --- a/tests/topotests/lib/bgp.py +++ b/tests/topotests/lib/bgp.py @@ -272,6 +272,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False): if router_id: config_data.append("bgp router-id {}".format(router_id)) + config_data.append("bgp log-neighbor-changes") config_data.append("no bgp network import-check") bgp_peer_grp_data = bgp_data.setdefault("peer-group", {}) @@ -805,6 +806,7 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True): ) disable_connected = peer.setdefault("disable_connected_check", False) + connect = peer.setdefault("connecttimer", 120) keep_alive = peer.setdefault("keepalivetimer", 3) hold_down = peer.setdefault("holddowntimer", 10) password = peer.setdefault("password", None) @@ -834,6 +836,9 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True): config_data.append( "{} timers {} {}".format(neigh_cxt, keep_alive, hold_down) ) + if int(connect) != 120: + config_data.append("{} connect {}".format(neigh_cxt, connect)) + if graceful_restart: config_data.append("{} graceful-restart".format(neigh_cxt)) elif graceful_restart == False: |
