summaryrefslogtreecommitdiff
path: root/data/templates/frr/isis.frr.tmpl
blob: 1e651898bbb9bc08ee8458c85571ead8fe0cd030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
!
router isis VyOS {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
 net {{ net }}
{% if dynamic_hostname is defined %}
 hostname dynamic
{% endif %}
{% if purge_originator is defined %}
 purge-originator
{% endif %}
{% if set_attached_bit is defined %}
 set-attached-bit
{% endif %}
{% if set_overload_bit is defined %}
 set-overload-bit
{% endif %}
{% if domain_password is defined and domain_password is not none %}
{%   if domain_password.md5 is defined and domain_password.md5 is not none %}
 domain-password md5 {{ domain_password.plaintext_password }}
{%   elif domain_password.plaintext_password is defined and domain_password.plaintext_password is not none %}
 domain-password clear {{ domain_password.plaintext_password }}
{%   endif %}
{% endif %}
{% if log_adjacency_changes is defined %}
 log-adjacency-changes
{% endif %}
{% if lsp_gen_interval is defined and lsp_gen_interval is not none %}
 lsp-gen-interval {{ lsp_gen_interval }}
{% endif %}
{% if lsp_mtu is defined and lsp_mtu is not none %}
 lsp-mtu {{ lsp_mtu }}
{% endif %}
{% if lsp_refresh_interval is defined and lsp_refresh_interval is not none %}
 lsp-refresh-interval  {{ lsp_refresh_interval }}
{% endif %}
{% if max_lsp_lifetime is defined and max_lsp_lifetime is not none %}
 max-lsp-lifetime {{ max_lsp_lifetime }}
{% endif %}
{% if spf_interval is defined and spf_interval is not none %}
 spf-interval {{ spf_interval }}
{% endif %}
{% if traffic_engineering is defined and traffic_engineering is not none %}
{%   if traffic_engineering.enable is defined %}
 mpls-te on
{%   endif %}
{%   if traffic_engineering.address is defined %}
 mpls-te router-address {{ traffic_engineering.address }}
{%   endif %}
{%   if traffic_engineering.inter_as is defined %}
{%     if traffic_engineering.inter_as.level_1 is defined %}
 mpls-te inter-as level-1
{%     endif %}
{%     if traffic_engineering.inter_as.level_1_2 is defined %}
 mpls-te inter-as level-1-2
{%     endif %}
{%     if traffic_engineering.inter_as.level_2 is defined %}
 mpls-te inter-as level-2-only
{%     endif %}
{%   else %}
 mpls-te inter-as
{%   endif %}
{% endif %}
{% if segment_routing is defined %}
{%   if segment_routing.enable is defined %}
 segment-routing on
{%   endif %}
{%   if segment_routing.maximum_label_depth is defined %}
 segment-routing node-msd {{ segment_routing.maximum_label_depth }}
{%   endif %}
{%   if segment_routing.global_block is defined %}
 segment-routing global-block {{ segment_routing.global_block.low_label_value }} {{ segment_routing.global_block.high_label_value }}
{%   endif %}
{%   if segment_routing.local_block is defined %}
 segment-routing local-block {{ segment_routing.global_block.low_label_value }} {{ segment_routing.local_block.high_label_value }}
{%   endif %}
{%   if segment_routing.prefix is defined %}
{%     for prefixes in segment_routing.prefix %}
{%       if segment_routing.prefix[prefixes].absolute is defined %}
{%         if segment_routing.prefix[prefixes].absolute.value is defined %}
 segment-routing prefix {{ prefixes }} absolute {{ segment_routing.prefix[prefixes].absolute.value }}
{%           if segment_routing.prefix[prefixes].absolute.explicit_null is defined %}
 segment-routing prefix {{ prefixes }} absolute {{ segment_routing.prefix[prefixes].absolute.value }} explicit-null
{%           endif %}
{%           if segment_routing.prefix[prefixes].absolute.no_php_flag is defined %}
 segment-routing prefix {{ prefixes }} absolute {{ segment_routing.prefix[prefixes].absolute.value }} no-php-flag
{%           endif %}
{%         endif %}
{%         if segment_routing.prefix[prefixes].index is defined %}
{%           if segment_routing.prefix[prefixes].index.value is defined %}
 segment-routing prefix {{ prefixes }} index {{ segment_routing.prefix[prefixes].index.value }}
{%             if segment_routing.prefix[prefixes].index.explicit_null is defined %}
 segment-routing prefix {{ prefixes }} index {{ segment_routing.prefix[prefixes].index.value }} explicit-null
{%             endif %}
{%             if segment_routing.prefix[prefixes].index.no_php_flag is defined %}
 segment-routing prefix {{ prefixes }} index {{ segment_routing.prefix[prefixes].index.value }} no-php-flag
{%             endif %}
{%           endif %}
{%         endif %}
{%       endif %}
{%     endfor %}
{%   endif %}
{% endif %}
{% if spf_delay_ietf is defined and spf_delay_ietf.init_delay is defined and spf_delay_ietf.init_delay is not none %}
 spf-delay-ietf init-delay {{ spf_delay_ietf.init_delay }}
{% endif %}
{% if area_password is defined and area_password is not none %}
{%   if area_password.md5 is defined and area_password.md5 is not none %}
 area-password md5 {{ area_password.md5 }}
{%   elif area_password.plaintext_password is defined and area_password.plaintext_password is not none %}
 area-password clear {{ area_password.plaintext_password }}
{%   endif %}
{% endif %}
{% if default_information is defined and default_information.originate is defined and default_information.originate is not none %}
{%   for afi, afi_config in default_information.originate.items() %}
{%     for level, level_config in afi_config.items() %}
 default-information originate {{ afi }} {{ level | replace('_', '-') }} {{ 'always' if level_config.always is defined }} {{ 'route-map ' ~ level_config.route_map if level_config.route_map is defined }} {{ 'metric ' ~ level_config.metric if level_config.metric is defined }}
{%     endfor %}
{%   endfor %}
{% endif %}
{% if redistribute is defined and redistribute.ipv4 is defined and redistribute.ipv4 is not none %}
{%   for protocol in redistribute.ipv4 %}
{%     for level, level_config in redistribute.ipv4[protocol].items() %}
{%       if level_config.metric is defined and level_config.metric is not none %}
 redistribute ipv4 {{ protocol }} {{ level | replace('_', '-') }} metric {{ level_config.metric }}
{%       elif level_config.route_map is defined and level_config.route_map is not none %}
 redistribute ipv4 {{ protocol }} {{ level | replace('_', '-') }} route-map {{ level_config.route_map }}
{%       else %}
 redistribute ipv4 {{ protocol }} {{ level | replace('_', '-') }}
{%       endif %}
{%     endfor %}
{%   endfor %}
{% endif %}
{% if level is defined and level is not none %}
{%   if level == 'level-2'  %}
 is-type level-2-only
{%   else %}
 is-type {{ level }}
{%   endif %}
{% endif %}
!
{% if interface is defined and interface is not none %}
{%   for iface, iface_config in interface.items() %}
interface {{ iface }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
 ip router isis VyOS
 ipv6 router isis VyOS
{%     if iface_config.bfd is defined %}
 isis bfd
{%     endif %}
{%     if iface_config.network is defined and iface_config.network.point_to_point is defined %}
 isis network point-to-point
{%     endif %}
{%     if iface_config.circuit_type is defined %}
 isis circuit-type {{ iface_config.circuit_type }}
{%     endif %}
{%     if iface_config.hello_interval is defined and iface_config.hello_interval is not none %}
 isis hello-interval {{ iface_config.hello_interval }}
{%     endif %}
{%     if iface_config.hello_multiplier is defined and iface_config.hello_multiplier is not none %}
 isis hello-multiplier {{ iface_config.hello_multiplier }}
{%     endif %}
{%     if iface_config.hello_padding is defined %}
 isis hello padding
{%     endif %}
{%     if iface_config.metric is defined and iface_config.metric is not none %}
 isis metric {{ iface_config.metric }}
{%     endif %}
{%     if iface_config.passive is defined %}
 isis passive
{%     endif %}
{%     if iface_config.password is defined and iface_config.password.plaintext_password is defined and iface_config.password.plaintext_password is not none %}
 isis password clear {{ iface_config.password.plaintext_password }}
{%     endif %}
{%     if iface_config.priority is defined and iface_config.priority is not none %}
 isis priority {{ iface_config.priority }}
{%     endif %}
{%     if iface_config.psnp_interval is defined and iface_config.psnp_interval is not none %}
 isis psnp-interval {{ iface_config.psnp_interval }}
{%     endif %}
{%     if iface_config.no_three_way_handshake is defined %}
 no isis three-way-handshake
{%     endif %}
{%   endfor %}
{% endif %}
!