Tag Archives: netaddr

[python]Comparing missing ip addresses between original inventory with object group

An inventory list is kept to record hostnames and ip addresses, this inventory list (inventory.xlsx) is currently maintained by automation. For every virtual machine created, the hostname and its corresponding ip address are recorded in the list, automation will update … Continue reading

Posted in Python, Scripting | Tagged , , , , , | Leave a comment

[python]Excluding ip addresses belonging a subnet

suppose if you need to enumerate ip addresses from a list, but want to exclude ip addresses belonging to a subnet here’s a solution which you can do with netaddr module. Supposed ip_from_inventory is the list of ip addresses you … Continue reading

Posted in Python, Scripting | Tagged , | Leave a comment