diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2016-10-09 07:18:13 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-10-09 07:18:13 -0700 |
commit | 614746ca1159fe421047df04c5af6f07c38b2e65 (patch) | |
tree | 77e93a40ec38318a96ab3a195fb1baa68372acd2 /test/lib | |
parent | 6b6f6974fcea37dc006f90dbd2f8d65495048725 (diff) |
*: support long lived graceful restart
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/base.py | 5 | ||||
-rw-r--r-- | test/lib/gobgp.py | 6 |
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: |