[kea-dev] add option-def/option-data configuration method using name-value pair

Razvan Becheriu razvan.becheriu at qualitance.com
Wed Jun 15 12:32:52 UTC 2016


Hi,

Is there any plan to add name-value pair when configuring options in
kea.conf?
I will give you an example of the way this could look like and what will
imply.
At the moment declaring a new option looks like this:
            {
                "name": "option-name",
                "code": XX,
                "type": "record",
                "array": false,
                "record-types": "uint8, uint16, uint32",
                "space": "option-space",
                "encapsulate": ""
            },
and the definition looks like this:
            {
                "name": "option=name",
                "code": XX,
                "space": "option-space",
                "csv-format": true,
                "data": "1,16456, 655367"
            },

The new declaration could look like this:
            {
                "name": "option-name",
                "code": XX,
                "type": "record",
                "array": false,
                "record-types": "uint8, uint16, uint32",
                "record-names": "param1, param2, param3",
                "space": "option-space",
                "encapsulate": ""
            },
and the definition could look like:
            {
                "name": "option=name",
                "code": XX,
                "space": "option-space",
                "csv-format": true,
                "data-type": "name-data"
                "data": "param1=1, param2=16456, param3=655367"
            },

This will imply:
 - adding a new 'record-names' configuration option in 'option-def':
record-names: enumeration of record parameter names
 - adding a new 'data-type' configuration type in 'option-data' which can
have 2 values:
"data" or "name-data" which will determine the way the values are
enumerated:
data: just as before
name-data: enumeration of name=value (only if the record-names parameter is
configured)
 - the json configuration parser will check that all name-value pairs are
present (regardless of the order they are enumerated)

This will be useful for the user to configure the record parameters in any
order and to visualize the configured data more easily.

Regards,
Razvan


-- 
*Razvan Becheriu*  |  senior software engineer  |  QUALITANCE™
*RO:* +00 (000) 000 000  |  *office:* +40 (372) 944 741
Opera Center bldg. 2, fl. 7-8, 2 Dr. Nicolae D. Staicovici, Bucharest 050556
<https://www.google.ro/maps/place/QUALITANCE/@44.433653,26.079464,17z/data=!4m6!1m3!3m2!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede!2sQUALITANCE!3m1!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede?hl=ro>
razvan.becheriu at qualitance.com  |  www.qualitance.com
--
The information contained in this email is confidential. It is intended
only for the stated addressee and access to it by any other person is
unauthorised. If you are not an addressee, you must not disclose, copy,
circulate or in another way use or reply to the information contained in
this email. Such unauthorised use may be unlawful. If you have received
this email in error, please notify the sender immediately and delete all
copies from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-dev/attachments/20160615/23739257/attachment.html>


More information about the kea-dev mailing list