Open KjellComputer opened 8 months ago
From the examples, you can request next available IP like this:
next = objects.IPAllocation.next_available_ip_from_cidr('default', '10.0.0.0/24')
Sometimes there is a need to exclude IPs from the request, in the REST API this is possible with including in the body:
{"exclude": ["10.0.0.1","10.0.0.2","10.0.0.3"]}
This should also be a possibility with the IPAllocation.next_available_ip function, for example like this:
next = objects.IPAllocation.next_available_ip_from_cidr('default', '10.0.0.0/24', exclude={'10.0.0.1','10.0.0.2','10.0.0.3'})
From the examples, you can request next available IP like this:
next = objects.IPAllocation.next_available_ip_from_cidr('default', '10.0.0.0/24')
Sometimes there is a need to exclude IPs from the request, in the REST API this is possible with including in the body:
{"exclude": ["10.0.0.1","10.0.0.2","10.0.0.3"]}
This should also be a possibility with the IPAllocation.next_available_ip function, for example like this:
next = objects.IPAllocation.next_available_ip_from_cidr('default', '10.0.0.0/24', exclude={'10.0.0.1','10.0.0.2','10.0.0.3'})