We’ve got a set of clients that all need the same Option-43 sent, but there’s 
no single vendor class identifier that can catch them all.
In standard ISC server, we could do:
if ((substring (option vendor-class-identifier, 0, 13) = "model-001.xyz"
        or substring (option vendor-class-identifier, 0, 15) = "mymodel-002.xyz”
        or substring (option vendor-class-identifier, 0, 12) = "model003.zzz"
)) 
.. and define the options here


In Kea it looks like I need to do:
    "client-classes": [
        # Client Class – Many Similar Models
        {
            "name": "ManyModels",
            "test": "(option[vendor-class-identifier].text == 'model-001.xyz') 
or (option[vendor-class-identifier].text == 'mymodel-002.xyz') or 
(option[vendor-class-identifier].text == 'model003.zyz')",
.. define options here

Is there a way to make this configuration more readable/editable? Having to put 
a dozen of these on one line will quickly become a wall of text. I tried 
escaping with \, breaking with a newline, and a few other things but it appears 
that the server wants the entire test in one line.

I know I could create multiple client classes, one for each model, and just 
repeat the options I send, but that turns a horizontal wall of text into a 
vertical one.


-- 
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to