From: Marcin Siodelski Date: Wed, 10 Jan 2018 10:03:04 +0000 (+0100) Subject: [5468] Added a section about lease4-get-all command in the User's Guide. X-Git-Tag: trac5469_base~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75e555d573749ad2f5eb15fefa6e39a0006dc122;p=thirdparty%2Fkea.git [5468] Added a section about lease4-get-all command in the User's Guide. --- diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index be499490f7..df56591445 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1340,6 +1340,10 @@ An example deletion by (subnet-id, identifier-type, identifier) looks as follows lease4-get - checks if an IPv4 lease with the specified parameters exists and returns it if it does; + + lease4-get-all - returns all IPv4 leases + or IPv4 leases for specified subnets; + lease6-get - checks if an IPv6 lease with the specified parameters exists and returns it if it does; @@ -1658,6 +1662,70 @@ An example result returned when the host was found: +
+ lease4-get-all command + lease4-get-all is used to retrieve all IPv4 + leases or all leases for the specified set of subnets. All leases are + returned when there are no arguments specified with the command as + in the following example: + +{ + "command": "lease4-get-all" +} + + + + If the arguments are provided, it is expected that they contain + "subnets" parameter, being a list of subnet identifiers for which the + leases should be returned, e.g.: + +{ + "command": "lease4-get-all", + "arguments": { + "subnets": [ 1, 2, 3, 4 ] + } +} + + + + + The returned response contains a detailed list of leases in the + following format: +{ + "arguments": { + "leases": [ + { + "client-id": "42:42:42:42:42:42:42:42", + "cltt": 12345678, + "fqdn-fwd": false, + "fqdn-rev": true, + "hostname": "myhost.example.com.", + "hw-address": "08:08:08:08:08:08", + "ip-address": "192.0.2.1", + "state": 0, + "subnet-id": 44, + "valid-lft": 3600 + }, + { + "client-id": "21:21:21:21:21:21:21:21", + "cltt": 12345678, + "fqdn-fwd": false, + "fqdn-rev": true, + "hostname": "", + "hw-address": "10:10:10:10:10:10", + "ip-address": "192.0.2.2", + "state": 0, + "subnet-id": 44, + "valid-lft": 3600 + } + ] + }, + "result": 0, + "text": "2 IPv4 lease(s) found." +} + +
+
lease4-del, lease6-del commands leaseX-del can be used to delete a lease from