]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#899] addressed comments
authorRazvan Becheriu <razvan@isc.org>
Wed, 17 Feb 2021 14:43:58 +0000 (16:43 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 18 Feb 2021 17:23:57 +0000 (19:23 +0200)
doc/sphinx/arm/hooks-run-script.rst
doc/sphinx/arm/hooks.rst
src/hooks/dhcp/run_script/run_script.cc
src/hooks/dhcp/run_script/run_script.h

index 5aa1cf15022e124926e87abfd3ad57d5f2a2fbcd..34b6feff80afc098f2fa99092568e9bb2ead6066 100644 (file)
@@ -10,35 +10,20 @@ The library is available since Kea 1.9.5 and can be loaded in a
 similar way as other hook libraries by the ``kea-dhcp4`` and
 ``kea-dhcp6`` processes.
 
-::
-
-    "Dhcp4": {
-        "hooks-libraries": [
-            {   "library": "/usr/local/lib/libdhcp_run_script.so",
-                "parameters": {
-                    "name": "/path_to/script_name.sh",
-                    "sync": false
-                }
-            },
-            ...
-        ]
-    }
-
-::
+.. code-block:: json
 
-    "Dhcp6": {
+    {
         "hooks-libraries": [
-            {   "library": "/usr/local/lib/libdhcp_run_script.so",
+            {
+                "library": "/usr/local/lib/libdhcp_run_script.so",
                 "parameters": {
                     "name": "/path_to/script_name.sh",
                     "sync": false
                 }
-            },
-            ...
+            }
         ]
     }
 
-
 The parameters contain the 'name' which indicates the path to the external
 script to be called on each hookpoint, and also the 'sync' option to be able
 to wait synchronously for the script to finish execution.
@@ -46,13 +31,11 @@ If the 'sync' parameter is false, then the script will be launched and Kea
 will not wait for the execution to finish, causing all the OUT parameters of
 the script (including next step) to be ignored.
 
-
 .. note::
 
    Currently the functionality underneath 'sync' parameter is not implemented
    and enabling synchronous calls to external script is not supported.
 
-
 .. _hooks-run-script-hook-points:
 
 This library has several hook points functions implemented which will be
@@ -620,5 +603,3 @@ lease6_decline
    LEASE6_PREFERRED_LIFETIME
    LEASE6_PREFIX_LEN
    LEASE6_TYPE
-
-
index 8cec5537cf37db024f6337b5365db9285b5c4ea5..09c75934749119803865ac1ccc4e7fba6015600b 100644 (file)
@@ -2945,14 +2945,14 @@ both the command and the response.
 
 
 .. include:: hooks-bootp.rst
-.. include:: hooks-cb-cmds.rst
 .. include:: hooks-class-cmds.rst
+.. include:: hooks-cb-cmds.rst
 .. include:: hooks-ha.rst
+.. include:: hooks-stat-cmds.rst
+.. include:: hooks-radius.rst
 .. include:: hooks-host-cache.rst
 .. include:: hooks-lease-query.rst
-.. include:: hooks-radius.rst
 .. include:: hooks-run-script.rst
-.. include:: hooks-stat-cmds.rst
 
 
 .. _user-context-hooks:
index 91b43442eda39d7a76118626295d6cfd9df087ef..3f7fe656ee1ef8c24d81138e13c4596b6aed0e1e 100644 (file)
@@ -23,9 +23,6 @@ IOServicePtr RunScriptImpl::io_service_;
 RunScriptImpl::RunScriptImpl() : name_(), sync_(false) {
 }
 
-RunScriptImpl::~RunScriptImpl() {
-}
-
 void
 RunScriptImpl::configure(LibraryHandle& handle) {
     ConstElementPtr name = handle.getParameter("name");
index 9902105c601243e39ef78beda8a387c2a9db44c8..d12612d037fd47dec4158eb1964acc8f2da53899 100644 (file)
@@ -28,7 +28,7 @@ public:
     RunScriptImpl();
 
     /// @brief Destructor.
-    ~RunScriptImpl();
+    ~RunScriptImpl() = default;
 
     /// @brief Sets IO service to be used by the @ref ProcessSpawn instance.
     ///