summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-10 21:12:55 +0100
committerChristian Breunig <christian@breunig.cc>2023-12-11 18:21:26 +0100
commitaf46fe54e56cf85d13b62ee771bec3d80f225ac5 (patch)
treebc2ed06230616dc60fa8a343311d85582e95617c /smoketest/scripts/cli/test_protocols_bgp.py
parentfedb2ee0c677dca23de24d9e70ff239e7556da28 (diff)
downloadvyos-1x-af46fe54e56cf85d13b62ee771bec3d80f225ac5.tar.gz
vyos-1x-af46fe54e56cf85d13b62ee771bec3d80f225ac5.zip
bgp: T591: add SRv6 support from FRR
set protocols bgp sid vpn per-vrf export '99' set protocols bgp srv6 locator 'foo' set protocols bgp system-as '100' Will generate in FRR config router bgp 100 no bgp ebgp-requires-policy no bgp default ipv4-unicast no bgp network import-check ! segment-routing srv6 locator foo exit sid vpn per-vrf export 99 exit
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 71e2142f9..97dab255e 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -1133,5 +1133,20 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' mpls bgp forwarding', frrconfig)
self.cli_delete(['interfaces', 'ethernet', interface, 'vrf'])
+ def test_bgp_24_srv6_sid(self):
+ locator_name = 'VyOS_foo'
+ sid = 'auto'
+
+ self.cli_set(base_path + ['srv6', 'locator', locator_name])
+ self.cli_set(base_path + ['sid', 'vpn', 'per-vrf', 'export', sid])
+
+ self.cli_commit()
+
+ frrconfig = self.getFRRconfig(f'router bgp {ASN}')
+ self.assertIn(f'router bgp {ASN}', frrconfig)
+ self.assertIn(f' segment-routing srv6', frrconfig)
+ self.assertIn(f' locator {locator_name}', frrconfig)
+ self.assertIn(f' sid vpn per-vrf export {sid}', frrconfig)
+
if __name__ == '__main__':
unittest.main(verbosity=2)