Replies: 2 comments 14 replies
-
That won't work. To understand this, look at the code here and the docs here. When Netbox opens the connection to Napalm:
Therefore, a valid value for Napalm Arguments in Platform settings would be e.g.
(any setting which the driver accepts in "optional_args"), but it is not valid to set either "username" or "password" here. They have to be set in the main configuration. You could argue that if it's allowed to set optional_args at Platform level, that it should be possible to set username, password and timeout here too for consistency. But that would have to be raised as a feature request. |
Beta Was this translation helpful? Give feedback.
-
i am a newbie started with netbox and Its unfortunate that i didn't get any response or right troubleshooting steps on this, dying had to bring this up with no success. Using the above script, i see the response as expected. Its just that API not working from the browser when i click on "status" tab. I have created the "admin" account on the netbox and assigned a token. i believe the device credentials and the netbox need not to be same. still the same error. Authentication to device failed.\n\nCommon causes of this problem are:\n1. Invalid username and password\n2. Incorrect SSH-key file\n3. Connecting to the wrong device\n\nDevice settings: cisco_ios 172.20.113.2:22\n\n\nAuthentication failed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello experts,
I just started with Netbox and this is a basic question and i am missing something here.it gives auth error. i passed the below NAPALM arguments in netbox. when i try the url from netbox server it says " Authentication credentials were not provided".
However when i run the debug from VSCODE from Netbox server for "ios"driver, for running config, it fetched the running config for the same credentials though. Kindly suggest where am i going wrong and where all should i post the credentials with examples if possible. thanks for your time.
VSCODE Output:
import napalm
import json
import sys
import os
driver = napalm.get_network_driver ('ios')
device = driver(hostname ='172.20.113.2',username='ravikiran',password='hdhfjsdksdlk3')
device.open()
print(device.get_config(retrieve='running', full=True))
print(device.get_environment())
device.close()
NAPALM Arguments in Netbox (platform settings):
{"NAPALM_ARGS": {"secret": "Pwd"}, "NAPALM_USERNAME": "ravikiran", "NAPALM_PASSSWORD": "pwd"}
Error:
{
"detail": "Error connecting to the device at 172.20.113.2: Authentication to device failed.\n\nCommon causes of this problem are:\n1. Invalid username and password\n2. Incorrect SSH-key file\n3. Connecting to the wrong device\n\nDevice settings: cisco_ios 172.20.113.2:22\n\n\nAuthentication failed."
}
Beta Was this translation helpful? Give feedback.
All reactions