[Kea-users] Problem using 'config-set' in API
Wlodek Wencel
wlodek at isc.org
Tue Mar 5 12:00:01 UTC 2024
Hi,
the reservation-add command will accomplish what you need. However, it's
important to note that if you're utilizing a JSON configuration backend,
you must use the config-write command to save any reservations added via
the reservation-add command. Failing to do so will result in the loss of
those reservations upon restarting Kea. If you're using a database to
store host reservations, there is no need to use the config-write command.
ARM:
https://kea.readthedocs.io/en/latest/arm/hooks.html#libdhcp-host-cmds-so-host-commands
Regards,
Wlodek Wencel
QA, ISC
On 05/03/2024 12:51, Andrew Mulheirn via Kea-users wrote:
>
> Hi Veronique –
>
> Thanks very much! I have since discovered that I can use
> 'reservation-add' instead, which achieves what I need. That seems to
> be additive for host reservations.
>
>
>
> Kind regards,
>
> Andy
>
>
> Andrew Mulheirn
>
> Senior Network Architect
>
> M: +44 (0) 74 3654 8126 <tel:+44 (0) 74 3654 8126>
>
> E: andrew.mulheirn at vorboss.com
>
> vorboss.com <https://vorboss.com>
>
>
> Not sure who currently provides your internet?
> Find out here and take our speed test. <https://check.vorboss.com/>
>
>
> Disclaimer: This message is private and confidential. If you have
> received this message in error, please remove it from your system and
> notify us atsysadmin at vorboss.net <mailto:sysadmin at vorboss.net> or by
> telephone +44(0)20 3582 8500. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance
> upon, this information by persons or entities other than the intended
> recipient is prohibited. Privacy Note: Vorboss Limited may monitor
> email traffic data and also the content of email for the purposes of
> security. This email does not create or vary any contractual
> obligations between Vorboss Limited and the intended recipient.
>
> Vorboss Limited is a limited company registered in England and Wales.
> Registered number: 05678571. Registered Office: Vorboss Limited,
> Broadwalk House, 5 Appold Street, London, EC2A 2AG, UNITED KINGDOM.
>
> *From:*Veronique Lefebure <Veronique.Lefebure at cern.ch>
> *Sent:* Tuesday, March 5, 2024 9:49 AM
> *To:* kea-users at lists.isc.org
> *Cc:* Andrew Mulheirn <andrew.mulheirn at vorboss.com>
> *Subject:* Re: Problem using 'config-set' in API
>
> Hi,
>
> config-set will rewrite the whole config file. You cannot "append" a
> configuration bit. To do so you need to use the API.
>
> Cheers,
>
> V.
>
> ------------------------------------------------------------------------
>
> *From:*Kea-users <kea-users-bounces at lists.isc.org> on behalf of Andrew
> Mulheirn via Kea-users <kea-users at lists.isc.org>
> *Sent:* Tuesday, March 5, 2024 10:06 AM
> *To:* kea-users at lists.isc.org <kea-users at lists.isc.org>
> *Cc:* Andrew Mulheirn <andrew.mulheirn at vorboss.com>
> *Subject:* [Kea-users] Problem using 'config-set' in API
>
> Hi,
>
> I am trying to use the API and reading it seems to work fine.
> However, when I write to it using a config-set action, it seems to
> stop working until I restart the service. Here is an example of what
> I am sending in the API call. I am trying to add an IP address
> reservation for a device connected on a particular switch port (using
> option 18):
>
> {
>
> "command":"config-set",
>
> "service":["dhcp6"],
>
> "arguments":{
>
> "Dhcp6":{
>
> "subnet6":[
>
> {
>
> "subnet":"2a00:e300:1102::/64",
>
> "reservations":[
>
> {
>
> "flex-id":"'xe-0/0/4:rsw001'",
>
> "ip-addresses":["2a00:e300:1102::8"]
>
> }
>
> ]
>
> }
>
> ]
>
> }
>
> }
>
> }
>
> Perhaps I have misread the documentation – do I need to be sending the
> entire config in the config-set command? Or can I add IP address
> reservations in an additive way like I am trying to do here?
>
> Any help appreciated,
>
> Kind regards,
>
> Andy
>
> *
> Andrew Mulheirn *
>
> Senior Network Architect
>
> M: +44 (0) 74 3654 8126 <tel:+44%20(0)%2074%203654%208126>
>
> E: andrew.mulheirn at vorboss.com <mailto:andrew.mulheirn at vorboss.com>
>
> vorboss.com <https://vorboss.com>
>
> Not sure who currently provides your internet?
> Find out here and take our speed test. <https://check.vorboss.com/>
>
> Disclaimer: This message is private and confidential. If you have
> received this message in error, please remove it from your system and
> notify us at sysadmin at vorboss.net <mailto:sysadmin at vorboss.net>or by
> telephone +44(0)20 3582 8500. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance
> upon, this information by persons or entities other than the intended
> recipient is prohibited. Privacy Note: Vorboss Limited may monitor
> email traffic data and also the content of email for the purposes of
> security. This email does not create or vary any contractual
> obligations between Vorboss Limited and the intended recipient.
>
> Vorboss Limited is a limited company registered in England and Wales.
> Registered number: 05678571. Registered Office: Vorboss Limited,
> Broadwalk House, 5 Appold Street, London, EC2A 2AG, UNITED KINGDOM.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240305/cf6d4b2d/attachment-0001.htm>
More information about the Kea-users
mailing list