I can delete a lease by doing this... kea-shell (lots of options followed by) lease4-del Then I hit enter and type "ip-address": "XXX.XXX.XXX.XXX" Then hit enter and control-d
That seems to work for me. I'm sure there are other probably better ways to make it work as well. --Dan On Thu, Mar 28, 2024 at 12:54 PM Jason Keltz <j...@yorku.ca> wrote: > 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. > > -- > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > Kea-users mailing list > Kea-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/kea-users >
-- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list Kea-users@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users