Page MenuHomeVyOS Platform

Add option to append route-target when adding additional imports
Confirmed, NormalPublicFEATURE REQUEST

Description

Currently, adding additional route-target imports will overwrite the existing imports. I'd like to see the behavior of creating additional imports be an append action to existing imports instead of rewriting the existing import. This is more in line with how enterprise gear would handle this.

Someone could cause an outage if they’re not aware of how that behavior differs from what they’ve known.

For instance, if this already exists:

set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:200'

And I type this:

set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:300'

It should create this instead of rewriting the original import:

set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:200 65500:300'

Maybe add a switch to the end of the command that allows the append behavior. Something like:

set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:300' append

Performing a delete action should simply remove that route-target from the existing list, unless it is the only route-target in the list, in which case the import is removed entirely.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)

Event Timeline

We don't need append
We should use leafNode type /multi for example https://github.com/vyos/vyos-1x/blob/4c29922cc0baa9c127391b58e82b76f69e1e2dce/interface-definitions/include/bgp/afi-l2vpn-common.xml.i#L43

Do this change here https://github.com/vyos/vyos-1x/blob/4c29922cc0baa9c127391b58e82b76f69e1e2dce/interface-definitions/include/bgp/afi-route-target-vpn.xml.i#L24-L35

And expected config

set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:200'
set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:300'
Viacheslav changed the task status from Open to Confirmed.Jan 12 2024, 6:18 PM
Viacheslav triaged this task as Normal priority.