-
Notifications
You must be signed in to change notification settings - Fork 743
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
issues with Aruba CX templates #1453
Comments
@ryanmCUK This bug could be something I attempt to squash once that is complete. By chance could you edit your original comment and put your example output in triple backticks ``` (or use the Code button (I need the real output so we're sure it parses correctly.) |
Hi @mjbear Updated the output code block |
Ah, I see some of the "field names" changed when comparing against https://github.com/networktocode/ntc-templates/blob/master/tests/aruba_aoscx/show_lldp_neighbors-info_detail/show_lldp_neighbors-info_detail.raw |
I made lots of changes in #1469 so I'll end up basing any fix from this issue off of that PR. |
@ryanmCUK I took a shortcut and used https://textfsm.nornir.tech/ for some quick testing (though it only parses the first entry in the raw output). I found was Older Raw Output:
Your Raw Output:
My fix for this in PR #1470 is to modify the regex to match either Chassis or System (to maintain backward compatibility).
New Parsed Output:
|
I did try a parse with the new textfsm file, it didnt parse the output from the aruba cx switch :( I have also noticed that the name of the command is: I have tried changing the name of the .textfsm file and i still cant get it to parse do you know how it uses the correct template in order to parse the data? I am just wondering if this top part of the output is causing an issue:
|
The command name is the most likely cause based on the info you've provided.
The regular expressions to the right in the Try sending a shortened version of the command to see if that works and if so we can figure out how to tweak the Something with the "neighbors-info" truncated such as:
These lines are not the issue as there are regexes in the template that handle those early lines so they don't cause parsing to error out. |
@ryanmCUK Depending on what you find from my suggestion above to use a shortened command version I'd like to share with you some changes for the index file and have you test in real-time. I figure we could hop on NTC's Slack instance. I want to make sure I can bundle any other necessary changes into the PR I have going so it's fixed "upstream". 😉 |
I did try shortening the command as mentioned and that didnt seem to work still got a non-parsed output :( yeah im UTC+1 (UK) so maybe able to try later today. I am on the slack already so just reachout and we can have a chat :) |
@ryanmCUK Since the short command didn't work I planned to suggest you try testing a change to your At line Should this function for you then I'll figure my successful test against raw test data from this project and your real-world testing to be enough to say it is "good". From there I need to update unit testing to cover this and update that PR. 😀 |
To summarize the efforts from today, given the information I have changes in two places should be required.
I updated PR #1470 with these changes in the meantime. Note: It appears Aruba CX gear might echo out the prompt and command when returning output - I say this based on the previous raw output file (please understand I don't have Aruba hardware to verify). @ryanmCUK : Since there sound to be more commands broken, pick the next most important one and please share the raw CLI output (certainly obfuscate any names/IP addresses/MAC addresses/etc). Hopefully we can find a pattern and identify a trend. Each command whose template needs updating will be its own PR (pull request) based on NTC rules. (Just in case we end up with several PRs and people wonder why.) Have a great weekend! |
@ryanmCUK |
fixed in #1470 |
Template Issue with error and raw data
Value Required LOCAL_PORT (\S+)
Value Required CHASSIS_ID (\S+)
Value CHASSIS_NAME (\S+)
Value CHASSIS_DESC (.+)
Value CAPABILITIES (.+)
Value CAPABILITIES_ENABLED (.+)
Value MGMT_ADDR (\S+)
Value PORT_ID (\S+)
Value PORT_DESC (\S+)
Start
^Port\s*:\s*${LOCAL_PORT}
^Neighbor\sChassis-Name\s:\s*${CHASSIS_NAME}
^Neighbor\sChassis-Description\s:\s*${CHASSIS_DESC}
^Neighbor\sChassis-ID\s:\s*${CHASSIS_ID}
^Neighbor\sManagement-Address\s:\s*${MGMT_ADDR}
^Chassis\sCapabilities\sAvailable\s*:\s*${CAPABILITIES}
^Chassis\sCapabilities\sEnabled\s*:\s*${CAPABILITIES_ENABLED}
^Neighbor\sPort-ID\s:\s*${PORT_ID}
^Neighbor\sPort-Desc\s:\s*${PORT_DESC}
^-+$$ -> Record
^Neighbor.*
^TTL.*
^P[D|SE].*
^Power.*
^\s+ -> Next
^\S+#.* -> Next
^LLDP.*
^Total.*
^=+
^. -> Error
SAMPLE COMMAND OUTPUT
Due to software updates to the Aruba CX switches the output of some show commands has changed. This has had an impact on the template not parsing correctly.
EXPECTED RESULTS
Parsed output of data in dictionary
ACTUAL RESULTS
output is in String
The text was updated successfully, but these errors were encountered: