Doc: Document min/max operators for lists
This commit is contained in:
parent
0e1fd7ea6a
commit
77042292ff
1 changed files with 10 additions and 1 deletions
|
@ -1532,7 +1532,7 @@ in the foot).
|
||||||
Clist is similar to a set, except that unlike other sets, it can be
|
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
|
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.
|
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/.
|
<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
|
<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/.
|
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>
|
<tag><label id="type-eclist">eclist</tag>
|
||||||
Eclist is a data type used for BGP extended community lists. Eclists
|
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.
|
are very similar to clists, but they are sets of ECs instead of pairs.
|
||||||
|
|
Loading…
Reference in a new issue