Skip to content

Commit

Permalink
Fix append printing None
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Sep 22, 2024
1 parent 8aa02be commit bfb2223
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ubiquiti-edge-router.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

{#- Analyse tags #}
{%- for tag in intf.tags.all() %}
{%- if tag.name == 'protocol:rip' %}{{ rip_interfaces.append(intf.name) }}{% endif %}
{%- if tag.name == 'protocol:ripng' %}{{ ripng_interfaces.append(intf.name) }}{% endif %}
{%- if tag.name == 'protocol:rip' %}{{ rip_interfaces.append(intf.name) or "" }}{% endif %}
{%- if tag.name == 'protocol:ripng' %}{{ ripng_interfaces.append(intf.name) or "" }}{% endif %}
{%- endfor %}

{#- Loopback #}
Expand Down Expand Up @@ -116,22 +116,22 @@ set protocols bgp {{ asn }} neighbor {{ neighbor }} address-family ipv6-unicast
{%- endif %}

{%- if sess.prefix_list_in %}
{{- prefix_list_used.append(sess.prefix_list_in) }}
{{- prefix_list_used.append(sess.prefix_list_in) or "" }}
set protocols bgp {{ asn }} neighbor {{ neighbor }} address-family ipv6-unicast prefix-list import {{ sess.prefix_list_in.name }}
{%- endif %}
{%- if sess.prefix_list_out %}
{{- prefix_list_used.append(sess.prefix_list_out) }}
{{- prefix_list_used.append(sess.prefix_list_out) or "" }}
set protocols bgp {{ asn }} neighbor {{ neighbor }} address-family ipv6-unicast prefix-list export {{ sess.prefix_list_in.name }}
{%- endif %}

{%- else %}

{%- if sess.prefix_list_in %}
{{- prefix_list_used.append(sess.prefix_list_in) }}
{{- prefix_list_used.append(sess.prefix_list_in) or "" }}
set protocols bgp {{ asn }} neighbor {{ neighbor }} prefix-list import {{ sess.prefix_list_in.name }}
{%- endif %}
{%- if sess.prefix_list_out %}
{{- prefix_list_used.append(sess.prefix_list_out) }}
{{- prefix_list_used.append(sess.prefix_list_out) or "" }}
set protocols bgp {{ asn }} neighbor {{ neighbor }} prefix-list export {{ sess.prefix_list_in.name }}
{%- endif %}

Expand Down

0 comments on commit bfb2223

Please sign in to comment.