summaryrefslogtreecommitdiffhomepage
path: root/test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/base.py5
-rw-r--r--test/lib/gobgp.py6
2 files changed, 9 insertions, 2 deletions
diff --git a/test/lib/base.py b/test/lib/base.py
index 5ccf952e..3d14cf4c 100644
--- a/test/lib/base.py
+++ b/test/lib/base.py
@@ -280,7 +280,7 @@ class BGPContainer(Container):
is_rr_client=False, cluster_id=None,
flowspec=False, bridge='', reload_config=True, as2=False,
graceful_restart=None, local_as=None, prefix_limit=None,
- v6=False):
+ v6=False, llgr=None):
neigh_addr = ''
local_addr = ''
it = itertools.product(self.ip_addrs, peer.ip_addrs)
@@ -317,7 +317,8 @@ class BGPContainer(Container):
'as2': as2,
'graceful_restart': graceful_restart,
'local_as': local_as,
- 'prefix_limit': prefix_limit}
+ 'prefix_limit': prefix_limit,
+ 'llgr': llgr}
if self.is_running and reload_config:
self.create_config()
self.reload_config()
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index b8e669dd..77060893 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -306,6 +306,12 @@ class GoBGPContainer(BGPContainer):
for afi_safi in afi_safi_list:
afi_safi['mp-graceful-restart'] = {'config': {'enabled': True}}
+ if info['llgr'] is not None:
+ n['graceful-restart']['config']['restart-time'] = 1
+ n['graceful-restart']['config']['long-lived-enabled'] = True
+ for afi_safi in afi_safi_list:
+ afi_safi['long-lived-graceful-restart'] = {'config': {'enabled': True, 'restart-time': 30}}
+
if info['is_rr_client']:
clusterId = self.router_id
if 'cluster_id' in info and info['cluster_id'] is not None: