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.
This is based on the work already submitted in #14, and includes another update to the PDK templates (although unfortunately not very much of one, this time). This adds some usefull functions for comparing and equality-testing IP addresses, both with equivalent functions for traditional boolean-return comparisons (
>
,>=
,==
,<=
, and<
), and for use with functions like Puppet'ssort()
, which execute a block and expect one of-1
,0
, or1
as return to indicate whether the left operand is smaller than, equal to, or greater than the right, and will perform arbitrarily elaborate sorts accordingly.My specific need for this was the
sort()
case to put a list of IP addresses in sorted order to (hopefully) match the output of a certain popularly-unpopular network management tool, and the others were just simple enough at that point that there wasn't a good reason NOT to include them (or at least, that's what I thought until I started writing docs for all of them, heh).