subnetallocator.py

botoform.subnetallocator.allocate(cidrs, sizes)

Accept network block CIDRs and list of subnetwork CIDR sizes. Return a list of IPNetwork objects allocated from the network block.

For example:

>>> allocate('10.10.10.0/24', [28,27,29])
[IPNetwork('10.10.10.0/27'), IPNetwork('10.10.10.32/28'), IPNetwork('10.10.10.48/29')]