Nolan Brubaker cc7bd498fa Change USED_IPS variable to a Python set
USED_IPS being a list did not convey it's intention of limiting IP
addresses to only one instance. Using the set data type does this, and
removes the need for iterating over the USED_IP array from our own code.

Other lists within the code that use the 'append_if' function were not
changed here because the set datatype does not get written as a list in
YAML, which may be undesirable. It may be completely possible to cast
sets as lists on output, but this patch is largely about clarifying
intent around USED_IPS so the set-to-list dump logic wasn't explored.

Also, the duplicate IP tests were left in place due to the fact that the
IP addresses are populated into a queue structure separately, which may
still have bugs that don't belong to Python or netaddr. In the future,
it may be desirable to modify the IP-handling logic to completely use
netaddr's specialized classes.

Change-Id: I22312321738d1f1001984d4c81f7fd24b7a1f1c8
2016-06-22 10:52:32 -04:00
..
2016-06-02 08:54:41 -05:00