summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-12 13:44:20 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-12 13:46:08 +0100
commitab27bb6edd44e5ab49c1bab28c9a6bc2cafb2e36 (patch)
tree55909600a2f1d55fe9148f15782d2fc0a0d8c8a9 /smoketest/scripts/cli
parent6fab523565015fd4da5d7295bad684cb969e5d12 (diff)
downloadvyos-1x-ab27bb6edd44e5ab49c1bab28c9a6bc2cafb2e36.tar.gz
vyos-1x-ab27bb6edd44e5ab49c1bab28c9a6bc2cafb2e36.zip
bgp: smoketest: add proper peer-group assignment tests
In the past a peer-group was only assigned to the BGP process but not bound to any neighbor. This has been changed.
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index a2bcd0685..22cc3785f 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -69,6 +69,7 @@ neighbor_config = {
'passive' : '',
'multi_hop' : '5',
'update_src' : 'lo',
+ 'peer_group' : 'foo',
},
'2001:db8::1' : {
'cap_dynamic' : '',
@@ -86,6 +87,7 @@ neighbor_config = {
'route_map_out': route_map_out,
'no_send_comm_std' : '',
'addpath_per_as' : '',
+ 'peer_group' : 'foo-bar',
},
'2001:db8::2' : {
'remote_as' : '456',
@@ -96,6 +98,7 @@ neighbor_config = {
'pfx_list_in' : prefix_list_in6,
'pfx_list_out' : prefix_list_out6,
'no_send_comm_ext' : '',
+ 'peer_group' : 'foo-bar_baz',
},
}
@@ -109,7 +112,7 @@ peer_group_config = {
'cap_over' : '',
'ttl_security': '5',
},
- 'bar' : {
+ 'foo-bar' : {
'description' : 'foo peer bar group',
'remote_as' : '200',
'shutdown' : '',
@@ -120,6 +123,7 @@ peer_group_config = {
'no_send_comm_ext' : '',
},
'baz' : {
+ 'foo-bar_baz' : {
'bfd_profile' : bfd_profile,
'cap_dynamic' : '',
'cap_ext_next' : '',
@@ -417,6 +421,10 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
if 'addpath_per_as' in config:
self.cli_set(base_path + ['peer-group', peer_group, 'address-family', 'ipv4-unicast', 'addpath-tx-per-as'])
+ for peer, peer_config in neighbor_config.items():
+ if 'peer_group' in peer_config:
+ self.cli_set(base_path + ['neighbor', peer, 'peer-group', peer_config['peer_group']])
+
# commit changes
self.cli_commit()
@@ -428,6 +436,10 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' neighbor {peer_group} peer-group', frrconfig)
self.verify_frr_config(peer, peer_config, frrconfig)
+ for peer, peer_config in neighbor_config.items():
+ if 'peer_group' in peer_config:
+ self.assertIn(f' neighbor {peer} peer-group {peer_config["peer_group"]}', frrconfig)
+
def test_bgp_04_afi_ipv4(self):
networks = {