Skip to content

Replace multiple netX_ipv{4,6} params with single net_ipv{4,6} #394

@enhaut

Description

@enhaut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions