From 654386559787e88208b3e2aef37fa29c5c0e9bc0 Mon Sep 17 00:00:00 2001 From: jbowdre Date: Mon, 9 Nov 2020 11:25:55 -0600 Subject: [PATCH] improved logging for get_ip_ranges --- src/main/python/get_ip_ranges/source.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/python/get_ip_ranges/source.py b/src/main/python/get_ip_ranges/source.py index 6d5dbf7..d3f98d8 100755 --- a/src/main/python/get_ip_ranges/source.py +++ b/src/main/python/get_ip_ranges/source.py @@ -34,6 +34,7 @@ def do_get_ip_ranges(self, auth_credentials, cert): result_ranges = [] qResult = swis.query("SELECT DISTINCT GroupID AS id, FriendlyName AS name, Address AS addressSpaceId, CIDR AS subnetPrefixLength, Comments AS description, i.CustomProperties.Gateway as gatewayAddress, i.CustomProperties.DNS_Servers as dnsServers, i.CustomProperties.Site_ID AS siteId FROM IPAM.GroupNode i WHERE GroupTypeText LIKE 'Subnet' AND i.CustomProperties.VRA_Range = TRUE") for range in qResult['results']: + logging.info(f"Found subnet: {str(range['name'])}") network = ipaddress.ip_network(str(range['addressSpaceId']) + '/' + str(range['subnetPrefixLength'])) range['ipVersion'] = 'IPv' + str(network.version) range['startIPAddress'] = str(network[10])