]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4492] Fix message file, add API files
authorThomas Markwalder <tmark@isc.org>
Tue, 5 May 2026 13:17:31 +0000 (09:17 -0400)
committerThomas Markwalder <tmark@isc.org>
Tue, 12 May 2026 17:17:33 +0000 (17:17 +0000)
modified:   src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
modified:   src/share/api/sflq-pool4-create.json
new file:   src/share/api/sflq-pool4-del.json
modified:   src/share/api/sflq-pool4-get-all.json
new file:   src/share/api/sflq-pool4-get-by-range.json
new file:   src/share/api/sflq-pool4-get-by-subnet.json
new file:   src/share/api/sflq-pool6-create.json
new file:   src/share/api/sflq-pool6-del.json
new file:   src/share/api/sflq-pool6-get-all.json
new file:   src/share/api/sflq-pool6-get-by-range.json
new file:   src/share/api/sflq-pool6-get-by-subnet.json

src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
src/share/api/sflq-pool4-create.json
src/share/api/sflq-pool4-del.json [new file with mode: 0644]
src/share/api/sflq-pool4-get-all.json
src/share/api/sflq-pool4-get-by-range.json [new file with mode: 0644]
src/share/api/sflq-pool4-get-by-subnet.json [new file with mode: 0644]
src/share/api/sflq-pool6-create.json [new file with mode: 0644]
src/share/api/sflq-pool6-del.json [new file with mode: 0644]
src/share/api/sflq-pool6-get-all.json [new file with mode: 0644]
src/share/api/sflq-pool6-get-by-range.json [new file with mode: 0644]
src/share/api/sflq-pool6-get-by-subnet.json [new file with mode: 0644]

index cb31b654d64e70242c338fb060c46a2a2ec2bdf3..7b2469360358ffacd8f263a2c4038686a808823d 100644 (file)
@@ -175,6 +175,7 @@ The lease6-wipe command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL4_CREATE sflq-pool4-create command succeeded, (parameters: %1)
+Logged at debug log level 20.
 The sflq-pool4-create command was successful.
 
 % SFLQ_POOL4_CREATE_FAILED sflq-pool4-create command failed, (parameters: %1, reason: %2)
@@ -182,6 +183,7 @@ The sflq-pool4-create command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL4_GET_ALL sflq-pool4-get-all command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool4-get-all command was successful.
 
 % SFLQ_POOL4_GET_ALL_FAILED sflq-pool4-get-all command failed, (parameters: %1, reason: %2)
@@ -189,6 +191,7 @@ The sflq-pool4-get-all command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL4_GET_BY_SUBNET sflq-pool4-get-by-subnet command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool4-get-by-subnet command was successful.
 
 % SFLQ_POOL4_GET_BY_SUBNET_FAILED sflq-pool4-get-by-subnet command failed, (parameters: %1, reason: %2)
@@ -196,6 +199,7 @@ The sflq-pool4-get-subnet command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL4_GET_BY_RANGE sflq-pool4-get-by-range command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool4-get-by-range command was successful.
 
 % SFLQ_POOL4_GET_BY_RANGE_FAILED sflq-pool4-get-by-range command failed, (parameters: %1, reason: %2)
@@ -203,6 +207,7 @@ The sflq-pool4-get-range command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL4_DEL sflq-pool4-del command succeeded, (parameters: %1) pools deleted: %2
+Logged at debug log level 20.
 The sflq-pool4-del command was successful.
 
 % SFLQ_POOL4_DEL_FAILED sflq-pool4-del command failed, (parameters: %1, reason: %2)
@@ -210,6 +215,7 @@ The sflq-pool4-del command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL6_CREATE sflq-pool6-create command succeeded, (parameters: %1)
+Logged at debug log level 20.
 The sflq-pool6-create command was successful.
 
 % SFLQ_POOL6_CREATE_FAILED sflq-pool6-create command failed, (parameters: %1, reason: %2)
@@ -217,6 +223,7 @@ The sflq-pool6-create command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL6_GET_ALL sflq-pool6-get-all command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool6-create command was successful.
 
 % SFLQ_POOL6_GET_ALL_FAILED sflq-pool6-get-all command failed, (parameters: %1, reason: %2)
@@ -224,6 +231,7 @@ The sflq-pool6-get-all command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL6_GET_BY_SUBNET sflq-pool6-get-by-subnet command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool6-get-by-subnet command was successful.
 
 % SFLQ_POOL6_GET_BY_SUBNET_FAILED sflq-pool6-get-by-subnet command failed, (parameters: %1, reason: %2)
