Add New Function, Convert to PDK 2.2 #14
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We needed a function which when given two IP addresses, would return the size of the smallest set of contiguous addresses that contains both arguments. Feed it a starting IP and ending IP, and it returns you the size of that range. There's so much other great, useful stuff in here that it seemed like a pretty natural addition to contribute.
I've also re-fit the module with PDK bindings, which are the first two commits in this PR and about 95% of the total change. If you JUST look at my third commit, that's the only new actual code. Of note for the PDK stuff:
Steps to arrive at the first two commits were:
Then go into each function definition and remove the error assignment to
e
because rubocop was unhappy about it, sincee
was never referenced againIncrement the module version in metadata.json from 2.2.0 to 2.2.1
For the new work in the 3rd commit, I added the function underpinnings in ip.rb and the parser function, then incremented the module version to 2.3.0.
Also, pretty please tag the 2.2.1 and 2.3.0 commits appropriately - I don't know of a way to include tags in a PR.