Protocol Mapper¶
netutils.utils
¶
Utilities for the netutils library.
jinja2_convenience_function()
¶
Convenience function that allows netutils filter to be used easily with jinja2.
Returns:
Type | Description |
---|---|
Dict[str, Callable[..., Any]]
|
Keys are the function names for the Jinja2 filter and values are the function objects. |
Examples:
>>> from netutils.utils import jinja2_convenience_function
>>> function_mappings = jinja2_convenience_function()
>>> function_mappings["get_first_usable"]("192.168.0.0/24")
'192.168.0.1'
>>> function_mappings["get_broadcast_address"]("192.168.0.0/24")
'192.168.0.255'
Source code in netutils/utils.py
Review how to use code within the user documentation