-
-
Save h4ndzdatm0ld/759161287434cdb4e464884c41309710 to your computer and use it in GitHub Desktop.
NC Nornir - Example by russo, n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def netconf_edit_config(task, target, config, **kwargs): | |
""" | |
Nornir task to issue a NETCONF edit_config RPC with optional keyword | |
arguments. Both the target and config arguments must be specified. | |
""" | |
conn = task.host.get_connection("netconf", task.nornir.config) | |
result = conn.edit_config(target=target, config=config, **kwargs) | |
return Result(host=task.host, result=result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment