-
Hello, Im playing around with nornir subtasks. It's pretty awesome! I got this going:
Works fine until i get to Anything off with the above? I can paste more code if necessary. Any input is much appreciated! -Dave |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You have two options:
def my_super_task(task: Task, ...) -> Result:
result1 = task.run(some_task)
result2 = task.run(some_other_task, some_arg1=result1)
result3 = task.run(yet_another_task, some_arg2=result2)
... |
Beta Was this translation helpful? Give feedback.
-
https://nornir.tech/nornir_napalm/html/api/tasks.html#nornir_napalm.plugins.tasks.napalm_get
That key is being set by the napalm task, if you want it in your transform_task you will have to add it as well, i.e., The only reason why napalm_get does it is because you can request multiple getters in one call so each key would be the response for each getter. What that basically means is you can do this:
If you don't need the key like in this cae there is no good reason to add it. |
Beta Was this translation helpful? Give feedback.
You have two options:
task.host["interface_to_vlan_data"] = interface_to_vlan_data