summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCheeze_It <none@none.com>2022-10-06 21:51:31 -0700
committerCheeze_It <none@none.com>2022-10-06 21:51:31 -0700
commitb6e690f0f72e5ecba0fc9be1c16caf2788e6b29e (patch)
treed606dd01f19460e3138803aa4f506c5a12cc7ee7 /data
parent067cc12d0e6e52044df48f6f612cb4db1d4ad80c (diff)
downloadvyos-1x-b6e690f0f72e5ecba0fc9be1c16caf2788e6b29e.tar.gz
vyos-1x-b6e690f0f72e5ecba0fc9be1c16caf2788e6b29e.zip
ospf: T4707: Add OSPF segment routing for FRR
In this commit we add OSPF segment routing, smoke tests, handlers, FRR template changes, and CLI commands.
Diffstat (limited to 'data')
-rw-r--r--data/templates/frr/ospfd.frr.j227
1 files changed, 27 insertions, 0 deletions
diff --git a/data/templates/frr/ospfd.frr.j2 b/data/templates/frr/ospfd.frr.j2
index 427fc8be7..120135c23 100644
--- a/data/templates/frr/ospfd.frr.j2
+++ b/data/templates/frr/ospfd.frr.j2
@@ -181,6 +181,33 @@ router ospf {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
{% if refresh.timers is vyos_defined %}
refresh timer {{ refresh.timers }}
{% endif %}
+{% if segment_routing is vyos_defined %}
+ segment-routing on
+{% if segment_routing.maximum_label_depth is vyos_defined %}
+ segment-routing node-msd {{ segment_routing.maximum_label_depth }}
+{% 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 }}
+{% else %}
+ segment-routing global-block {{ segment_routing.global_block.low_label_value }} {{ segment_routing.global_block.high_label_value }}
+{% endif %}
+{% endif %}
+{% if segment_routing.prefix is vyos_defined %}
+{% for prefix, prefix_config in segment_routing.prefix.items() %}
+{% 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 %}
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endif %}
{% if timers.throttle.spf.delay is vyos_defined and timers.throttle.spf.initial_holdtime is vyos_defined and timers.throttle.spf.max_holdtime is vyos_defined %}
{# Timer values have default values #}
timers throttle spf {{ timers.throttle.spf.delay }} {{ timers.throttle.spf.initial_holdtime }} {{ timers.throttle.spf.max_holdtime }}