From 57dd8a257052bbfa76447ddf83ef2f7e5efa2744 Mon Sep 17 00:00:00 2001 From: Cheeze_It Date: Thu, 13 Oct 2022 20:33:28 -0700 Subject: T4739: ISIS segment routing being refactored --- data/templates/frr/isisd.frr.j2 | 14 ++---------- .../include/isis/high-low-label-value.xml.i | 26 ---------------------- .../include/isis/protocol-common-config.xml.i | 4 ++-- .../include/segment-routing-label-value.xml.i | 26 ++++++++++++++++++++++ smoketest/scripts/cli/test_protocols_isis.py | 8 +++---- 5 files changed, 34 insertions(+), 44 deletions(-) delete mode 100644 interface-definitions/include/isis/high-low-label-value.xml.i create mode 100644 interface-definitions/include/segment-routing-label-value.xml.i diff --git a/data/templates/frr/isisd.frr.j2 b/data/templates/frr/isisd.frr.j2 index 194dbcb07..8df1e9513 100644 --- a/data/templates/frr/isisd.frr.j2 +++ b/data/templates/frr/isisd.frr.j2 @@ -121,22 +121,12 @@ router isis VyOS {{ 'vrf ' + vrf if vrf is vyos_defined }} {% for prefix, prefix_config in segment_routing.prefix.items() %} {% if prefix_config.absolute is vyos_defined %} {% if prefix_config.absolute.value is vyos_defined %} - segment-routing prefix {{ prefix }} absolute {{ prefix_config.absolute.value }} -{% if prefix_config.absolute.explicit_null is vyos_defined %} - segment-routing prefix {{ prefix }} absolute {{ prefix_config.absolute.value }} explicit-null -{% elif prefix_config.absolute.no_php_flag is vyos_defined %} - segment-routing prefix {{ prefix }} absolute {{ prefix_config.absolute.value }} no-php-flag -{% endif %} + segment-routing prefix {{ prefix }} absolute {{ prefix_config.absolute.value }} {{ 'explicit-null' if prefix_config.absolute.explicit_null is vyos_defined }} {{ 'no-php-flag' if prefix_config.absolute.no_php_flag is vyos_defined }} {% endif %} {% endif %} {% if prefix_config.index is vyos_defined %} {% if prefix_config.index.value is vyos_defined %} - segment-routing prefix {{ prefix }} index {{ prefix_config.index.value }} -{% if prefix_config.index.explicit_null is vyos_defined %} - segment-routing prefix {{ prefix }} index {{ prefix_config.index.value }} explicit-null -{% elif prefix_config.index.no_php_flag is vyos_defined %} - segment-routing prefix {{ prefix }} index {{ prefix_config.index.value }} no-php-flag -{% endif %} + segment-routing prefix {{ prefix }} index {{ prefix_config.index.value }} {{ 'explicit-null' if prefix_config.index.explicit_null is vyos_defined }} {{ 'no-php-flag' if prefix_config.index.no_php_flag is vyos_defined }} {% endif %} {% endif %} {% endfor %} diff --git a/interface-definitions/include/isis/high-low-label-value.xml.i b/interface-definitions/include/isis/high-low-label-value.xml.i deleted file mode 100644 index f30b5af3a..000000000 --- a/interface-definitions/include/isis/high-low-label-value.xml.i +++ /dev/null @@ -1,26 +0,0 @@ - - - - MPLS label lower bound - - u32:16-1048575 - Label value (recommended minimum value: 100) - - - - - - - - - MPLS label upper bound - - u32:16-1048575 - 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 57ee19300..42bda7a80 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -238,7 +238,7 @@ Segment Routing Global Block label range - #include + #include @@ -246,7 +246,7 @@ Segment Routing Local Block label range - #include + #include diff --git a/interface-definitions/include/segment-routing-label-value.xml.i b/interface-definitions/include/segment-routing-label-value.xml.i new file mode 100644 index 000000000..05e1edd78 --- /dev/null +++ b/interface-definitions/include/segment-routing-label-value.xml.i @@ -0,0 +1,26 @@ + + + + MPLS label lower bound + + u32:16-1048575 + Label value (recommended minimum value: 300) + + + + + + + + + MPLS label upper bound + + u32:16-1048575 + Label value + + + + + + + diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index c26028253..d11d80a1f 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -263,10 +263,10 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.assertIn(f' isis bfd profile {bfd_profile}', tmp) def test_isis_07_segment_routing_configuration(self): - global_block_low = "100" - global_block_high = "199" - local_block_low = "200" - local_block_high = "299" + global_block_low = "300" + global_block_high = "399" + local_block_low = "400" + local_block_high = "499" interface = 'lo' maximum_stack_size = '5' prefix_one = '192.168.0.1/32' -- cgit v1.2.3