@@ -231,6 +239,7 @@ The sflq-pool6-get-subnet command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL6_GET_BY_RANGE sflq-pool6-get-by-range command succeeded, (parameters: %1) pools found: %2
+Logged at debug log level 20.
 The sflq-pool6-get-by-range command was successful.
 
 % SFLQ_POOL6_GET_BY_RANGE_FAILED sflq-pool6-get-by-range command failed, (parameters: %1, reason: %2)
@@ -238,6 +247,7 @@ The sflq-pool6-get-range command has failed. Both the reason as well as the
 parameters passed are logged.
 
 % SFLQ_POOL6_DEL sflq-pool4-del command succeeded, (parameters: %1) pools deleted: %2
+Logged at debug log level 20.
 The sflq-pool6-del command was successful.
 
 % SFLQ_POOL6_DEL_FAILED sflq-pool4-del command failed, (parameters: %1, reason: %2)
index 13a4e1f345a1641303690f0dd6084bef11b0735a..e16bfa340baf6c4667070e416b3493250c91b6bf 100644 (file)
@@ -2,7 +2,7 @@
     "access": "write",
     "avail": "3.2.0",
     "brief": [
-        "This command requests the lease back end to a v4 SFLQ pool and its free lease data."
+        "This command instructs the lease back end to create a v4 SFLQ pool and its free lease data."
     ],
     "cmd-syntax": [
         "{",
         "       \"start-address\": \"1.2.3.4\",",  
         "       \"end-address\": \"1.2.3.4\",",  
         "       \"subnet-id\": 123",
+        "       \"recreate\" : false",
         "        } ]",
         "    }",
         "}"
     ],
-    "description": "See <xref linkend=\"idp69\"/>",
+    "description": "See <xref linkend=\"command-sflq-pool4-create\"/>",
     "hook": "lease_cmds",
     "name": "sflq-pool4-create",
     "resp-syntax": [
@@ -25,6 +26,7 @@
         "}"
     ],
     "support": [
-        "kea-dhcp4"
+        "kea-dhcp4",
+        "kea-dhcp6"
     ]
 }
