-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Is there any particular reason for how multiple networks are passed to recipe by separated netX_ipv{4,6} parameters instead of letting LNST to split a larger network into multiple smaller ones based on recipe requirements? I think providing a single larger network to LNST and let it do the subnetting instead of user is a better approach.
Python's ipaddress library implements subnetting - https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.subnets
However, since LNST doesn't use python's ipaddress module, this would require either to refactor LNST's ip addresses machinery to use python's ipaddress or to reimplement .subnets() in LNST.
With that, I think recipes could simply have a count of required networks defined, LNST will split it into networks and provides it to recipe.