kea-custom-hooks
FeM custom hooks libraries for Kea DHCP
AdminDB Host Reservation Importer Command Reference

This page describes all commands for the admindb-host-reservation-importer.

See the Kea Hooks Developers Guide on how to implement command callouts.

Basic API command usage

Commands are made available via the kea-ctrl-agent's API. To tell these commands apart from other hooks' commands, all commands are prefixed with ahri-.

API Commands

ping

  • Parameters:
    • node_name: string (The name of the node sending the ping)
    • node_version: string (The library version of the node sending the ping)
  • Return value: bool

Send a simple ping message to a node, informing it about this node being online. The reply indicates whether or not the nodes have matching node versions.

consistency-check

  • Parameters:
    • update_on_inconsistency: boolean (true: update the real host reservation database if inconsistent, false: do not update the real host reservation database whatsoever)
  • Return value: boolean (true: host reservation database was consistent, false: host reservation database was inconsistent)

Make a consistency check by running a full sync to a second table and compare the contents of the second table with the actual host reservation database. The result of the inconsistency check is then returned as a boolean value. Depending on whether or not update_on_inconsistency is set or not, the command does or doesn't fix an inconsistent host reservation database.

get-last-consistency-check-result

get-last-consistency-check-result

  • Parameters: None
  • Return value: TODO

Return the cached result of the last consistency check.

Todo:
Specify the command's return value type

get-update-id

  • Parameters: None
  • Return value: int

Get the node's last processed update ID.

full-sync

  • Parameters: None
  • Return value: int

Force a full-sync for this node. The command returns the difference count obtained through the full-sync.