diff --git a/src/share/api/sflq-pool4-del.json b/src/share/api/sflq-pool4-del.json
new file mode 100644 (file)
index 0000000..e6e24a8
--- /dev/null
@@ -0,0 +1,30 @@
+{
+    "access": "write",
+    "avail": "3.2.0",
+    "brief": [
+        "This command deletes a pool that exactly matches an address range from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool4-get-get-by-range\"",
+        "   \"arguments\": {",
+        "       \"end-address\": \"192.0.2.255\",",
+        "       \"start-address\": \"192.0.2.0\",",
+        "       \"force\": true",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool4-del\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool4-del",
+    "resp-syntax": [
+        "{",
+        \"result\": 0,",
+        \"text\": \"1 pool(s) deleted.\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
index 929040a4ea446a997c09a4f877f70b0f2e124ff0..d16e986e60dab6ae0ce6adfc09d6009ec635601d 100644 (file)
@@ -1,15 +1,15 @@
 {
-    "access": "write",
+    "access": "read",
     "avail": "3.2.0",
     "brief": [
-        "This command fetches a list of all V4 SFLQ pools from the lease back end."
+        "This command fetches a list of all v4 SFLQ pools from the lease back end."
     ],
     "cmd-syntax": [
         "{",
         "    \"command\": \"sflq-pool4-get-all\"",
         "}"
     ],
-    "description": "See <xref linkend=\"idp69\"/>",
+    "description": "See <xref linkend=\"command-sflq-pool4-get-all\"/>",
     "hook": "lease_cmds",
     "name": "sflq-pool4-get-all",
     "resp-syntax": [
@@ -32,6 +32,7 @@
         "}"
     ],
     "support": [
-        "kea-dhcp4"
+        "kea-dhcp4",
+        "kea-dhcp6"
     ]
 }
diff --git a/src/share/api/sflq-pool4-get-by-range.json b/src/share/api/sflq-pool4-get-by-range.json
new file mode 100644 (file)
index 0000000..93c8e67
--- /dev/null
@@ -0,0 +1,42 @@
+{
+    "access": "read",
+    "avail": "3.2.0",
+    "brief": [
+        "This command fetches a list of all v4 SFLQ pools that overlap an address range from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool4-get-get-by-range\"",
+        "   \"arguments\": {",
+        "       \"end-address\": \"192.0.2.255\",",
+        "       \"start-address\": \"192.0.2.0\"",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool4-get-by-range\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool4-get-by-range",
+    "resp-syntax": [
+        "{",
+        "\"arguments\": {",
+        "   \"pools\": [",
+        "       {",
+        "            \"created-ts\": \"2026-05-02 10:54:55.000000\",",
+        "            \"delegated-len\": 128,",
+        "            \"end-address\": \"192.0.2.255\",",
+        "            \"free-leases\": 256,",
+        "            \"lease-type\": \"V4\",",
+        "            \"modified-ts\": \"2026-05-02 10:54:55.000000\",",
+        "            \"start-address\": \"192.0.2.0\",",
+        "            \"subnet-id\": 123",
+        "       }",
+        "]]",
+        \"result\": 0,",
+        \"text\": \"1 pool(s) found.\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool4-get-by-subnet.json b/src/share/api/sflq-pool4-get-by-subnet.json
new file mode 100644 (file)
index 0000000..4fea378
--- /dev/null
@@ -0,0 +1,41 @@
+{
+    "access": "read",
+    "avail": "3.2.0",
+    "brief": [
+        "This command fetches a list of all v4 SFLQ pools that belong to a subnet from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool4-get-get-by-subnet\"",
+        "   \"arguments\": {",
+        "       \"subnet-id\": 123",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool4-get-by-subnet\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool4-get-by-subnet",
+    "resp-syntax": [
+        "{",
+        "\"arguments\": {",
+        "   \"pools\": [",
+        "       {",
+        "            \"created-ts\": \"2026-05-02 10:54:55.000000\",",
+        "            \"delegated-len\": 128,",
+        "            \"end-address\": \"192.0.2.255\",",
+        "            \"free-leases\": 256,",
+        "            \"lease-type\": \"V4\",",
+        "            \"modified-ts\": \"2026-05-02 10:54:55.000000\",",
+        "            \"start-address\": \"192.0.2.0\",",
+        "            \"subnet-id\": 123",
+        "       }",
+        "]]",
+        \"result\": 0,",
+        \"text\": \"1 pool(s) found.\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool6-create.json b/src/share/api/sflq-pool6-create.json
new file mode 100644 (file)
index 0000000..72595e0
--- /dev/null
@@ -0,0 +1,33 @@
+{
+    "access": "write",
+    "avail": "3.2.0",
+    "brief": [
+        "This command instructs the lease back end to create a v6 SFLQ pool and its free lease data."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"sflq-pool6-create\",",
+        "    \"arguments\": {",
+        "       \"start-address\": \"1.2.3.4\",",  
+        "       \"end-address\": \"1.2.3.4\",",  
+        "       \"lease-type\": \"IA_PD\"," ,
+        "       \"delegated-len\": 64",
+        "       \"recreate\" : false",
+        "        } ]",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool6-create\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool6-create",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"SFLQ pool created.\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool6-del.json b/src/share/api/sflq-pool6-del.json
new file mode 100644 (file)
index 0000000..4f16a27
--- /dev/null
@@ -0,0 +1,30 @@
+{
+    "access": "write",
+    "avail": "3.2.0",
+    "brief": [
+        "This command deletes a pool that exactly matches an address range from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool6-get-get-by-range\"",
+        "   \"arguments\": {",
+        "       \"end-address\": \"3001::10\",",
+        "       \"start-address\": \"3001::FFFF\",",
+        "       \"force\": true",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool6-del\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool6-del",
+    "resp-syntax": [
+        "{",
+        \"result\": 0,",
+        \"text\": \"1 pool(s) deleted.\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool6-get-all.json b/src/share/api/sflq-pool6-get-all.json
new file mode 100644 (file)
index 0000000..5a4d7c5
--- /dev/null
@@ -0,0 +1,49 @@
+{
+    "access": "read",
+    "avail": "3.2.0",
+    "brief": [
+        "This command fetches a list of all v6 SFLQ pools from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"sflq-pool6-get-all\"",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool6-get-all\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool6-get-all",
+    "resp-syntax": [
+        "{",
+        "    \"arguments\": {",
+        "        \"pools\": [",
+        "            {",
+        "                \"created-ts\": \"2026-05-05 08:40:40.000000\",",
+        "                \"delegated-len\": 128,",
+        "                \"end-address\": \"3001::ffff\",",
+        "                \"free-leases\": 65520,",
+        "                \"lease-type\": \"IA_NA\",",
+        "                \"modified-ts\": \"2026-05-05 08:40:41.000000\",",
+        "                \"start-address\": \"3001::10\",",
+        "                \"subnet-id\": 100",
+        "            },",
+        "            {",
+        "                \"created-ts\": \"2026-05-05 08:40:41.000000\",",
+        "                \"delegated-len\": 64,",
+        "                \"end-address\": \"3001:20:0:ff:ffff:ffff:ffff:ffff\",",
+        "                \"free-leases\": 256,",
+        "                \"lease-type\": \"IA_PD\",",
+        "                \"modified-ts\": \"2026-05-05 08:40:41.000000\",",
+        "                \"start-address\": \"3001:20::\",",
+        "                \"subnet-id\": 100",
+        "            }",
+        "        ]",
+        "    },",
+        "    \"result\": 0,",
+        "    \"text\": \"2 pool(s) found.\"",
+        "}"
+   ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool6-get-by-range.json b/src/share/api/sflq-pool6-get-by-range.json
new file mode 100644 (file)
index 0000000..f950fde
--- /dev/null
@@ -0,0 +1,43 @@
+{
+    "access": "read",
+    "avail": "3.2.0",
+    "brief": [
+        "This command fetches a list of all v6 SFLQ pools that overlap an address range from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool6-get-get-by-range\"",
+        "   \"arguments\": {",
+        "       \"end-address\": \"3001::FFFF\",",
+               "       \"start-address\": \"3001::10\"",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool6-get-by-range\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool6-get-by-range",
+    "resp-syntax": [
+               "{",
+               "    \"arguments\": {",
+               "        \"pools\": [",
+               "            {",
+               "                \"created-ts\": \"2026-05-05 08:40:40.000000\",",
+               "                \"delegated-len\": 128,",
+               "                \"end-address\": \"3001::ffff\",",
+               "                \"free-leases\": 65520,",
+               "                \"lease-type\": \"IA_NA\",",
+               "                \"modified-ts\": \"2026-05-05 08:40:41.000000\",",
+               "                \"start-address\": \"3001::10\",",
+               "                \"subnet-id\": 100",
+               "            }",
+               "        ]",
+               "    },",
+               "    \"result\": 0,",
+               "    \"text\": \"1 pool(s) found.\"",
+               "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/sflq-pool6-get-by-subnet.json b/src/share/api/sflq-pool6-get-by-subnet.json
new file mode 100644 (file)
index 0000000..af57ad0
--- /dev/null
@@ -0,0 +1,52 @@
+{
+    "access": "read",
+    "avail": "3.2.0",
+    "brief": [
+        "This command fetches a list of all v6 SFLQ pools that belong to a subnet from the lease back end."
+    ],
+    "cmd-syntax": [
+        "{",
+        "   \"command\": \"sflq-pool6-get-get-by-subnet\"",
+        "   \"arguments\": {",
+        "       \"subnet-id\": 100",
+        "   }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-sflq-pool6-get-by-subnet\"/>",
+    "hook": "lease_cmds",
+    "name": "sflq-pool6-get-by-subnet",
+    "resp-syntax": [
+               "{",
+               "    \"arguments\": {",
+               "        \"pools\": [",
+               "            {",
+               "                \"created-ts\": \"2026-05-05 08:40:40.000000\",",
+               "                \"delegated-len\": 128,",
+               "                \"end-address\": \"3001::ffff\",",
+               "                \"free-leases\": 65520,",
+               "                \"lease-type\": \"IA_NA\",",
+               "                \"modified-ts\": \"2026-05-05 08:40:41.000000\",",
+               "                \"start-address\": \"3001::10\",",
+               "                \"subnet-id\": 100",
+               "            },",
+               "            {",
+               "                \"created-ts\": \"2026-05-05 08:40:41.000000\",",
+               "                \"delegated-len\": 64,",
+               "                \"end-address\": \"3001:20:0:ff:ffff:ffff:ffff:ffff\",",
+               "                \"free-leases\": 256,",
+               "                \"lease-type\": \"IA_PD\",",
+               "                \"modified-ts\": \"2026-05-05 08:40:41.000000\",",
+               "                \"start-address\": \"3001:20::\",",
+               "                \"subnet-id\": 100",
+               "            }",
+               "        ]",
+               "    },",
+               "    \"result\": 0,",
+               "    \"text\": \"2 pool(s) found.\"",
+               "}"
+    ],
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}