<div dir="ltr"><div class="gmail_default" style="font-size:small">I can delete a lease by doing this...<br><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace">kea-shell</span> <font size="1">(lots of options followed by)</font> <span style="font-family:monospace">lease4-del</span></div><div class="gmail_default" style="font-size:small">Then I hit enter and type    <span style="font-family:monospace">"ip-address": "XXX.XXX.XXX.XXX"</span></div><div class="gmail_default" style="font-size:small">Then hit enter and control-d</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">That seems to work for me.  I'm sure there are other probably better ways to make it work as well.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Dan</div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 28, 2024 at 12:54 PM Jason Keltz <<a href="mailto:jas@yorku.ca">jas@yorku.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi.<br>
<br>
I was trying to use lease4-del in the kea API through kea-shell, but <br>
can't seem to get the syntax right.<br>
<br>
I pass into ...<br>
<br>
  kea-shell --host localhost --port 8000 --service dhcp4<br>
<br>
The following:<br>
<br>
{<br>
<br>
   "command": "lease4-del",<br>
   "arguments": {<br>
     "ip-address": "1.2.3.4"<br>
   }<br>
}<br>
<br>
and get back: Failed to run: HTTP Error 400: Bad Request (of course <br>
ip-address that I pass in is valid).<br>
<br>
Can I also instead pass in an ether or a hostname?<br>
<br>
---<br>
<br>
Just FYI to confirm I have the right setup:<br>
<br>
% kea-shell --host localhost --port 8000 --service dhcp4 list-commands<br>
[ { "arguments": [ "build-report", "config-backend-pull", "config-get", <br>
"config-hash-get", "config-reload", "config-set", "config-test", <br>
"config-write", "dhcp-disable", "dhcp-enable", "lease4-add", <br>
"lease4-del", "lease4-get", "lease4-get-all", "lease4-get-by-client-id", <br>
"lease4-get-by-hostname", "lease4-get-by-hw-address", "lease4-get-page", <br>
"lease4-resend-ddns", "lease4-update", "lease4-wipe", "lease4-write", <br>
"lease6-add", "lease6-bulk-apply", "lease6-del", "lease6-get", <br>
"lease6-get-all", "lease6-get-by-duid", "lease6-get-by-hostname", <br>
"lease6-get-page", "lease6-resend-ddns", "lease6-update", "lease6-wipe", <br>
"lease6-write", "leases-reclaim", "libreload", "list-commands", <br>
"server-tag-get", "shutdown", "statistic-get", "statistic-get-all", <br>
"statistic-remove", "statistic-remove-all", "statistic-reset", <br>
"statistic-reset-all", "statistic-sample-age-set", <br>
"statistic-sample-age-set-all", "statistic-sample-count-set", <br>
"statistic-sample-count-set-all", "status-get", "version-get" ], <br>
"result": 0 } ]<br>
<br>
Jason.<br>
<br>
-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</blockquote></div>