0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Doc: Document min/max operators for lists

This commit is contained in:
Alexander Zubkov 2021-12-28 04:09:36 +01:00 committed by Ondrej Zajicek (work)
parent 0e1fd7ea6a
commit 77042292ff

View File

@ -1532,7 +1532,7 @@ in the foot).
Clist is similar to a set, except that unlike other sets, it can be
modified. The type is used for community list (a set of pairs) and for
cluster list (a set of quads). There exist no literals of this type.
There are three special operators on clists:
There are special operators on clists:
<cf><m/C/.len</cf> returns the length of clist <m/C/.
@ -1559,6 +1559,15 @@ in the foot).
<cf><m/C/.add(<m/P/);</cf> if <m/C/ is appropriate route attribute (for
example <cf/bgp_community/). Similarly for <cf/delete/ and <cf/filter/.
<cf><m/C/.min</cf> returns the minimum element of clist <m/C/.
<cf><m/C/.max</cf> returns the maximum element of clist <m/C/.
Operators <cf/.min/, <cf/.max/ can be used together with <cf/filter/
to extract the community from the specific subset of communities
(e.g. localpref or prepend) without the need to check every possible
value (e.g. <cf/filter(bgp_community, [(23456, 1000..1099)]).min/).
<tag><label id="type-eclist">eclist</tag>
Eclist is a data type used for BGP extended community lists. Eclists
are very similar to clists, but they are sets of ECs instead of pairs.