This may be beyond the scope of what you were asking, but you can store some or all of the config in MySQL/MariaDB: https://kb.isc.org/docs/using-the-kea-configuration-backend which may make this particular aspect easier to manage.
----- Original Message ----- > From: "Andrew Peterson via Kea-users" <[email protected]> > To: "kea-users" <[email protected]> > Sent: Monday, October 31, 2022 12:44:58 PM > Subject: [Kea-users] Config line breaking / multiple vendor class identifiers > 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 -- 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
