We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c112b78 commit c2166bbCopy full SHA for c2166bb
adminapi/dataset.py
@@ -208,8 +208,9 @@ def get_network_ip_addrs(self, attr='intern_ip'):
208
if isinstance(addr, (IPv4Network, IPv6Network)):
209
yield addr
210
211
- def get_free_ip_addrs(self, attr='intern_ip'):
212
- networks = list(self.get_network_ip_addrs(attr))
+ def get_free_ip_addrs(self, attr='intern_ip', networks=None):
+ if networks is None:
213
+ networks = list(self.get_network_ip_addrs(attr))
214
if not networks:
215
raise DatasetError('No networks')
216
0 commit comments