Replies: 1 comment
-
I answered this same question from you here: nornir-automation/nornir_napalm#17 Please only ask a given question in one place. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can someone please help to provide me the syntax to pass the optional_args, secret?
For example, with input, get. pass, Env variable, GPG encryption method, I was able to pass the username and password successfully.
username = input("Enter Username: ")
password = input("Enter Password: ") OR password = getpass.getpass()
nr.inventory.defaults.username = username
nr.inventory.defaults.password = password
However, I don't know the syntax to pass the secret password. I tried with the below options but it doesn't work.
secret = input("Enter Enable Password: ") OR secret = getpass.getpass()
nr.inventory.defaults.secret = secret
nr.inventory.defaults.connection_options.napalm.extras.optional_args.secret = secret
nr.inventory.defaults.connection_options['napalm'] = ConnectionOptions(extras={"optional_args":{"secret":"secret"}})
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions