Skip to content
Snippets Groups Projects
  1. Jun 22, 2011
    • Apollon Oikonomopoulos's avatar
      Add lib/ippool.py: IP pool management primitives · 9dfd5fc2
      Apollon Oikonomopoulos authored
      
      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>
      9dfd5fc2
Loading