diff options
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/base.py | 5 | ||||
-rw-r--r-- | test/lib/gobgp.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/lib/base.py b/test/lib/base.py index 86a339c7..907050bc 100644 --- a/test/lib/base.py +++ b/test/lib/base.py @@ -311,7 +311,7 @@ class BGPContainer(Container): flowspec=False, bridge='', reload_config=True, as2=False, graceful_restart=None, local_as=None, prefix_limit=None, v6=False, llgr=None, vrf='', interface='', allow_as_in=0, - remove_private_as=None): + remove_private_as=None, replace_peer_as=False): neigh_addr = '' local_addr = '' it = itertools.product(self.ip_addrs, peer.ip_addrs) @@ -354,7 +354,8 @@ class BGPContainer(Container): 'llgr': llgr, 'vrf': vrf, 'allow_as_in': allow_as_in, - 'remove_private_as': remove_private_as} + 'remove_private_as': remove_private_as, + 'replace_peer_as': replace_peer_as} 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 92e19f07..26847c77 100644 --- a/test/lib/gobgp.py +++ b/test/lib/gobgp.py @@ -361,6 +361,8 @@ class GoBGPContainer(BGPContainer): n['as-path-options'] = {'config': {}} if info['allow_as_in'] > 0: n['as-path-options']['config']['allow-own-as'] = info['allow_as_in'] + if info['replace_peer_as']: + n['as-path-options']['config']['replace-peer-as'] = info['replace_peer_as'] if ':' in info['local_addr']: n['transport']['config']['local-address'] = info['local_addr'].split('/')[0] |