summaryrefslogtreecommitdiff
path: root/data/templates/frr/ldpd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-17 15:59:53 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-17 15:59:53 +0200
commit2411cf35b3cf8a4b11a714ff426e98bc1872e3c3 (patch)
tree9252b85867c15f1fa208b56d2bfbf40726508e81 /data/templates/frr/ldpd.frr.tmpl
parent7ba82de32e258c9e41ba69471d35d2dd28aa044b (diff)
downloadvyos-1x-2411cf35b3cf8a4b11a714ff426e98bc1872e3c3.tar.gz
vyos-1x-2411cf35b3cf8a4b11a714ff426e98bc1872e3c3.zip
frr: combine all templates in frr directory
Diffstat (limited to 'data/templates/frr/ldpd.frr.tmpl')
-rw-r--r--data/templates/frr/ldpd.frr.tmpl58
1 files changed, 58 insertions, 0 deletions
diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl
new file mode 100644
index 000000000..bbff88ae5
--- /dev/null
+++ b/data/templates/frr/ldpd.frr.tmpl
@@ -0,0 +1,58 @@
+!
+{% if mpls_ldp -%}
+mpls ldp
+{% if old_router_id -%}
+no router-id {{ old_router_id }}
+{% endif -%}
+{% if router_id -%}
+router-id {{ router_id }}
+{% endif -%}
+{% for neighbor_id in old_ldp.neighbors -%}
+no neighbor {{neighbor_id}} password {{old_ldp.neighbors[neighbor_id].password}}
+{% endfor -%}
+{% for neighbor_id in ldp.neighbors -%}
+neighbor {{neighbor_id}} password {{ldp.neighbors[neighbor_id].password}}
+{% endfor -%}
+address-family ipv4
+label local allocate host-routes
+{% if old_ldp.d_transp_ipv4 -%}
+no discovery transport-address {{ old_ldp.d_transp_ipv4 }}
+{% endif -%}
+{% if ldp.d_transp_ipv4 -%}
+discovery transport-address {{ ldp.d_transp_ipv4 }}
+{% endif -%}
+{% for interface in old_ldp.interfaces -%}
+no interface {{interface}}
+{% endfor -%}
+{% for interface in ldp.interfaces -%}
+interface {{interface}}
+{% endfor -%}
+!
+!
+exit-address-family
+!
+{% if ldp.d_transp_ipv6 -%}
+address-family ipv6
+label local allocate host-routes
+{% if old_ldp.d_transp_ipv6 -%}
+no discovery transport-address {{ old_ldp.d_transp_ipv6 }}
+{% endif -%}
+{% if ldp.d_transp_ipv6 -%}
+discovery transport-address {{ ldp.d_transp_ipv6 }}
+{% endif -%}
+{% for interface in old_ldp.interfaces -%}
+no interface {{interface}}
+{% endfor -%}
+{% for interface in ldp.interfaces -%}
+interface {{interface}}
+{% endfor -%}
+!
+exit-address-family
+{% else -%}
+no address-family ipv6
+{% endif -%}
+!
+{% else -%}
+no mpls ldp
+{% endif -%}
+!