Skip to content

Commit

Permalink
code readability pep8 style
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbuchmann committed Feb 4, 2021
1 parent 1bb9df3 commit 4603e2b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% for tenant in tenants | arista.avd.natural_sort if tenant in leaf.filter_tenants or "all" in leaf.filter_tenants %}
{% if tenants[tenant].vrfs is defined %}
{% for vrf in tenants[tenant].vrfs | arista.avd.natural_sort if leaf.vrfs is not none and vrf in leaf.vrfs %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi | int in leaf.svis %}
{% if tenants[tenant].vrfs[vrf].svis[svi].igmp_snooping is defined %}
{% set igmp_snooping.configured = true %}
{% endif %}
Expand All @@ -35,7 +35,7 @@
{% if tenants[tenant].vrfs is defined %}
{% for vrf in tenants[tenant].vrfs | arista.avd.natural_sort if leaf.vrfs is not none and vrf in leaf.vrfs %}
{# Tenant VLANs w/SVIs #}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi | int in leaf.svis %}
{# Detect if a svi_profile exists #}
{# If exists, create a shortpath to access profile data #}
{% set per_svi = namespace() %}
Expand All @@ -52,7 +52,7 @@
{# IGMP SNOOPING detection #}
{% if per_svi.values.igmp_snooping_enabled is defined or profile.values.igmp_snooping_enabled is defined %}
{% if leaf.igmp_snooping_enabled == true %}
{{ svi|int }}:
{{ svi | int }}:
enabled: {{ per_svi.values.igmp_snooping_enabled if per_svi.values.igmp_snooping_enabled is defined else profile.values.igmp_snooping_enabled|default(true) }}
{% endif %}
{% endif %}
Expand All @@ -66,7 +66,7 @@
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort %}
{% if tenants[tenant].l2vlans[l2vlan].igmp_snooping_enabled is defined %}
{% if tenants[tenant].l2vlans[l2vlan].igmp_snooping_enabled == false and leaf.igmp_snooping_enabled == true %}
{{ l2vlan|int }}:
{{ l2vlan | int }}:
enabled: false
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
redistribute_routes:
- learned
{% set vlan_range = [] %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi | int in leaf.svis %}
{% do vlan_range.append( svi| int ) %}
{% endfor %}
vlan: {{ vlan_range | arista.avd.list_compress }}
{% endfor %}
{% endif %}
{% if tenants[tenant].l2vlans is defined %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan|int in leaf.vlans %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan | int in leaf.vlans %}
{% set l2vlan_int = l2vlan | int %}
{% if tenants[tenant].l2vlans[l2vlan].vni_override is defined %}
{% set vni = tenants[tenant].l2vlans[l2vlan].vni_override %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## {{ tenant }} ##
{% if tenants[tenant].vrfs is defined %}
{% for vrf in tenants[tenant].vrfs | arista.avd.natural_sort if leaf.vrfs is not none and vrf in leaf.vrfs %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if svi | int in leaf.svis %}
{% set svi_int = svi | int %}
{% if tenants[tenant].vrfs[vrf].svis[svi].vni_override is defined %}
{% set vni = tenants[tenant].vrfs[vrf].svis[svi].vni_override %}
Expand All @@ -23,7 +23,7 @@
{% endfor %}
{% endif %}
{% if tenants[tenant].l2vlans is defined %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan|int in leaf.vlans %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan | int in leaf.vlans %}
{% set l2vlan_int = l2vlan | int %}
{% if tenants[tenant].l2vlans[l2vlan].vni_override is defined %}
{% set vni = tenants[tenant].l2vlans[l2vlan].vni_override %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if loop.first %}
## {{ tenant }} ##
{% endif %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if svi | int in leaf.svis %}
{# Detect if a svi_profile exists #}
{# If exists, create a shortpath to access profile data #}
{% set per_svi = namespace() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if tenants[tenant].vrfs is defined %}
{% for vrf in tenants[tenant].vrfs | arista.avd.natural_sort if leaf.vrfs is not none and vrf in leaf.vrfs %}
{# Tenant VLANs w/SVIs #}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi | int in leaf.svis %}
{{ svi| int }}:
tenant: {{ tenant }}
name: {{ tenants[tenant].vrfs[vrf].svis[svi].name }}
Expand All @@ -21,7 +21,7 @@
{% endif %}
{# Tenant L2 VLANs #}
{% if tenants[tenant].l2vlans is defined %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan|int in leaf.vlans %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan | int in leaf.vlans %}
{{ l2vlan| int }}:
tenant: {{ tenant }}
name: {{ tenants[tenant].l2vlans[l2vlan].name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## {{ tenant }} ##
{% if tenants[tenant].vrfs is defined %}
{% for vrf in tenants[tenant].vrfs | arista.avd.natural_sort if leaf.vrfs is not none and vrf in leaf.vrfs %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi|int in leaf.svis %}
{% for svi in tenants[tenant].vrfs[vrf].svis | arista.avd.natural_sort if leaf.svis is not none and svi | int in leaf.svis %}
{% set svi_int = svi | int %}
{{ svi_int }}:
{% if tenants[tenant].vrfs[vrf].svis[svi].vni_override is defined %}
Expand All @@ -25,7 +25,7 @@
{% endfor %}
{% endif %}
{% if tenants[tenant].l2vlans is defined %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan|int in leaf.vlans %}
{% for l2vlan in tenants[tenant].l2vlans | arista.avd.natural_sort if leaf.vlans is not none and l2vlan | int in leaf.vlans %}
{% set l2vlan_int = l2vlan | int %}
{{ l2vlan_int }}:
{% if tenants[tenant].l2vlans[l2vlan].vni_override is defined %}
Expand Down

0 comments on commit 4603e2b

Please sign in to comment.