diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-07-28 20:16:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 20:16:26 +0200 |
| commit | 51a17eadc063423a80502462dba0b67cb4fe3496 (patch) | |
| tree | aa222a506a3025b2d843c9f62003fe2518424046 | |
| parent | 112169e27080829fd94dee86a392a539f2d34fe8 (diff) | |
| parent | 19d67d66b28b6ec76dd74cf48cee0bae84925e6b (diff) | |
| download | vyos-1x-51a17eadc063423a80502462dba0b67cb4fe3496.tar.gz vyos-1x-51a17eadc063423a80502462dba0b67cb4fe3496.zip | |
Merge pull request #4625 from fett0/T7639
isis: T7639: set SRv6 locator in ISIS
6 files changed, 52 insertions, 8 deletions
diff --git a/data/templates/frr/isisd.frr.j2 b/data/templates/frr/isisd.frr.j2 index eb14aade6..a4ea28942 100644 --- a/data/templates/frr/isisd.frr.j2 +++ b/data/templates/frr/isisd.frr.j2 @@ -130,6 +130,11 @@ advertise-passive-only {% if segment_routing.maximum_label_depth is vyos_defined %} segment-routing node-msd {{ segment_routing.maximum_label_depth }} {% endif %} +{% if segment_routing.srv6.locator is vyos_defined %} + segment-routing srv6 + locator {{ segment_routing.srv6.locator }} + exit +{% endif %} {% if segment_routing.global_block is vyos_defined %} {% if segment_routing.local_block is vyos_defined %} segment-routing global-block {{ segment_routing.global_block.low_label_value }} {{ segment_routing.global_block.high_label_value }} local-block {{ segment_routing.local_block.low_label_value }} {{ segment_routing.local_block.high_label_value }} diff --git a/interface-definitions/include/isis/protocol-common-config.xml.i b/interface-definitions/include/isis/protocol-common-config.xml.i index e0a7e62b6..e75466457 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -275,7 +275,7 @@ <children> <node name="global-block"> <properties> - <help>Segment Routing Global Block label range</help> + <help>Segment-Routing Global Block label range</help> </properties> <children> #include <include/segment-routing-label-value.xml.i> @@ -283,12 +283,31 @@ </node> <node name="local-block"> <properties> - <help>Segment Routing Local Block label range</help> + <help>Segment-Routing Local Block label range</help> </properties> <children> #include <include/segment-routing-label-value.xml.i> </children> </node> + <node name="srv6"> + <properties> + <help>Segment-Routing SRv6 configuration</help> + </properties> + <children> + <leafNode name="locator"> + <properties> + <help>Specify SRv6 locator</help> + <valueHelp> + <format>txt</format> + <description>SRv6 locator name</description> + </valueHelp> + <constraint> + #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i> + </constraint> + </properties> + </leafNode> + </children> + </node> <leafNode name="maximum-label-depth"> <properties> <help>Maximum MPLS labels allowed for this router</help> diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index f597be64e..571ccbded 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -680,7 +680,7 @@ <children> <node name="global-block"> <properties> - <help>Segment Routing Global Block label range</help> + <help>Segment-Routing Global Block label range</help> </properties> <children> #include <include/segment-routing-label-value.xml.i> @@ -688,7 +688,7 @@ </node> <node name="local-block"> <properties> - <help>Segment Routing Local Block label range</help> + <help>Segment-Routing Local Block label range</help> </properties> <children> #include <include/segment-routing-label-value.xml.i> diff --git a/interface-definitions/protocols_segment-routing.xml.in b/interface-definitions/protocols_segment-routing.xml.in index 688b253b6..075245936 100644 --- a/interface-definitions/protocols_segment-routing.xml.in +++ b/interface-definitions/protocols_segment-routing.xml.in @@ -4,13 +4,13 @@ <children> <node name="segment-routing" owner="${vyos_conf_scripts_dir}/protocols_segment-routing.py"> <properties> - <help>Segment Routing</help> + <help>Segment-Routing (SR) parameters</help> <priority>900</priority> </properties> <children> <tagNode name="interface"> <properties> - <help>Interface specific Segment Routing options</help> + <help>Interface specific Segment-Routing options</help> <completionHelp> <script>${vyos_completion_dir}/list_interfaces</script> </completionHelp> @@ -63,7 +63,7 @@ <children> <tagNode name="locator"> <properties> - <help>Segment Routing SRv6 locator</help> + <help>Segment-Routing SRv6 locators configuration</help> <constraint> #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i> </constraint> diff --git a/interface-definitions/service_config-sync.xml.in b/interface-definitions/service_config-sync.xml.in index af4e8ed51..948777c68 100644 --- a/interface-definitions/service_config-sync.xml.in +++ b/interface-definitions/service_config-sync.xml.in @@ -337,7 +337,7 @@ </leafNode> <leafNode name="segment-routing"> <properties> - <help>Segment Routing</help> + <help>Segment-Routing (SR) parameters</help> <valueless/> </properties> </leafNode> diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index 18f475fa9..54f4e513b 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -418,5 +418,25 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.assertIn(f' net {net}', tmp) self.assertIn(f' topology {topology}', tmp) + def test_isis_11_srv6(self): + locator = "TEST" + interface = 'lo' + + self.cli_set(base_path + ['net', net]) + self.cli_set(base_path + ['interface', interface]) + self.cli_set(base_path + ['segment-routing', 'srv6', 'locator', locator]) + + # Commit main ISIS changes + self.cli_commit() + + # Verify main ISIS changes + tmp = self.getFRRconfig(f'router isis {domain}', endsection='^exit') + self.assertIn(f' net {net}', tmp) + self.assertIn(f' segment-routing srv6', tmp) + self.assertIn(f' locator {locator}', tmp) + + # Commit for isis + self.cli_commit() + if __name__ == '__main__': unittest.main(verbosity=2) |
