diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2017-05-05 12:30:32 -0400 |
---|---|---|
committer | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2017-05-10 08:15:00 +0000 |
commit | 9b9a65d410bbf35730f4970932c7688203e096b1 (patch) | |
tree | 5a539d40d6190c20341ae7e5c4827e2c0bd532e2 /test/scenario_test/aspath_test.py | |
parent | 1f053c25c423c79471fbe1d5fb6c618bb67409df (diff) |
*: support replace-peer-as (aka as-override)
we use the term replace-peer-as instead of as-override
since openconfig is using it.
cli
```
$ gobgp n add <neighbor-addr> as <asn> replace-peer-as
```
config
```
neighbor:
config:
peer-as: <asn>
neighbor-address: <neighbor-addr>
as-path-options:
config:
replace-peer-as: true
```
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/aspath_test.py')
-rw-r--r-- | test/scenario_test/aspath_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/scenario_test/aspath_test.py b/test/scenario_test/aspath_test.py index 5539cfde..f6087c46 100644 --- a/test/scenario_test/aspath_test.py +++ b/test/scenario_test/aspath_test.py @@ -115,6 +115,21 @@ class GoBGPTestBase(unittest.TestCase): time.sleep(1) self.assertTrue(g4.get_global_rib()[0]['paths'][0]['aspath'] == [100, 100, 100, 100]) + def test_07_check_replace_peer_as(self): + g5 = GoBGPContainer(name='g5', asn=100, router_id='192.168.0.6', + ctn_image_name=parser_option.gobgp_image, + log_level=parser_option.gobgp_log_level) + time.sleep(g5.run()) + + g4 = self.ctns['g4'] + g4.add_peer(g5, replace_peer_as=True) + g5.add_peer(g4) + + g4.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=g5) + + time.sleep(1) + self.assertTrue(g5.get_global_rib()[0]['paths'][0]['aspath'] == [200, 200, 200, 200, 200]) + if __name__ == '__main__': output = local("which docker 2>&1 > /dev/null ; echo $?", capture=True) |