ListPath can filter VPNv4/v6 routes #2689
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ListPath
gRPC endpoint can now filter VPNv4/VPNv6 prefixes. All lookup options are supported.TableLookupPrefix
proto message now has newrd
(route distingusher) attribute. If empty it will look through all prefixes ignoring route distinguisher (see examples below).gobgp
CLI can also use this feature.table.Select
and new functions.Examples
VPNv4 table
Lookup with RD
Exact
Longer
Shorter
Lookup without RD
Exact
Longer
Shorter
VPNv6 table
Lookup with RD
Exact
Longer
Shorter
Lookup without RD
Exact
Longer
Shorter
Invalid input
Using
rd
option withipv4
family./gobgp global rib -a ipv4 2.2.2.0/25 rd route distinguisher is not applicable to "ipv4-unicast" family
Using
rd
options without a valueUsing
rd
option and invalid value./gobgp global rib -a vpnv4 2.2.2.2/32 rd bla failed to parse RD "bla"