Skip to content
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

pass ssh_config only if file exists #538

Merged
merged 2 commits into from
May 13, 2020
Merged

Conversation

dbarrosop
Copy link
Contributor

fixes #537

parameters["ssh_config"] = configuration.ssh.config_file # type: ignore
ssh_config_file = Path(configuration.ssh.config_file) # type: ignore
if ssh_config_file.exists():
parameters["ssh_config"] = ssh_config_file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can perhaps become a bit confusing if a user has made a typo in the name of the config file, that way the supplied file wouldn't exist and the user wouldn't be notified about that problem. But I'm also fine with this small fix for Nornir 2.0 and then I can change it for 3.0.

Copy link
Collaborator

@ktbyers ktbyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@dbarrosop dbarrosop merged commit 30cd14c into develop May 13, 2020
@dbarrosop dbarrosop deleted the netconf_verify_ssh_config branch June 18, 2020 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nornir 2.4.0 requires SSH config file for NETCONF connections
3 participants