-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add Support to Try Multiple Commands #198
Comments
Agree - |
The key element to this is to know when/what constitutes a "passing" condition. If you try multiple commands and the commands and/jmespath render an actual result, should you continue? stop? etc. My initial thought when I was writing the yaml file was to implement a "validator_pattern" of sorts. serial:
commands:
- command: "show version"
parser: "textfsm"
jpath: "[*].serial_number"
- command: "show inventory"
parser: "textfsm"
jpath: "[*].serial_number"
validator_pattern: <maybe a function/regex/other> Where if the first command is tried/parsed, if the post-processed data doesn't match the validator pattern it moves on to the next command. |
Adding to this - Cisco devices have multiple serial numbers displayed in the
Show ver displays the "processor board ID" which is more likely to be the correct serial number but really
|
Environment
Proposed Functionality
Use Case
Ability to onboard more devices with unique command structures.
The text was updated successfully, but these errors were encountered: