Debian Codegraph @

keama/tests/subclassguard6.out

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