summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-14 17:44:03 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-14 17:44:03 +0100
commitbbeafa5ed417f25ecbbc3627a346cb9294d66c68 (patch)
treee105fdb1008306fcf41670b129f564724b811597 /smoketest/scripts/cli/test_protocols_bgp.py
parent97a901dce9be808e918a719b4298e201a9a98ceb (diff)
downloadvyos-1x-bbeafa5ed417f25ecbbc3627a346cb9294d66c68.tar.gz
vyos-1x-bbeafa5ed417f25ecbbc3627a346cb9294d66c68.zip
bgp: T2315: add CLI options for addpath-tx-(all-paths|bestpath-per-AS)
* protocols bgp 65000 neighbor 192.0.2.1 address-family ipv4-unicast addpath-tx-all * protocols bgp 65000 neighbor 192.0.2.1 address-family ipv4-unicast addpath-tx-per-as * protocols bgp 65000 neighbor 2001:db8::1 address-family ipv6-unicast addpath-tx-all * protocols bgp 65000 neighbor 2001:db8::1 address-family ipv6-unicast addpath-tx-per-as
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bgp.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index ce643a247..1de51a1fc 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -49,6 +49,7 @@ neighbor_config = {
'route_map_in' : route_map_in,
'route_map_out': route_map_out,
'no_send_comm_ext' : '',
+ 'addpath_all' : '',
},
'192.0.2.2' : {
'remote_as' : '200',
@@ -81,6 +82,7 @@ neighbor_config = {
'route_map_in' : route_map_in,
'route_map_out': route_map_out,
'no_send_comm_std' : '',
+ 'addpath_per_as' : '',
},
'2001:db8::2' : {
'remote_as' : '456',
@@ -206,6 +208,11 @@ class TestProtocolsBGP(unittest.TestCase):
self.assertIn(f' no neighbor {peer} send-community', frrconfig)
if 'no_send_comm_ext' in peer_config:
self.assertIn(f' no neighbor {peer} send-community extended', frrconfig)
+ if 'addpath_all' in peer_config:
+ self.assertIn(f' neighbor {peer} addpath-tx-all-paths', frrconfig)
+ if 'addpath_per_as' in peer_config:
+ self.assertIn(f' neighbor {peer} addpath-tx-bestpath-per-AS', frrconfig)
+
def test_bgp_01_simple(self):
router_id = '127.0.0.1'
@@ -287,6 +294,10 @@ class TestProtocolsBGP(unittest.TestCase):
self.session.set(base_path + ['neighbor', peer, 'address-family', afi, 'disable-send-community', 'standard'])
if 'no_send_comm_ext' in peer_config:
self.session.set(base_path + ['neighbor', peer, 'address-family', afi, 'disable-send-community', 'extended'])
+ if 'addpath_all' in peer_config:
+ self.session.set(base_path + ['neighbor', peer, 'address-family', afi, 'addpath-tx-all'])
+ if 'addpath_per_as' in peer_config:
+ self.session.set(base_path + ['neighbor', peer, 'address-family', afi, 'addpath-tx-per-as'])
# commit changes
self.session.commit()
@@ -346,6 +357,10 @@ class TestProtocolsBGP(unittest.TestCase):
self.session.set(base_path + ['peer-group', peer_group, 'address-family', 'ipv4-unicast', 'disable-send-community', 'standard'])
if 'no_send_comm_ext' in config:
self.session.set(base_path + ['peer-group', peer_group, 'address-family', 'ipv4-unicast', 'disable-send-community', 'extended'])
+ if 'addpath_all' in config:
+ self.session.set(base_path + ['peer-group', peer_group, 'address-family', 'ipv4-unicast', 'addpath-tx-all'])
+ if 'addpath_per_as' in config:
+ self.session.set(base_path + ['peer-group', peer_group, 'address-family', 'ipv4-unicast', 'addpath-tx-per-as'])
# commit changes
self.session.commit()