summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-22 18:14:23 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-22 18:14:23 +0200
commit22e0e5201610aae7df0983ee62bb0eeb7ceb5017 (patch)
treebdf97492fa32b623ccd38ea4bcc13813f1f0713f /smoketest/scripts/cli
parentef8efbd468ad6490db12ec219e0940b204fcce76 (diff)
downloadvyos-1x-22e0e5201610aae7df0983ee62bb0eeb7ceb5017.tar.gz
vyos-1x-22e0e5201610aae7df0983ee62bb0eeb7ceb5017.zip
smoketest: bgp: T3565: test confederation configuration
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 0ed66657c..10adc06e1 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -611,6 +611,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'{family}', frrconfig)
self.assertIn(f'local-install {flowspec_int}', frrconfig)
+
def test_bgp_10_vrf_simple(self):
router_id = '127.0.0.3'
vrfs = ['red', 'green', 'blue']
@@ -644,5 +645,27 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
# zebra_route_map = f' ip protocol bgp route-map {route_map_in}'
# self.assertIn(zebra_route_map, vrfconfig)
+
+ def test_bgp_11_confederation(self):
+ router_id = '127.10.10.2'
+ confed_id = str(int(ASN) + 1)
+ confed_asns = '10 20 30 40'
+
+ self.cli_set(base_path + ['local-as', ASN])
+ self.cli_set(base_path + ['parameters', 'router-id', router_id])
+ self.cli_set(base_path + ['parameters', 'confederation', 'identifier', confed_id])
+ for asn in confed_asns.split():
+ self.cli_set(base_path + ['parameters', 'confederation', 'peers', asn])
+
+ # commit changes
+ self.cli_commit()
+
+ # Verify FRR bgpd configuration
+ frrconfig = self.getFRRconfig(f'router bgp {ASN}')
+ self.assertIn(f'router bgp {ASN}', frrconfig)
+ self.assertIn(f' bgp router-id {router_id}', frrconfig)
+ self.assertIn(f' bgp confederation identifier {confed_id}', frrconfig)
+ self.assertIn(f' bgp confederation peers {confed_asns}', frrconfig)
+
if __name__ == '__main__':
unittest.main(verbosity=2) \ No newline at end of file