You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to get the interfaces from several network devices like ios/asa etc. I did everything like in the documentation tutorial part is shown.
from nornir import InitNornir
from nornir_napalm.plugins.tasks import napalm_cli
from nornir_utils.plugins.functions import print_result
nr = InitNornir(
inventory={
"plugin": "SimpleInventory",
"options": {
"host_file": "hosts.yaml",
"group_file": "groups.yaml",
"defaults_file": "defaults.yaml",
}
},
dry_run=True,
)
result = nr.run(
napalm_cli,
commands=["show version", "show interfaces"],
)
print_result(result)
Instead of getting the Interfaces i got an error.
vvvv napalm_cli ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ERROR
Traceback (most recent call last):
File "\AppData\Local\Programs\Python\Python38\lib\site-packages\nornir\core\task.py", line 98, in start
r = self.task(self, **self.params)
File " \AppData\Local\Programs\Python\Python38\lib\site-packages\nornir_napalm\plugins\tasks\napalm_cli.py", line 19, in napalm_cli
device = task.host.get_connection(CONNECTION_NAME, task.nornir.config)
File " \AppData\Local\Programs\Python\Python38\lib\site-packages\nornir\core\inventory.py", line 442, in get_connection
conn = self.get_connection_parameters(connection)
File " \AppData\Local\Programs\Python\Python38\lib\site-packages\nornir\core\inventory.py", line 373, in get_connection_parameters
r = self._get_connection_options_recursively(connection)
File " \AppData\Local\Programs\Python\Python38\lib\site-packages\nornir\core\inventory.py", line 405, in _get_connection_options_recursively
sp = g._get_connection_options_recursively(connection)
AttributeError: 'str' object has no attribute '_get_connection_options_recursively'
^^^^ END napalm_cli ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Does anyone has a recommendation how to fix the error?
Best,
KamexX
The text was updated successfully, but these errors were encountered:
I would like to get the interfaces from several network devices like ios/asa etc. I did everything like in the documentation tutorial part is shown.
Instead of getting the Interfaces i got an error.
Does anyone has a recommendation how to fix the error?
Best,
KamexX
The text was updated successfully, but these errors were encountered: