<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can also use hooks and get all the
lease data when lease is in select, renew, release, decline,
expire and recover state.<br>
<br>
More about that you can see here:<br>
<a class="moz-txt-link-freetext" href="http://git.kea.isc.org/~tester/kea/doxygen/de/df3/dhcpv4Hooks.html">http://git.kea.isc.org/~tester/kea/doxygen/de/df3/dhcpv4Hooks.html</a><br>
<br>
Igor<br>
<br>
On 12/27/2016 11:49 AM, Nandan Adhikari wrote:<br>
</div>
<blockquote
cite="mid:CAHvEBNvwVDd8WZhuwgWZAZVU5eCtnctmiJB041yFvvqjpar1HA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)">Hi
Igor, I am trying to have similar kind of functionality which
OMAPI gives for ISC DHCP.</div>
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)">Its
because we have existing setup in ISC DHCP, where we manage
the DHCP using OMAPI which gives the APIs like 'host_add' or
'host_delete'. I was trying to have something similar to it.
The IP/subnet pool is being managed by another system here,
and therefore what is needed is to somehow insert a lease when
a VM/instance comes up and delete that lease when VM is
destroyed.</div>
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)"><br>
</div>
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)">Thanks
Klaus for the reply. I was actually trying to manage leases,
which I think better would be to use host reservation. I will
give it a try.</div>
<div class="gmail_default" style="font-family:"comic sans
ms",sans-serif;font-size:small;color:rgb(51,0,153)"><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Dec 27, 2016 at 3:50 PM, Igor
Smitran <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sigor@blic.net" target="_blank">sigor@blic.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_-1100774962198917641moz-cite-prefix">Galera
MySQL is MySQL cluster. Kea already has mysql support
and already does all the work you mentioned.<br>
Why would you write another API for functionality that
is already implemented?
<div>
<div class="gmail-h5"><br>
<br>
On 12/27/2016 08:47 AM, Nandan Adhikari wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="gmail-h5">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I am writing a service which assigns IP
addresses to newly provisioned VMs or physical
machines from a pre-defined IP pool. I want to
use KEA with Galera MySQL backend. The problem
I am facing is that there is no docs/info
regarding the Table schema details or SQL
queries to do common tasks like:</div>
<div><br>
</div>
<div>1) lease lookup by mac/ip</div>
<div>2) reservation lookup by mac/ip</div>
<div>3) add new lease</div>
<div>4) delete an existing lease</div>
<div><br>
</div>
<div>Here is what I am thinking for above APIs:</div>
<div><br>
</div>
<div>1) lease lookup by mac: (SELECT
INET_NTOA(address) as address, HEX(hwaddr) as
hwaddr, hostname from lease4 where
HEX(hwaddr)= ?", macid)</div>
<div><br>
</div>
<div>If you could advice me on how to write such
API's to do basic management.</div>
<div><br>
</div>
-- <br>
<div
class="gmail-m_-1100774962198917641gmail_signature">Thanks
& warm wishes,<br>
Nandan Adhikari</div>
</div>
<br>
<fieldset
class="gmail-m_-1100774962198917641mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<span class="gmail-">
<pre>______________________________<wbr>_________________
Kea-users mailing list
<a moz-do-not-send="true" class="gmail-m_-1100774962198917641moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a>
<a moz-do-not-send="true" class="gmail-m_-1100774962198917641moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/kea-users</a>
</pre>
</span></blockquote>
<p>
</p>
</div>
______________________________<wbr>_________________
Kea-users mailing list
<a moz-do-not-send="true" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a moz-do-not-send="true" href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/kea-users</a>
</blockquote></div>
<div>
</div>--
<div class="gmail_signature">Thanks & warm wishes,
Nandan Adhikari</div>
</div></div>
</blockquote><p>
</p></body></html>