{#
# Define Bridge (BVI) for non-routed VLANs
#}
{% for vname,vdata in vlans.items() if vdata.mode is defined and vdata.mode != 'route' %}
/interface bridge add name=bridge{{ vdata.id }} protocol-mode=none
{% endfor +%}

{#
# Create VLAN subinterfaces
#}
{% for ifdata in interfaces if ifdata.vlan is defined and ifdata.vlan.access_id is defined %}
{%   if ifdata.type == 'vlan_member' %}
/interface vlan add name={{ ifdata.ifname }} vlan-id={{ ifdata.vlan.access_id }} interface={{ ifdata.parent_ifname }} disabled=no
{%   endif %}
{% endfor %}
