Suggest next available IP and update IP record in one API call.Completed
Having two calls, one for suggesting the next IP and one for updating the IP record introduces a possible race condition. We hit this today. Two admins run a script to allocate an IP in the same subnet at the same time. Both are given the same IP, one stomps on the other because /ips/ will happily update the record with the new device.
It would be helpful to have an API call that did both in a single transaction.
This was fixed in v7.2.0. We added an option called reserve_ip to the suggest IP API call.
Basically, you can send "reserve_ip"="yes" when doing the suggest IP API call and it will reserve the suggested IP.
Please sign in to leave a comment.