blob: e271a18b3aecc70b3a26d91af21fe787c3c71b9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#
# PRE: switch switch-attr-cmp
#
update request {
Service-Type := Login-User
Filter-Id := "Login-User"
}
switch &Service-Type {
case "%{expr: 1 + 2}" {
update reply {
Filter-Id := "3"
}
}
#
# The Filter-Id will get printed to a string,
# have the string parsed as a Service-Type attr,
# and then that compared to the input Service-Type
#
case &Filter-Id {
update reply {
Filter-Id := "filter"
}
}
case {
update reply {
Filter-Id := "default"
}
}
}
|