[Kea-users] lease4-del

Jason Keltz jas at yorku.ca
Thu Mar 28 17:54:41 UTC 2024


Hi.

I was trying to use lease4-del in the kea API through kea-shell, but 
can't seem to get the syntax right.

I pass into ...

  kea-shell --host localhost --port 8000 --service dhcp4

The following:

{

   "command": "lease4-del",
   "arguments": {
     "ip-address": "1.2.3.4"
   }
}

and get back: Failed to run: HTTP Error 400: Bad Request (of course 
ip-address that I pass in is valid).

Can I also instead pass in an ether or a hostname?

---

Just FYI to confirm I have the right setup:

% kea-shell --host localhost --port 8000 --service dhcp4 list-commands
[ { "arguments": [ "build-report", "config-backend-pull", "config-get", 
"config-hash-get", "config-reload", "config-set", "config-test", 
"config-write", "dhcp-disable", "dhcp-enable", "lease4-add", 
"lease4-del", "lease4-get", "lease4-get-all", "lease4-get-by-client-id", 
"lease4-get-by-hostname", "lease4-get-by-hw-address", "lease4-get-page", 
"lease4-resend-ddns", "lease4-update", "lease4-wipe", "lease4-write", 
"lease6-add", "lease6-bulk-apply", "lease6-del", "lease6-get", 
"lease6-get-all", "lease6-get-by-duid", "lease6-get-by-hostname", 
"lease6-get-page", "lease6-resend-ddns", "lease6-update", "lease6-wipe", 
"lease6-write", "leases-reclaim", "libreload", "list-commands", 
"server-tag-get", "shutdown", "statistic-get", "statistic-get-all", 
"statistic-remove", "statistic-remove-all", "statistic-reset", 
"statistic-reset-all", "statistic-sample-age-set", 
"statistic-sample-age-set-all", "statistic-sample-count-set", 
"statistic-sample-count-set-all", "status-get", "version-get" ], 
"result": 0 } ]

Jason.



More information about the Kea-users mailing list