{% for vname,vdata in vrfs.items() %}
ip vrf {{ vname }}
!
{% if 'ipv4' in vdata.af %}
! ip route-import|export xxx
{%   for rt in vdata.import %}
 ip route-import {{ rt }}
{%   endfor %}
{%   for rt in vdata.export %}
 ip route-export {{ rt }}
{%   endfor %}
!
{% endif %}
{% if 'ipv6' in vdata.af %}
! ipv6 route-import|export xxx
{%   for rt in vdata.import %}
 ipv6 route-import {{ rt }}
{%   endfor %}
{%   for rt in vdata.export %}
 ipv6 route-export {{ rt }}
{%   endfor %}
!
{% endif %}
{% endfor %}
