Parcourir la source

templates: Added bird and ripe templates (jinja2)

Sebastien Badia il y a 9 ans
Parent
commit
8ff6c9955a
3 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. 7 0
      templates/bird_v4.j2
  2. 7 0
      templates/bird_v6.j2
  3. 4 0
      templates/ripe.j2

+ 7 - 0
templates/bird_v4.j2

@@ -0,0 +1,7 @@
+protocol bgp {{ ix_name }}_{{ neighbor_as }} from tpl_{{ ix_name }}_peers {
+    neighbor {{ neighbor_ipv4 }} as {{ neighbor_as }};
+    description "{{ ix_name }} / {{ description }}";
+    {% if limit_ipv4 %}
+    import limit {{ limit_ipv4 }};
+    {% endif %}
+}

+ 7 - 0
templates/bird_v6.j2

@@ -0,0 +1,7 @@
+protocol bgp {{ ix_name }}_{{ neighbor_as }} from tpl_{{ ix_name }}_peers {
+    neighbor {{ neighbor_ipv6 }} as {{ neighbor_as }};
+    description "{{ ix_name }} / {{ description }}";
+    {% if limit_ipv6 %}
+    import limit {{ limit_ipv6 }};
+    {% endif %}
+}

+ 4 - 0
templates/ripe.j2

@@ -0,0 +1,4 @@
+remarks:
+remarks:    # {{ description }}
+export:     to AS{{ neighbor_as }} announce {{ export }}
+import:     from AS{{ neighbor_as }} action pref=100; accept {{ import }}