From 9c3216f15e12b6c7df82887a5857a7a241dbd323 Mon Sep 17 00:00:00 2001 From: jbowdre Date: Tue, 26 Jan 2021 16:41:41 -0600 Subject: [PATCH] allocate from the entire usable range --- src/main/python/get_ip_ranges/source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/get_ip_ranges/source.py b/src/main/python/get_ip_ranges/source.py index ead9747..11ed0a1 100644 --- a/src/main/python/get_ip_ranges/source.py +++ b/src/main/python/get_ip_ranges/source.py @@ -72,8 +72,8 @@ def do_get_ip_ranges(self, auth_credentials, cert): logging.info(f"Found subnet: {ipRange['name']} - {ipRange['description']}.") network = ipaddress.ip_network(str(subnet['subnet']) + '/' + str(subnet['mask'])) ipRange['ipVersion'] = 'IPv' + str(network.version) - ipRange['startIPAddress'] = str(network[10]) - ipRange['endIPAddress'] = str(network[-6]) + ipRange['startIPAddress'] = str(network[1]) + ipRange['endIPAddress'] = str(network[-2]) ipRange['subnetPrefixLength'] = str(subnet['mask']) # return empty set if no nameservers are defined in IPAM try: