Bläddra i källkod

Use tags exposed by NACL/Netbox instead of snowflake

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 2 år sedan
förälder
incheckning
dbe9e6730d
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      bird/l3-access.conf
  2. 1 1
      bird/radv.conf
  3. 1 1
      network/interfaces/interfaces.tmpl

+ 1 - 1
bird/l3-access.conf

@@ -5,7 +5,7 @@
 protocol direct l3_access {
 {%- for iface in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces')|sort %}
   {%- set config = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces:' ~ iface) %}
-  {%- if salt['ffho.re_search']('^vlan(3\d\d|29\d\d)$', iface) or 'l3-access' in config.get ('_opts', []) %}
+  {%- if salt['ffho.re_search']('^vlan(3\d\d|29\d\d)$', iface) or 'l3-access' in config.get ('tags', []) %}
 	interface "{{ iface }}";
   {%- endif %}
 {%- endfor %}

+ 1 - 1
bird/radv.conf

@@ -24,7 +24,7 @@ protocol radv {
 {% endfor %}
 {%- endif %}
 {%- for iface, iface_config in node_config.get ('ifaces').items ()|sort %}
-  {%- if salt['ffho.re_search']('^vlan(3\d\d|39\d\d)$', iface) or "l3-access" in iface_config.get ('_opts', []) %}
+  {%- if salt['ffho.re_search']('^vlan(3\d\d|39\d\d)$', iface) or "l3-access" in iface_config.get ('tags', []) %}
     {%- set v6_ip = salt['ffho_net.get_node_iface_ips'](node_config, iface, with_mask = True)['v6'][0] %}
     {%- set prefix = salt['ffho_net.get_network_address'](v6_ip, with_prefixlen = True) %}
 	# {{ iface_config.get ('desc', 'L3-Access') }}

+ 1 - 1
network/interfaces/interfaces.tmpl

@@ -77,7 +77,7 @@ iface {{ interface }}
     {%- set argument = config.get (keyword) %}
     {%- if argument is none %}
     {%- elif keyword.startswith ("_") %}
-    {%- elif keyword in [ 'auto', 'batman', 'bond', 'bridge', 'driver', 'mac', 'method', 'vlan', 'vxlan', 'desc', 'prefixes', 'status', 'tagged_vlans', 'urpf', 'has_gateway', 'wireguard' ] %}
+    {%- elif keyword in [ 'auto', 'batman', 'bond', 'bridge', 'driver', 'mac', 'method', 'vlan', 'vxlan', 'desc', 'prefixes', 'status', 'tagged_vlans', 'tags', 'urpf', 'has_gateway', 'wireguard' ] %}
     {%- elif argument is string or argument is number %}
 	{{ keyword }} {{ argument }}
     {%- else %}