<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-mailStlus17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=HU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I think you should read the WHOLE documentation before trying to set up complex things.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>For the SQL you’ll have to set up the schema first – see docs -, set up KEA to use MySQL not just for leases, but for hosts too (separate part in ipv4/6 config)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><a href="https://downloads.isc.org/isc/kea/1.7.7/doc/html/arm/admin.html">https://downloads.isc.org/isc/kea/1.7.7/doc/html/arm/admin.html</a> <- start somewhere here<span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>               Tom<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Kea-users [mailto:kea-users-bounces@lists.isc.org] <b>On Behalf Of </b>Marcin Romanowski<br><b>Sent:</b> Sunday, May 31, 2020 1:06 PM<br><b>To:</b> kea-users@lists.isc.org<br><b>Subject:</b> Re: [Kea-users] Storing host reservation in custom database<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I have found this documentation <a href="https://gitlab.isc.org/isc-projects/kea/-/wikis/docs/editing-host-reservations">https://gitlab.isc.org/isc-projects/kea/-/wikis/docs/editing-host-reservations</a> this what I was looking for.<o:p></o:p></p><div><p class=MsoNormal>But I cannot find information, how to configure the "hosts" table :( In my database I have that table name already so I can prepare view but this cannot be named 'hosts" but kea make SELECT on this table :(<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>niedz., 31 maj 2020 o 10:04 Marcin Romanowski <<a href="mailto:marcin@nicram.net">marcin@nicram.net</a>> napisał(a):<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><div><div><p class=MsoNormal>Hello,<o:p></o:p></p></div><div><p class=MsoNormal>I'd like to store dhcpv4 host reservations in my database which is currently in production. In documentation I've found, that I can create my own view and configure it as read-only.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In kea database schema there are columns in host table:<o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>  host_id SERIAL PRIMARY KEY NOT NULL,<br>  dhcp_identifier BYTEA NOT NULL,<br>  dhcp_identifier_type SMALLINT NOT NULL,<br>  dhcp4_subnet_id INT DEFAULT NULL,<br>  dhcp6_subnet_id INT DEFAULT NULL,<br>  ipv4_address BIGINT DEFAULT NULL,<br>  hostname VARCHAR(255) DEFAULT NULL,<br>  dhcp4_client_classes VARCHAR(255) DEFAULT NULL,<br>  dhcp6_client_classes VARCHAR(255) DEFAULT NULL</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>My question is about `dhcp_identifier` column and ipv4_address. This should be hw-address, duid corresponding to dhcp_identifier_type. In my database ipv4 address I store as ::inet.<o:p></o:p></p></div><div><p class=MsoNormal>dhcp4_subnet_id is integer. So I have to in config add subnet_id argument or I can return string for example "<a href="http://192.168.12.0/24" target="_blank">192.168.12.0/24</a>" as subnet?  <o:p></o:p></p></div><div><p class=MsoNormal>How could I return data in my view to be proper format for kea?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best regards<o:p></o:p></p></div><div><p class=MsoNormal>MarcinR<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><p class=MsoNormal>Marcin Romanowski / nicraM<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><img border=0 width=96 height=26 id="_x0000_i1025" src="https://docs.google.com/uc?export=download&id=1tF66ovI5kS7h-4bp0atR0UMIQMnsAEbm&revid=0B1o0UzQJ45KxQ3VhbEhEQ2szRXV6SEhaS1hpVmx6UWNxV2pFPQ"><o:p></o:p></p></div></div></div></div></div></div></div></body></html>