diff options
Diffstat (limited to 'keama/tests/subclassguard4.out')
-rw-r--r-- | keama/tests/subclassguard4.out | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/keama/tests/subclassguard4.out b/keama/tests/subclassguard4.out new file mode 100644 index 00000000..49979131 --- /dev/null +++ b/keama/tests/subclassguard4.out @@ -0,0 +1,80 @@ +{ + # subclass with guard declaration config + # authoritative is mandatory + "Dhcp4": { + "option-def": [ + # options + { + "space": "dhcp4", + "name": "mysystem", + "code": 250, + "type": "string" + }, + { + "space": "dhcp4", + "name": "myversion", + "code": 251, + "type": "uint16" + }, + { + "space": "dhcp4", + "name": "mydescr", + "code": 252, + "type": "string" + } + ], + "client-classes": [ + # superclass declaration + /// match: option dhcp.mysystem + { + "name": "foobar", + /// from: match if (option dhcp.myversion) = 0x0001 + "test": "option[251].hex == 0x0001" + }, + # simple subclass declaration + /// subclass selector 'system1' + { + "name": "sub#foobar#0", + /// from: match-if (option dhcp.myversion) = 0x0001 + /// match: option dhcp.mysystem + /// data: 'system1' + "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system1')" + }, + # option setting subclass declaration + /// subclass selector 'system2' + { + "name": "sub#foobar#1", + "option-data": [ + { + "space": "dhcp4", + "name": "mydescr", + "code": 252, + "data": "1.2" + } + ], + /// from: match-if (option dhcp.myversion) = 0x0001 + /// match: option dhcp.mysystem + /// data: 'system2' + "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system2')" + }, + # complex subclass declaration + /// subclass selector 'system3' + { + "name": "sub#foobar#2", + "option-data": [ + { + "space": "dhcp4", + "name": "mydescr", + "code": 252, + "data": "1.3" + } + ], + "next-server": "192.168.0.1", + /// from: match-if (option dhcp.myversion) = 0x0001 + /// match: option dhcp.mysystem + /// data: 'system3' + "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system3')" + } + ] + } +} |