summaryrefslogtreecommitdiff
path: root/keama/tests/concatdx4.out
blob: 4602a49709275d5e948d66d3b397e0198f271536 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  # concat data expression
  # empty configs are not accepted by Kea
  "Dhcp4": {
    "valid-lifetime": 1800,
    "client-classes": [
      # use substring in a reductible match
      /// match: concat('domain=', suffix(option dhcp.host-name, 3))
      {
        "name": "reductible"
      },
      /// subclass selector 'domain=com'
      {
        "name": "sub#reductible#0",
        /// from: match concat('domain=', suffix(option dhcp.host-name, 3))
        /// data: 'domain=com'
        "test": "concat('domain=', substring(option[12].hex,-3,all)) == 'domain=com'"
      },
      # reduce literals too
      {
        "name": "literal",
        /// from: match if (option dhcp.host-name) = (concat('www.', concat('example.', 'com')))
        "test": "option[12].hex == 'www.example.com'"
      }
    ],
    "option-data": [
//    # raw
//    {
//      "space": "dhcp4",
//      "name": "host-name",
//      "code": 12,
//      "csv-format": false,
//      "expression": {
//        "concat": {
//          "left": "www.",
//          "right": {
//            "option": {
//              "universe": "dhcp",
//              "name": "domain-name",
//              "code": 15
//            }
//          }
//        }
//      }
//    }
    ]
  }
}