-
Notifications
You must be signed in to change notification settings - Fork 742
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
hp_comware_display_interface.textfsm fails on lowercase variation of "maximum frame length" #1960
Comments
@mjbear - I have completed my company's internal process of getting my enterprise account linked to my public account so that i can make a contribution. I'll submit a PR for the above issue following my company's process... May take a few days, but just letting you know that im working on it. Thanks |
@marcus-cain |
Just providing the update, that i am working my internal channels to get this approved. Once approved from my organization, a pull request will be made from my company's external facing repository that has forked this repo. |
Cool. 😎 |
FYI - just providing update that my internals approvals have been completed and a PR should be opened within next couple of days... Thanks for your patience as i worked through my internal process. |
PR has been submitted. |
ISSUE TYPE
NTC Version
$ pip list | grep ntc
ntc_templates 7.5.0
Error Message
TEMPLATE USING
ntc_templates/templates/hp_comware_display_interface.textfsm
SAMPLE COMMAND OUTPUT
Here is the raw ouput from a couple of interfaces. Interface For2/0/30 works properly, but parsing fails on For2/0/31 and For2/0/32
SUMMARY
I have tested this on multiple HP comware 7 devices on multiple versions. For some reason HPE has multiple ways of showing the maximum frame length that can go across an interface. This is causing the template to not parse correctly.
The textfsm template above is using the following logic on this raw string - notice none of the regex patterns in the template match the problematic line:
"The maximum frame length is"
To show this in its entirety, notice when i issue a "display interface | i "frame.+ength" that output has mutliple variations.
1)Maximum frame length: 10000
2)The maximum frame length is 10000
The problematic line being: "The maximum frame length is"
STEPS TO REPRODUCE
** Using the Online TextFSM Playground. Notice that it is erroring out **
PROPOSED SOLUTION
The regular expression logic on line 31 of the textFSM template should be adjusted to account for both lower and upper case representation of "maximum frame length"
Modify Line 31 to have the logic:
Below is a screenshot of a successful rendering with the proposed solution
The text was updated successfully, but these errors were encountered: