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

added support for config snippets #4

Merged
merged 5 commits into from
Aug 22, 2021
Merged

added support for config snippets #4

merged 5 commits into from
Aug 22, 2021

Conversation

hellt
Copy link
Owner

@hellt hellt commented Jul 12, 2021

this PR adds support for

  • send-commands-from-file
  • send-configs
  • send-configs-from-file
    device-level options

The idea is to allow pushing some config to the devices before scrpaligo has cfg support.

/cc @carlmontanari

return
// when sending configs we do not print any responses, as typically configs do not produce any output
if d.SendConfigsFromFile != "" {
_, err := driver.SendConfigsFromFile(d.SendConfigsFromFile)
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be worth it to actual assign the response object and check the Failed attribute (err... method in the case of multi response since I dont know how to do something like a python property in go 😀 ) as this may indicate that the config itself failed from the device perspective -- even if everything "worked" from a scrapli perspective. the Failed attribute is governed by the FailedWhenContains slice of strings -- if we see any of those substrings in the returned output (stuff like "% invalid input" and the like).

@hellt hellt closed this Aug 22, 2021
@hellt hellt reopened this Aug 22, 2021
@hellt hellt merged commit e0a90f8 into master Aug 22, 2021
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.

2 participants