2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 20:47:48 +00:00

[#1106] Cleaned command documentation

This commit is contained in:
Thomas Markwalder 2020-03-18 11:05:02 -04:00
parent d69a5e8c82
commit ddfd1af2f2
4 changed files with 26 additions and 29 deletions

View File

@ -36,6 +36,7 @@ api/lease4-get-by-hw-address.json
api/lease4-get.json api/lease4-get.json
api/lease4-update.json api/lease4-update.json
api/lease4-wipe.json api/lease4-wipe.json
api/lease4-resend-ddns.json
api/lease6-add.json api/lease6-add.json
api/lease6-bulk-apply.json api/lease6-bulk-apply.json
api/lease6-del.json api/lease6-del.json
@ -45,6 +46,7 @@ api/lease6-get-by-hostname.json
api/lease6-get.json api/lease6-get.json
api/lease6-update.json api/lease6-update.json
api/lease6-wipe.json api/lease6-wipe.json
api/lease6-resend-ddns.json
api/leases-reclaim.json api/leases-reclaim.json
api/libreload.json api/libreload.json
api/list-commands.json api/list-commands.json

View File

@ -1,7 +1,7 @@
{ {
"avail": "1.7.6", "avail": "1.7.6",
"brief": [ "brief": [
"This command resends request to update DNS for an existing lease." "This command resends a request to kea-dhcp-ddns to update DNS for an existing lease."
], ],
"cmd-syntax": [ "cmd-syntax": [
"{", "{",

View File

@ -1,7 +1,7 @@
{ {
"avail": "1.7.6", "avail": "1.7.6",
"brief": [ "brief": [
"This command resends request to update DNS for an existing lease." "This command resends a request to kea-dhcp-ddns to update DNS for an existing lease."
], ],
"cmd-syntax": [ "cmd-syntax": [
"{", "{",

View File

@ -87,10 +87,10 @@ This library provides the following commands:
- ``lease6-wipe`` - removes all leases from a specific IPv6 subnet or - ``lease6-wipe`` - removes all leases from a specific IPv6 subnet or
from all subnets. from all subnets.
- ``lease4-resend-ddns`` - resend a request to udpate DNS entries for - ``lease4-resend-ddns`` - resend a request to update DNS entries for
and existing lease. and existing lease.
- ``lease6-resend-ddns`` - resend a request to udpate DNS entries for - ``lease6-resend-ddns`` - resend a request to update DNS entries for
and existing lease. and existing lease.
The lease commands library is part of the open source code and is The lease commands library is part of the open source code and is
@ -897,24 +897,34 @@ An example of ``lease6-wipe`` is:
} }
} }
The commands return a text description of the number of leases removed,
plus the status code 0 (success) if any leases were removed or 2 (empty)
if there were no leases. Status code 1 (error) may be returned if the
parameters are incorrect or some other exception is encountered.
Subnet-id 0 has a special meaning; it tells Kea to delete leases from
all configured subnets. Also, the subnet-id parameter may be omitted. If
not specified, leases from all subnets are wiped.
Note: not all backends support this command.
.. _command-lease4-resend-ddns: .. _command-lease4-resend-ddns:
.. _command-lease6-resend-ddns: .. _command-lease6-resend-ddns:
The lease4-resend-ddns, lease6-resend-ddns Commands The lease4-resend-ddns, lease6-resend-ddns Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``lease4-resend-ddns`` or ``lease6-resend-ddns`` can be used to generate ``lease4-resend-ddns`` or ``lease6-resend-ddns`` can be used to generate
a request to kea-dhcp-ddns to update the DNS entries for an existing a request to kea-dhcp-ddns to update the DNS entries for an existing
lease. The desired lease is selected by a single parameter, "ip-address". lease. The desired lease is selected by a single parameter, "ip-address".
In order for an update request to be generated, DDNS updating must be enabled In order for an update request to be generated, DDNS updating must be enabled
and DNS must entries must have been made (or attempted) on the lease. In and DNS must entries must have already been made (or attempted) for the lease.
other words all of the following must be true: In other words all of the following must be true:
- DDNS updating must be enabled. (i.e. "dhcp-ddns":{ "enable-updates": true"}) - DDNS updating must be enabled. (i.e. "dhcp-ddns":{ "enable-updates": true"})
- The hostname on the lease must not be blank. - The lease's hostname must not be blank.
- At least one of the DNS direction flags (fdqn_fwd or fdqn_rev) on the lease - At least one of the lease's DNS direction flags (fdqn_fwd or fdqn_rev) must be true.
must be true.
An example ``lease4-resend-ddns`` command for getting a lease using an IPv4 An example ``lease4-resend-ddns`` command for getting a lease using an IPv4
address is: address is:
@ -935,7 +945,7 @@ An example of the ``lease6-resend-ddns`` query is:
{ {
"command": "lease6-resend-ddns", "command": "lease6-resend-ddns",
"arguments": { "arguments": {
"ip-address": "2001:db8:1234:ab::" "ip-address": "2001:db8:1::1"
} }
} }
@ -944,9 +954,9 @@ It has one of the following values: 0 (success), 1 (error), or 2 (empty). An emp
result means that a query has been completed properly, but the object (a lease in result means that a query has been completed properly, but the object (a lease in
this case) has not been found. this case) has not been found.
A successful result does not mean that DNS has been successfully updates. Rather it A successful result does not mean that DNS has been successfully updated. It
indicates that a request to update DNS has been created and queued for transmission indicates that a request to update DNS has been successfully created and
to kea-dhcp-ddns. queued for transmission to kea-dhcp-ddns.
An example result returned when the lease was found: An example result returned when the lease was found:
@ -957,18 +967,3 @@ An example result returned when the lease was found:
"text": "NCR generated for: 2001:db8:1::1, hostname: example.com." "text": "NCR generated for: 2001:db8:1::1, hostname: example.com."
} }
.. _command-lease4-get-all:
.. _command-lease6-get-all:
The commands return a text description of the number of leases removed,
plus the status code 0 (success) if any leases were removed or 2 (empty)
if there were no leases. Status code 1 (error) may be returned if the
parameters are incorrect or some other exception is encountered.
Subnet-id 0 has a special meaning; it tells Kea to delete leases from
all configured subnets. Also, the subnet-id parameter may be omitted. If
not specified, leases from all subnets are wiped.
Note: not all backends support this command.