{#
  Mikrotik is VPNv4 only, at least in ROS 6
  NOTE: For now, this code assumes a BGP peer for the AFI ip is already present.
  So it only adds the AFI vpnv4
#}
{% set af = 'ipv4' %}
{% set vpnaf = 'vpnv4' %}
{% if mpls.vpn[af] is defined %}

{%   for n in bgp.neighbors if n[vpnaf] is defined %}
/routing bgp peer set [find remote-address={{ n[vpnaf] }}] address-families=ip,vpnv4
{%   endfor %}

{% endif %}
