« Previous | Next » 

Revision 22dc14c4

Parent 06dfde19
Child 53195377

Added by Dimitris Aragiorgis about 11 years ago

Total refactor of network module

Add GenericNetwork class to implement basic validation methods
for an IPv4/IPv6 network basically conserning gateways and subnets.

Make AddressPool class extend GenericNetwork and implement methods
that reserve/release IPs in a IPv4 address pool (using bitarray).
After any of these operations updates the corresponding reservations
of L{objects.Network}.

Add Network class which is a wrapper of those two. If L{objects.Network}
has an IPv4 network then an AddressPool is returned otherwise a
GenericNetwork. Furthermore implement a method that checks if a
given address, network pair is valid.

External code should only do:

nobj = objects.Network(...)
network = network.Network(nobj)

Signed-off-by: Dimitris Aragiorgis <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences