Closes #1246: Added ability to auto-create the next available IP address within a prefix
This commit is contained in:
@@ -331,7 +331,7 @@ class Prefix(CreatedUpdatedModel, CustomFieldModel):
|
||||
Return all available IPs within this prefix as an IPSet.
|
||||
"""
|
||||
prefix = netaddr.IPSet(self.prefix)
|
||||
child_ips = netaddr.IPSet([ip.address for ip in self.get_child_ips()])
|
||||
child_ips = netaddr.IPSet([ip.address.ip for ip in self.get_child_ips()])
|
||||
available_ips = prefix - child_ips
|
||||
|
||||
# Remove unusable IPs from non-pool prefixes
|
||||
|
Reference in New Issue
Block a user