Skip to content
Snippets Groups Projects
Commit 9dfd5fc2 authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos
Browse files

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: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
parent 034c116d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment