]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
start removing "update"
authorAlan T. DeKok <aland@freeradius.org>
Fri, 15 Sep 2023 12:52:01 +0000 (08:52 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 15 Sep 2023 12:52:01 +0000 (08:52 -0400)
doc/antora/modules/reference/pages/xlat/builtin.adoc

index a55eec14349e961b68fa1ca8aca8fb57f3c0190b..ab1b2c39e4ba7eb332cf34c3eb911527b40db110 100644 (file)
@@ -21,14 +21,12 @@ the attributes data as encoded "on the wire".
 ====
 [source,unlang]
 ----
-update control {
-    &Tmp-String-0 := "Caipirinha"
-    &Framed-IP-Address := 192.0.2.1
-}
+&Tmp-String-0 := "Caipirinha"
+&Framed-IP-Address := 192.0.2.1
 
-update reply {
-    &Reply-Message := "The length of %{control.Tmp-String-0} is %(length:&control.Tmp-String-0)"
-    &Reply-Message += "The length of %{control.Framed-IP-Address} is %(length:&control.Framed-IP-Address)"
+&reply += {
+       &Reply-Message = "The length of %{control.Tmp-String-0} is %(length:&control.Tmp-String-0)"
+       &Reply-Message = "The length of %{control.Framed-IP-Address} is %(length:&control.Framed-IP-Address)"
 }
 ----
 
@@ -64,12 +62,8 @@ unsigned 32-bit number.
 ====
 [source,unlang]
 ----
-update {
-    &control.Service-Type := Login-User
-}
-update reply {
-    &Reply-Message := "The value of Service-Type is %(integer:%{control.Service-Type})"
-}
+&control.Service-Type := Login-User
+&reply.Reply-Message := "The value of Service-Type is %(integer:%{control.Service-Type})"
 ----
 
 .Output
@@ -89,9 +83,7 @@ Generate random number from `0` to `<number>-1`.
 ====
 [source,unlang]
 ----
-update reply {
-    &Reply-Message := "The random number is %{rand:512}"
-}
+&reply.Reply-Message := "The random number is %{rand:512}"
 ----
 
 .Output
@@ -101,38 +93,6 @@ The random number is 347
 ```
 ====
 
-=== %{tag:<attribute ref>}
-
-CAUTION: This expansion is deprecated and will likely be removed.
-
-Returns a list of tags for any attributes found using ``<attribute ref>``.
-
-.Return: _int8_
-
-.Determining the tag value of the second instance of the `radius.Tunnel-Server-Endpoint` attribute
-====
-[source,unlang]
-----
-update request {
-    &Tunnel-Server-Endpoint   := '192.0.1.1'
-    &Tunnel-Server-Endpoint:1 := '192.0.5.2'
-    &Tunnel-Server-Endpoint:1 += '192.0.3.8'
-    &Tunnel-Server-Endpoint:2 := '192.0.2.1'
-    &Tunnel-Server-Endpoint:2 += '192.0.3.4'
-}
-
-update reply {
-    &Reply-Message := "The tag value of the second instance of Tunnel-Server-Enpoint is %{request.Tunnel-Server-Endpoint[1]}"
-}
-----
-
-.Output
-
-```
-The tag value of the second instance of Tunnel-Server-Enpoint is 192.0.5.2
-```
-====
-
 === %{string:<data>}
 
 Convert input to a string if (possible).  For _octets_ type
@@ -432,15 +392,15 @@ Used to join two or more attributes, separated by an optional delimiter.
 
 [source,unlang]
 ----
-update {
-    &control.Tmp-String-0 := "aaa"
-    &control.Tmp-String-0 += "bb"
-    &control.Tmp-String-0 += "c"
+&control += {
+       &Tmp-String-0 = "aaa"
+       &Tmp-String-0 = "bb"
+       &Tmp-String-0 = "c"
 }
 
-update reply {
-    &Reply-Message += "%(concat:%{control.Tmp-String-0[*]} ', ')"
-    &Reply-Message += "%(concat:%{control.Tmp-String-0[*]} ,)"
+reply += {
+    &Reply-Message = "%(concat:%{control.Tmp-String-0[*]} ', ')"
+    &Reply-Message = "%(concat:%{control.Tmp-String-0[*]} ,)"
 }
 ----
 
@@ -463,17 +423,11 @@ This expansion is the opposite of `%(concat: ... )`.
 
 [source,unlang]
 ----
-update control {
-    &Tmp-String-0 := "bob.toba@domain.com"
-}
+&control.Tmp-String-0 := "bob.toba@domain.com"
 
-update control {
-    &Tmp-String-1 := "%(explode:&control.Tmp-String-0 @)"
-}
+&control.Tmp-String-1 := "%(explode:&control.Tmp-String-0 @)"
 
-update reply {
-    &Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
-}
+&reply.Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
 ----
 
 .Output
@@ -492,12 +446,9 @@ Left-pad a string.
 
 [source,unlang]
 ----
-update control {
-    &Tmp-String-0 := "123"
-}
-update reply {
-    &Reply-Message := "Maximum should be %(lpad:%{control.Tmp-String-0} 11 0)"
-}
+&control.Tmp-String-0 := "123"
+
+&reply.Reply-Message := "Maximum should be %(lpad:%{control.Tmp-String-0} 11 0)"
 ----
 
 .Output
@@ -516,12 +467,9 @@ Right-pad a string.
 
 [source,unlang]
 ----
-update control {
-    &Tmp-String-0 := "123"
-}
-update reply {
-    &Reply-Message := "Maximum should be %(rpad:%{control.Tmp-String-0} 11 0)"
-}
+&control.Tmp-String-0 := "123"
+
+&reply.Reply-Message := "Maximum should be %(rpad:%{control.Tmp-String-0} 11 0)"
 ----
 
 .Output
@@ -983,7 +931,7 @@ Evaluates the string as an expansion, and returns the result.  The main differen
 
 .Return: _data_
 
-.Example:
+.Example
 
 [source,unlang]
 ----
@@ -1060,7 +1008,7 @@ Calculate number of seconds until next n hour(`s`), day(`s`), week(`s`), year(`s
 
 .Return: _string_
 
-.Example:
+.Example
 
 With the current time at 16:18, `%(nexttime:1h)` will expand to `2520`.
 
@@ -1088,7 +1036,7 @@ See also the `unpack` module, which is the inverse to `pack`.
 
 .Return: _octets_
 
-.Example:
+.Example
 
 [source,unlang]
 ----