-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: To have more complex csv with data and for nornir_scrapli usecases #2
Comments
I was actually thinking about the issue of connection options a while back. One idea would be to have it as another csv file:
The hosts csv file is context-sensitive, which means that any column that matches to base attributes (name, hostname, platform, etc...) will be put into the appropriate slots for the host while everything else will be put in the 'data' dict. The same could be done to connection_options:
scrapli:
platform: cisco_iosxr
port: 22
extras:
auth_strict_key: False
ssh_config_file: True
netmiko:
platform: cisco_iosxr
port: 22
extras:
auth_strict_key: False
ssh_config_file: True
In this sense, writing to the |
thanks @matman26 , I will definitely try this option also. One more query, I have used hosts.csv as exactly shown in Readme. But i want to remove username and password from hosts.csv and keep only in defaults.csv or groups.csv I tried that but that doesn't work. Seems it is mandatory in hosts.csv. How can I make it work? |
username: cisco I used it with defaults.yaml in the past instead having it on every host in the hosts.yaml |
Hello @jbl241987, since this is unrelated to the original request I opened a new issue to track it. Further discussion can be done there. I'll push a fix for the defaults handling soon. |
Connection options are now supported. Please update your nornir_csv package:
If any new issues come up, please open a new issue. |
I use more fields in yaml for example of host file below, how can this be documented in CSV?
specially for headers like, data: connection_options:, scrapli:, and scrapli_netconf:
rtr1:
hostname: 10.91.11.11
data:
interface: TenGigE0/0/0/16
localmepid: 1
remotemepid: 2
rd: 1600
evi: 2600
xrsw: 7.1.2
connection_options:
scrapli:
platform: cisco_iosxr
port: 22
extras:
ssh_config_file: True
auth_strict_key: False
scrapli_netconf:
port: 830
extras:
ssh_config_file: True
auth_strict_key: False
The text was updated successfully, but these errors were encountered: