diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-10-07 07:36:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 07:36:19 +0200 |
commit | 203d60217e7b03818c214b0da89962c9a111a1c0 (patch) | |
tree | 7cff9c5b082cdf37f4eb9ed6d58a4907a05bb33f /data/templates | |
parent | 4608001b073f10310b8753c4d7d850af3ec001fb (diff) | |
parent | b6e690f0f72e5ecba0fc9be1c16caf2788e6b29e (diff) | |
download | vyos-1x-203d60217e7b03818c214b0da89962c9a111a1c0.tar.gz vyos-1x-203d60217e7b03818c214b0da89962c9a111a1c0.zip |
Merge pull request #1572 from Cheeze-It/current
ospf: T4707: Add OSPF segment routing for FRR
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr/ospfd.frr.j2 | 27 |
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 }} |