@miracuru
I finally got the conversion of opnsense isc static lease to opnsense kea reservation working.
It was a one line change to my original posted script.
I will post it tomorrow on GitHub.
From the opnsense config .xml
The python script reads a cut&paste that contains the isc dhcp static lease. Need to add ur subnet uuid to the python code prior to execution.
And writes a file that contains the conversion to kea dhcp reservations:
I finally got the conversion of opnsense isc static lease to opnsense kea reservation working.
It was a one line change to my original posted script.
I will post it tomorrow on GitHub.
From the opnsense config .xml
The python script reads a cut&paste that contains the isc dhcp static lease. Need to add ur subnet uuid to the python code prior to execution.
Code Select
<dhcpd>
<lan>
<enable>1</enable>
<ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
<numberoptions>
<item/>
</numberoptions>
<range>
<from>10.59.11.200</from>
<to>10.59.11.245</to>
</range>
<winsserver/>
<dnsserver/>
<ntpserver/>
<staticmap>
<mac>a1:b1:c1:d1:e1:f1</mac>
<ipaddr>10.59.11.100</ipaddr>
<hostname>DAD-DESKTOP</hostname>
<descr>DAD-DESKTOP</descr>
<winsserver/>
<dnsserver/>
<ntpserver/>
</staticmap>
<staticmap>
<mac>a2:b2:c2:d2:e2:f2</mac>
<ipaddr>10.59.11.101</ipaddr>
<hostname>MOM-DESKTOP</hostname>
<descr>MOM-DESKTOP</descr>
<winsserver/>
<dnsserver/>
<ntpserver/>
</staticmap>
</lan>
</dhcpd>
And writes a file that contains the conversion to kea dhcp reservations:
Code Select
<reservation uuid="c7495e59-000b-4bf3-b083-0d35f099e946">
<subnet>4e3016b1-b603-44bd-a361-b33c44333c98</subnet>
<ip_address>10.59.11.100</ip_address>
<hw_address>a1:b1:c1:d1:e1:f1</hw_address>
<hostname>DAD-DESKTOP</hostname>
<description>DAD-DESKTOP</description>
</reservation>
<reservation uuid="c82430df-45c7-4d9b-b11b-22f228af7e02">
<subnet>4e3016b1-b603-44bd-a361-b33c44333c98</subnet>
<ip_address>10.59.11.101</ip_address>
<hw_address>a2:b2:c2:d2:e2:f2</hw_address>
<hostname>MOM-DESKTOP</hostname>
<description>MOM-DESKTOP</description>
</reservation>
"