xref: /netbsd-src/external/mpl/dhcp/dist/keama/tests/subclassguard4.out (revision 4d342c046e3288fb5a1edcd33cfec48c41c80664)
1{
2  # subclass with guard declaration config
3  # options
4  "Dhcp4": {
5    "option-def": [
6      {
7        "space": "dhcp4",
8        "name": "mysystem",
9        "code": 250,
10        "type": "string"
11      },
12      {
13        "space": "dhcp4",
14        "name": "myversion",
15        "code": 251,
16        "type": "uint16"
17      },
18      {
19        "space": "dhcp4",
20        "name": "mydescr",
21        "code": 252,
22        "type": "string"
23      }
24    ],
25    "client-classes": [
26      # superclass declaration
27      /// match: option dhcp.mysystem
28      {
29        "name": "foobar",
30        /// from: match if (option dhcp.myversion) = 0x0001
31        "test": "option[251].hex == 0x0001"
32      },
33      # simple subclass declaration
34      /// subclass selector 'system1'
35      {
36        "name": "sub#foobar#0",
37        /// from: match-if (option dhcp.myversion) = 0x0001
38        /// match: option dhcp.mysystem
39        /// data: 'system1'
40        "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system1')"
41      },
42      # option setting subclass declaration
43      /// subclass selector 'system2'
44      {
45        "name": "sub#foobar#1",
46        "option-data": [
47          {
48            "space": "dhcp4",
49            "name": "mydescr",
50            "code": 252,
51            "data": "1.2"
52          }
53        ],
54        /// from: match-if (option dhcp.myversion) = 0x0001
55        /// match: option dhcp.mysystem
56        /// data: 'system2'
57        "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system2')"
58      },
59      # complex subclass declaration
60      /// subclass selector 'system3'
61      {
62        "name": "sub#foobar#2",
63        "option-data": [
64          {
65            "space": "dhcp4",
66            "name": "mydescr",
67            "code": 252,
68            "data": "1.3"
69          }
70        ],
71        "next-server": "192.168.0.1",
72        /// from: match-if (option dhcp.myversion) = 0x0001
73        /// match: option dhcp.mysystem
74        /// data: 'system3'
75        "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system3')"
76      }
77    ]
78  }
79}
80