openstack-ansible/lib
Nolan Brubaker 99e398125b Add IPManager class for handling IP addresses
This patch begins work on an 'IPManager' class that further decouples
IP/CIDR manipulation from the openstack-ansible configuration handling
logic.

With this patchset, a new implementation is provided and tested in
isolation, with integration into and replacement of existing code set
for follow up patchsets.

The aim is also to provide a working implementation based on a proposed
IP management API for use with plugins. The proposed API is provided as
the IPBasePlugin class, and generic expectations of the API are
documented there.

A few notable changes exist in the new IPManager class versus the
existing codebase:

    - The Queue.Queue class is not used, but rather a plain, randomized
    list. Reviewing the existing implementation, there does not appear
    to be a need to use the specialized queue class.

    - USED_IPS is moved into a set associated with a given IPManager
    object. The expectation is that dynamic_inventory.py will treat
    IPManager as a singleton, but this implementation allows for
    replacing that singleton in test cases, or using multiple instances
    in some other context.

While the lib/ip.py file is not intended to be executed, the python
shebang line was provided in order to comply with our tox linting
searches.

Change-Id: I06729ac2bc1688a39255f2c8ea0d14131b5c2560
2016-11-18 17:07:03 -05:00
..
__init__.py Move management code to inventory lib. 2016-10-11 19:16:24 +00:00
dictutils.py Refactoring inventory generation data manipulation 2016-11-15 14:50:43 -08:00
filesystem.py Refactor inventory generation load/save filesystem 2016-11-16 14:53:56 -08:00
generate.py Move IP logic into separate module 2016-11-17 12:20:37 -05:00
ip.py Add IPManager class for handling IP addresses 2016-11-18 17:07:03 -05:00
manage.py Refactor inventory generation load/save filesystem 2016-11-16 14:53:56 -08:00