diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2023-07-25 06:29:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2024-09-30 17:39:24 +0000 |
commit | a9014142e131e5b84d384a649665d9f5595e7eef (patch) | |
tree | 3fa5a1ff3f53472a0d0d7229c7b4e8bb15a7ce4a /kea/bin/kea-json | |
parent | Releasing version 20240930. (diff) | |
download | service-tools-next.tar.xz service-tools-next.zip |
kea-json (WIP)next
Diffstat (limited to 'kea/bin/kea-json')
-rw-r--r-- | kea/bin/kea-json | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/kea/bin/kea-json b/kea/bin/kea-json new file mode 100644 index 0000000..9380a3c --- /dev/null +++ b/kea/bin/kea-json @@ -0,0 +1,29 @@ +curl -X POST -H "Content-Type: application/json" -d '{ "command": "lease4-get", "arguments": { "subnet-id": 152, "ip-address": "147.87.152.14"}, "service": [ "dhcp4" ] }' http://localhost:8000/ | jq + +··curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-reload", "service": [ "dhcp4" ] }' http://localhost:8000/ +»·······»·······curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-reload", "service": [ "dhcp6" ] }' http://localhost:8000/ +»·······»·······curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-reload", "service": [ "d2" ] }' http://localhost:8000/ + + + + +- man muss immer die subnet id mitgeben +- mac adressen als identifier sind nur in ipv4 erlabut, nicht in ipv6 + +mein beispiel: + +# get a lease6 +curl -X POST -H "Content-Type: application/json" -d ' +{ "command": "lease6-get", "arguments": { "subnet-id": 601000054, +"ip-address": "2a07:6b41:18:12:15:0:1:9"}, "service": [ "dhcp6" ] }' +http://localhost:8000/ | jq + +# delete lease6 +curl -X POST -H "Content-Type: application/json" -d ' +{ "command": "lease6-del", "arguments": { "subnet-id": 601000054, +"ip-address": "2a07:6b41:18:12:15:0:1:9"}, "service": [ "dhcp6" ] }' +http://localhost:8000/ | jq + +docu: + +https://kea.readthedocs.io/en/latest/arm/hooks.html#libdhcp-lease-cmds-so-lease-commands-for-easier-lease-management |