From: Marcin Siodelski Date: Mon, 8 Jan 2018 17:05:27 +0000 (+0100) Subject: [5472] Updated User's Guide with the "force-create" leaseX-update parameter. X-Git-Tag: trac5425a_base~9^2~1 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f69a91bd098db040741546db5894f970b1631952;p=thirdparty%2Fkea.git [5472] Updated User's Guide with the "force-create" leaseX-update parameter. --- diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index be499490f7..ab0c51de33 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1716,12 +1716,14 @@ An example IPv4 lease deletion by "hw-address" looks as follows: leaseX-del followed by leaseX-add commands. - To use leaseX-update the lease must - be present in the lease database. If the lease is not there, - an error will be returned. Please use - leaseX-add to add new leases. You may - check if a lease is present using - leaseX-get, if needed. + The optional boolean parameter "force-create" specifies + if the lease should be created if it doesn't exist in the database. + It defaults to false, which indicates that the lease is not created + if it doesn't exist. In such case, an error is returned as a result + of trying to update a non-existing lease. If the "force-create" parameter + is set to true and the updated lease doesn't exist, the new lease is + created as a result of receiving the leaseX-update. + An example command updating IPv4 lease looks as follows: @@ -1731,7 +1733,8 @@ An example IPv4 lease deletion by "hw-address" looks as follows: "ip-address": "192.0.2.1", "hostname": "newhostname.example.org", "hw-address": "1a:1b:1c:1d:1e:1f", - "subnet-id": 44 + "subnet-id": 44, + "force-create": true } } @@ -1745,7 +1748,8 @@ An example IPv4 lease deletion by "hw-address" looks as follows: "duid": "88:88:88:88:88:88:88:88", "iaid": 7654321, "hostname": "newhostname.example.org", - "subnet-id": 66 + "subnet-id": 66, + "force-create": false } }