From bf55ad45cf450c7323512f60e957dee29ac6b997 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 28 Aug 2018 21:50:11 +0200 Subject: [PATCH] [#10, !3] cache-clear,get documented --- doc/api/cache-clear.json | 7 +++++++ doc/api/cache-get.json | 13 +++++++++++++ doc/guide/hooks-host-cache.xml | 14 +++++++------- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 doc/api/cache-clear.json create mode 100644 doc/api/cache-get.json diff --git a/doc/api/cache-clear.json b/doc/api/cache-clear.json new file mode 100644 index 0000000000..d1096e3e5d --- /dev/null +++ b/doc/api/cache-clear.json @@ -0,0 +1,7 @@ +{ + "name": "cache-clear", + "brief": "This command removes all cached host reservations.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "hook": "host_cache", + "avail": "1.4.0" +} diff --git a/doc/api/cache-get.json b/doc/api/cache-get.json new file mode 100644 index 0000000000..7c72ff1b7f --- /dev/null +++ b/doc/api/cache-get.json @@ -0,0 +1,13 @@ +{ + "name": "cache-get", + "brief": "Returns full content of the host cache.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + + "resp-syntax": "{ + \"result\": 0 + \"text\": \"123 entries returned.\" + \"arguments\": +}" +} diff --git a/doc/guide/hooks-host-cache.xml b/doc/guide/hooks-host-cache.xml index eb6ef01740..a71905db0b 100644 --- a/doc/guide/hooks-host-cache.xml +++ b/doc/guide/hooks-host-cache.xml @@ -60,7 +60,7 @@ sections describe the commands available. -
+
cache-flush command This command allows removal of specified number of cached host entries. It takes one parameter which defines the number of @@ -76,7 +76,7 @@ in FIFO order, so always the oldest entries are removed.
-
+
cache-clear command This command allows removal of all cached host entries. An example usage looks as follows: @@ -89,7 +89,7 @@ certain number of cached hosts, please use cache-flush instead.
-
+
cache-write command In general case the cache content is considered a run-time state and the server can be shutdown or restarted as usual. The @@ -121,7 +121,7 @@ any other tool that is able to understand JSON format.
-
+
cache-load command See previous section for a discussion regarding use cases where it may be useful to write and load contents of the host @@ -142,7 +142,7 @@ any other tool that is able to understand JSON format.
-
+
cache-get command This command is similar to cache-write, but instead of writing the cache contents to disk, it returns the contents to @@ -159,7 +159,7 @@ may be large.
-
+
cache-insert command This command may be used to manually insert a host into the cache. There are very few use cases when this command could be @@ -220,7 +220,7 @@ may be large.
-
+
cache-remove command Sometimes it is useful to remove a single entry from the host cache. A good use case is a situation where the device is up, -- 2.47.3