Open evaachim opened 11 months ago
Ideas to keep in mind:
Some ideas:
We need an address pool to allocate addresses from to every resource that is being added/requested by a user We need an interface to store all IP addresses for active resources We need to check against the above interface to make sure IP addresses do not repeat We need to "free up" addresses once the resource is no longer active so it can be potentially re-used
Further Ideas:
Some things to consider:
To add more as per Dan's requirements
Requirements from Dan:
The IPs in Racktables are of the type long or integer, represented as a string, of either one of the following types: 2887224186, 180612481, 173099303. Thus, these need to be converted to a valid IP address via a series of conversions.
Ideas for achieving this:
This can be accomplished like this:
Conversion to IP is as follows:
decimal -> hex -> bit grouping -> bit shifting -> IP
Assignment of IP:
a function that operates on the new base resource struct to add IPs to those resources which need them.
Our desired format is subnet + slashes
Assign IP addresses for resources which are added to the Zebra server tool by users.