Commit 77042292 authored by Alexander Zubkov's avatar Alexander Zubkov Committed by Ondrej Zajicek (work)
Browse files

Doc: Document min/max operators for lists

parent 0e1fd7ea
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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.