This feature would allow users to request an IP address from a specific subnet. For this we would query for the first unused IP address belonging to our selected subnet with the help of Django’s QuerySet API.
Subnet.objects.filter(ip_address__used=false)[:1].get()
This feature would allow users to request an IP address from a specific subnet. For this we would query for the first unused IP address belonging to our selected subnet with the help of Django’s QuerySet API.
Subnet.objects.filter(ip_address__used=false)[:1].get()