Hi all,

Does anyone know if using Kea 1.3 (beta) and the host_cmds hook (for 1.2 
currently), whether one will be able to insert a host reservation using the 
flex-id identifier type over the API via the host_cmds hook instead of 
inserting the host reservation into the database directly?  This is, of course, 
assuming that one would be using the flex-id hook as well.

http://kea.isc.org/wiki/Commands Section 2.3 makes the following statement:

"The details are TBD, but it seems very likely that the initial implementation 
will allow specifying the following identifier types: hwaddr (hardware/MAC 
address), client-id (client-identifier option in DHCPv4), DUID (client-id 
option in DHCPv6), remote-id (remote-id sub-option in option 82), circuit-id 
(circuit-id sub-option in option 82). Additional identifier types are likely to 
be defined in the future.”

Not sure if I should interpret that verbatim and not specifically mentioning 
flex-id implies that it is not supported, or even on the radar, or if it is and 
just isn’t mentioned.

Also, while trying to verify it for myself, I ran into an issue trying to do a 
simple reservation-add using an example from the administration guide:

BlackBox-3:~ jlixfeld$ curl -X POST -H "Content-Type: application/json" -d '{ 
"command": "reservation-add", "arguments": { "reservation": { "subnet-id": 1, 
"hw-address": "1a:1b:1c:1d:1e:1f", "ip-address": "192.0.2.202" } } }' 
http://10.219.66.10:8080/
[ { "result": 2, "text": "'reservation-add' command not supported." } ]

==> /var/log/kea/kea-hooks.log <==
2017-10-03 16:23:14.208 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_VERSION 
hooks library /usr/local/lib/hooks/libdhcp_host_cmds.so reports its version as 4
2017-10-03 16:23:14.209 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_LOADING 
loading hooks library /usr/local/lib/hooks/libdhcp_flex_id.so
2017-10-03 16:23:14.209 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_VERSION 
hooks library /usr/local/lib/hooks/libdhcp_flex_id.so reports its version as 4
2017-10-03 16:23:14.209 DEBUG [kea-dhcp4.hooks/4149] 
HOOKS_STD_CALLOUT_REGISTERED hooks library 
/usr/local/lib/hooks/libdhcp_flex_id.so registered standard callout for hook 
host4_identifier at address 0x7fad68c61610
2017-10-03 16:23:14.210 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LOAD_SUCCESS 'load' 
function in hook library /usr/local/lib/hooks/libdhcp_flex_id.so returned 
success
2017-10-03 16:23:14.210 INFO  [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_LOADED hooks 
library /usr/local/lib/hooks/libdhcp_flex_id.so successfully loaded
2017-10-03 16:23:14.210 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_LOADING 
loading hooks library /usr/local/lib/hooks/libdhcp_host_cmds.so
2017-10-03 16:23:14.210 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_VERSION 
hooks library /usr/local/lib/hooks/libdhcp_host_cmds.so reports its version as 4
2017-10-03 16:23:14.210 DEBUG [kea-dhcp4.hooks/4149] HOOKS_LOAD_SUCCESS 'load' 
function in hook library /usr/local/lib/hooks/libdhcp_host_cmds.so returned 
success
2017-10-03 16:23:14.210 INFO  [kea-dhcp4.hooks/4149] HOOKS_LIBRARY_LOADED hooks 
library /usr/local/lib/hooks/libdhcp_host_cmds.so successfully loaded

==> /var/log/kea/kea-ctrl-agent.log <==
2017-10-03 16:20:01.789 DEBUG [kea-ctrl-agent.http/4130] 
HTTP_REQUEST_RECEIVE_START start receiving request from 192.168.66.158 with 
timeout 10
2017-10-03 16:20:01.789 DEBUG [kea-ctrl-agent.http/4130] HTTP_DATA_RECEIVED 
received 283 bytes from 192.168.66.158
2017-10-03 16:20:01.789 DEBUG [kea-ctrl-agent.http/4130] HTTP_REQUEST_RECEIVED 
received HTTP request from 192.168.66.158
2017-10-03 16:20:01.789 INFO  [kea-ctrl-agent.commands/4130] COMMAND_RECEIVED 
Received command 'reservation-add'
2017-10-03 16:20:01.789 DEBUG [kea-ctrl-agent.http/4130] HTTP_RESPONSE_SEND 
sending HTTP response HTTP/1.1 200 OK
 to 192.168.66.158
2017-10-03 16:20:01.790 DEBUG [kea-ctrl-agent.http/4130] HTTP_CONNECTION_STOP 
stopping HTTP connection from 192.168.66.158

Any thoughts or insights on either?

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

Reply via email to