Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5931: Add option to append route-target when adding additional imports #3623

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions data/templates/frr/bgpd.frr.j2
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,18 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
route-target vpn both {{ afi_config.route_target.vpn.both }}
{% else %}
{% if afi_config.route_target.vpn.export is vyos_defined %}
{% if afi_config.route_target.vpn.export is iterable and not afi_config.route_target.vpn.export is string %}
route-target vpn export {{ afi_config.route_target.vpn.export | join(' ') }}
{% else %}
route-target vpn export {{ afi_config.route_target.vpn.export }}
{% endif %}
{% endif %}
{% if afi_config.route_target.vpn.import is vyos_defined %}
{% if afi_config.route_target.vpn.import is iterable and not afi_config.route_target.vpn.import is string %}
route-target vpn import {{ afi_config.route_target.vpn.import | join(' ') }}
{% else %}
route-target vpn import {{ afi_config.route_target.vpn.import }}
{% endif %}
{% endif %}
{% endif %}
{% if afi_config.route_target.both is vyos_defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<constraint>
<validator name="bgp-rd-rt" argument="--route-target-multi"/>
</constraint>
<multi/>
</properties>
</leafNode>
<leafNode name="export">
Expand All @@ -43,6 +44,7 @@
<constraint>
<validator name="bgp-rd-rt" argument="--route-target-multi"/>
</constraint>
<multi/>
</properties>
</leafNode>
</children>
Expand Down
Loading