diff options
Diffstat (limited to 'test/lib/exabgp.py')
-rw-r--r-- | test/lib/exabgp.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lib/exabgp.py b/test/lib/exabgp.py index dbf8f023..efc39ac1 100644 --- a/test/lib/exabgp.py +++ b/test/lib/exabgp.py @@ -19,6 +19,7 @@ import time from fabric import colors from fabric.api import local +from itertools import chain from lib.base import ( BGPContainer, @@ -92,7 +93,10 @@ class ExaBGPContainer(BGPContainer): if info['passive']: cmd << ' passive;' - routes = [r for r in self.routes.values() if r['rf'] == 'ipv4' or r['rf'] == 'ipv6'] + if info['addpath']: + cmd << ' add-path send/receive;' + + routes = [r for r in chain.from_iterable(self.routes.itervalues()) if r['rf'] == 'ipv4' or r['rf'] == 'ipv6'] if len(routes) > 0: cmd << ' static {' @@ -114,11 +118,13 @@ class ExaBGPContainer(BGPContainer): r << 'extended-community [{0}]'.format(route['extended-community']) if route['attr']: r << 'attribute [ {0} ]'.format(route['attr']) + if route['identifier']: + r << 'path-information {0}'.format(route['identifier']) cmd << '{0};'.format(str(r)) cmd << ' }' - routes = [r for r in self.routes.itervalues() if 'flowspec' in r['rf']] + routes = [r for r in chain.from_iterable(self.routes.itervalues()) if 'flowspec' in r['rf']] if len(routes) > 0: cmd << ' flow {' for route in routes: |