Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add netmask <> wildcardmask utils #616

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

jtdub
Copy link
Contributor

@jtdub jtdub commented Jan 22, 2025

Adds the ability to convert netmasks to wildcard masks and vise versa. It also registers the functions as jinja filters.

@@ -52,7 +52,10 @@
| is_ip_within | netutils.ip.is_ip_within |
| is_netmask | netutils.ip.is_netmask |
| is_network | netutils.ip.is_network |
| is_wildcardmask | netutils.ip.is_wildcardmask |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to change this to is_reversible_wildcardmask as 0.0.255.0 is a proper wildcard mask, just not reversible to a subnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants