diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-17 20:01:22 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-05 04:57:27 +0900 |
commit | f48c4deaa19ca8b36d87a0d71776bc29b7e17ebe (patch) | |
tree | 169474793f5afba6db03d9743a3ab747b6a0d7a7 /test/lib/gobgp.py | |
parent | 87f0b0bdc52945ae98ef6d44b7f118216bde95ca (diff) |
test: add addpath_test.py
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/lib/gobgp.py')
-rw-r--r-- | test/lib/gobgp.py | 7 |
1 files changed, 6 insertions, 1 deletions
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']) |