Dec-18-2019, 04:48 PM
Thanks for your patience.
For netmiko, I need the following information to establish a connection.
net_conn = Netmiko(host='xxxxxx', username='test',
password=getpass(), device_type='cisco_ios')
So, from the *.csv file, I'd like to somehow create a dictionary of the devices so I can just call the dictionary to establish SSH sessions.
Now, in some examples I see this -
testswitch = {'ip': 'x.x.x.x',
'device_type': 'cisco_ios',
'username': 'user',
'password': 'password'}
devices - [testswitch, and then listing the rest of the devices]
for device in devices:
So, I'm wondering if it is possible to pull that information from the csv file automatically or if I need to manually create a host file of all my devices first and call that file.
For netmiko, I need the following information to establish a connection.
net_conn = Netmiko(host='xxxxxx', username='test',
password=getpass(), device_type='cisco_ios')
So, from the *.csv file, I'd like to somehow create a dictionary of the devices so I can just call the dictionary to establish SSH sessions.
Now, in some examples I see this -
testswitch = {'ip': 'x.x.x.x',
'device_type': 'cisco_ios',
'username': 'user',
'password': 'password'}
devices - [testswitch, and then listing the rest of the devices]
for device in devices:
So, I'm wondering if it is possible to pull that information from the csv file automatically or if I need to manually create a host file of all my devices first and call that file.