From f48c4deaa19ca8b36d87a0d71776bc29b7e17ebe Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Thu, 17 Sep 2015 20:01:22 +0900 Subject: test: add addpath_test.py Signed-off-by: ISHIDA Wataru --- test/lib/gobgp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/lib/gobgp.py') diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py index 26847c77..a54428e3 100644 --- a/test/lib/gobgp.py +++ b/test/lib/gobgp.py @@ -398,6 +398,11 @@ class GoBGPContainer(BGPContainer): n['route-reflector'] = {'config': {'route-reflector-client': True, 'route-reflector-cluster-id': cluster_id}} + if info['addpath']: + n['add-paths'] = {'config' : {'receive': True, + 'send-max': 16}} + + if len(info.get('default-policy', [])) + len(info.get('policies', [])) > 0: n['apply-policy'] = {'config': {}} @@ -495,7 +500,7 @@ class GoBGPContainer(BGPContainer): for d in daemon: cmd = '/usr/bin/pkill {0} -SIGHUP'.format(d) self.local(cmd) - for v in self.routes.itervalues(): + for v in chain.from_iterable(self.routes.itervalues()): if v['rf'] == 'ipv4' or v['rf'] == 'ipv6': r = CmdBuffer(' ') r << 'gobgp global -a {0}'.format(v['rf']) -- cgit v1.2.3