Introduce new module for IP pool management
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Mon, 4 Jun 2012 14:33:22 +0000 (17:33 +0300)
committerIustin Pop <iustin@google.com>
Tue, 20 Nov 2012 17:50:54 +0000 (18:50 +0100)
commit1de1cf25454ab076905ec292489f3fafe67b71e2
tree4c24a6e950caed89e39683fe6ed35d3124563e0a
parenteaa4c57c43148a196080d69953e652ad755505e2
Introduce new module for IP pool management

Add new library module lib/network.py.
Introduce new class: AddressPool.

AddressPool implements all operations needed for managing IPs inside
the IP pool.

Given a Network config object (nobj), the class:

 * initializes the corresponding IP pool object via
   network.AddressPool.InitializeNetwork(nobj)
 * obtains the corresponding IP pool object via
   network.AddressPool(nobj)
 * manipulates IPs inside the pool

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/errors.py
lib/network.py [new file with mode: 0644]