« Previous | Next » 

Revision 9dfd5fc2

ID9dfd5fc23a90cea58628e69bb54aa45eff459ea5

Added by Apollon Oikonomopoulos almost 13 years ago

Add lib/ippool.py: IP pool management primitives

This patch introduces primitive structures for IP pool management. The core of
the IP Pool management framework is the ippool.IPv4Network class, which encodes
an IPv4 subnet configuration with its IP address pool. The pool functionality
depends on python-bitarray and python-ipaddr is used for address manipulation.

ippool.IPv4Network has 3 key attributes:
- net: The IPv4 subnet definition (CIDR notation)
- gateway: The default gateway used, if any
- _pool: a bitarray.bitarray storing the reservation status of individual IPs

The purpose of including ippool.IPv4Network in ganeti is two-fold:
- It will allow including subnet information useful for network configuration
(e.g. by being available during an OS provider invocation)
- It will be used for automatic IP address allocation during instance creation
for both, routed and bridged modes.

Signed-off-by: Apollon Oikonomopoulos <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences