mirror of
https://github.com/jbowdre/phpIPAM-for-vRA8.git
synced 2024-12-12 07:22:17 +00:00
allocate from the entire usable range
This commit is contained in:
parent
6581fde145
commit
9c3216f15e
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ def do_get_ip_ranges(self, auth_credentials, cert):
|
||||||
logging.info(f"Found subnet: {ipRange['name']} - {ipRange['description']}.")
|
logging.info(f"Found subnet: {ipRange['name']} - {ipRange['description']}.")
|
||||||
network = ipaddress.ip_network(str(subnet['subnet']) + '/' + str(subnet['mask']))
|
network = ipaddress.ip_network(str(subnet['subnet']) + '/' + str(subnet['mask']))
|
||||||
ipRange['ipVersion'] = 'IPv' + str(network.version)
|
ipRange['ipVersion'] = 'IPv' + str(network.version)
|
||||||
ipRange['startIPAddress'] = str(network[10])
|
ipRange['startIPAddress'] = str(network[1])
|
||||||
ipRange['endIPAddress'] = str(network[-6])
|
ipRange['endIPAddress'] = str(network[-2])
|
||||||
ipRange['subnetPrefixLength'] = str(subnet['mask'])
|
ipRange['subnetPrefixLength'] = str(subnet['mask'])
|
||||||
# return empty set if no nameservers are defined in IPAM
|
# return empty set if no nameservers are defined in IPAM
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue