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

hp_comware_display_interface.textfsm fails on lowercase variation of "maximum frame length" #1960

Closed
marcus-cain opened this issue Jan 6, 2025 · 6 comments · Fixed by #1982

Comments

@marcus-cain
Copy link
Contributor

ISSUE TYPE

  • Template Issue with error and raw data

NTC Version

$ pip list | grep ntc
ntc_templates 7.5.0

Error Message

raise TextFSMError('State Error raised. Rule Line: %s. Input Line: %s'
	textfsm.parser.TextFSMError: State Error raised. Rule Line: 187. Input Line: The maximum frame length is 10000 

image

TEMPLATE USING

ntc_templates/templates/hp_comware_display_interface.textfsm

Value Required INTERFACE (\S+)
Value LINE_STATUS (UP|DOWN|Administratively DOWN)
Value PROTOCOL_STATUS (UP(\(spoofing\))?|DOWN)
Value List IP_ADDRESS (\S+)
Value MTU (\d+)
Value L2MTU (\d+)
Value List HW_ADDRESS ([a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+)
Value DESCRIPTION (.*)
Value BANDWIDTH (.*)
Value DUPLEX (\S+)
Value SPEED (\S+)
Value PORT_LINK_TYPE (\S+)
Value UNTAGGED_VLAN_ID (\d+)
Value VLAN_NATIVE (\d+)
Value List VLAN_PASSING ([^,]+)
Value List VLAN_PERMITTED ([^,]+)

Start
  #^\S+$$.Record
  ^\s*${INTERFACE}$$
  ^\s*Current\s+state:\s+${LINE_STATUS}
  ^\s*${INTERFACE}\s+current\s+state\s*:\s*${LINE_STATUS}
  ^\s*Line\s+protocol\s+state:\s+${PROTOCOL_STATUS}
  ^\s*Line\s+protocol\s+current\s+state:\s+${PROTOCOL_STATUS}
  ^\s*Description:\s+${DESCRIPTION}
  ^\s*Bandwidth:\s+${BANDWIDTH}
  ^\s*Maximum\s+[Tt]ransmi\S+\s+[Uu]nit:\s+${MTU}
  ^\s*The\sMaximum\s+Transmit\s+Unit\sis\s+${MTU}
  ^\s*Maximum\s+frame\s+length:\s+${L2MTU}
  ^\s*Forbid\s+jumbo\s+frames\s+to\s+pass
  ^\s*The\sMaximum\s+Frame\s+Length\sis\s+${L2MTU}
  ^\s*Internet\s+[Aa]ddress:\s+${IP_ADDRESS}\s+\([Pp]rimary\)
  ^\s*Internet\s+[Aa]ddress\sis\s+${IP_ADDRESS}\s+[Pp]rimary
  ^\s*Internet\s+[Aa]ddress:\s+${IP_ADDRESS}\s+\([Ss]ub\)
  ^\s*IP\s+[Pp]acket\s+[Ff]rame\s+[Tt]ype\s*:\s*[^,]+,\s+[Hh]ardware\s+[Aa]ddress:\s+${HW_ADDRESS}
  ^\s*IPv6\s+[Pp]acket\s+[Ff]rame\s+[Tt]ype\s*:\s*[^,]+,\s+[Hh]ardware\s+[Aa]ddress:\s+${HW_ADDRESS}
  ^\s*${SPEED}\s+mode,\s+${DUPLEX}\s+mode
  ^\s*${SPEED},\s+${DUPLEX},\s+link\s+type
  ^\s*PVID:\s+${VLAN_NATIVE}
  ^\s*Port\s+link-type:\s+${PORT_LINK_TYPE}
  ^\s*Un[Tt]agged\s+VLAN\s+ID\s*:\s*${UNTAGGED_VLAN_ID}
  # Trunk - Passing VLANs (parsing multiple times with Continue)
  ^\s+VLAN\s+[Pp]assing\s*:\s+${VLAN_PASSING},* -> Continue
  # Skip initial VLANs and read the Nth + 1
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue
  ^\s+VLAN\s+[Pp]assing\s*:(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue
  # End od VLAN Passing
  ^\s+VLAN\s+[Pp]assing\s*:
  ^\s{14,}
  # Trunk - Permitted VLANs (parsing multiple times with Continue)
  ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED},* -> Continue
  # Skip initial VLANs and read the Nth + 1
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){1}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){2}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){3}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){4}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){5}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){6}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){7}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){8}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){9}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){10}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){11}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){12}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){13}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){14}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){15}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){16}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){17}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue
  ^\s+VLAN\s+permitted:(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue
  ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue
  # End od VLAN Passing
  ^\s+VLAN\s+permitted:
  ^\s{14,}
  # Next
  ^$$ -> Next.Record
  # Drop
  ^\s*Link
  ^\s*Encapsulation\s+is
  ^\s*Phy-mru
  ^\s*Last
  ^\s*Trunk\s+port
  ^\s*Loopback
  ^\s*Media
  ^\s*[Ff]low
  ^\s*Allow\s+jumbo
  ^\s*Broadcast
  ^\s*Multicast
  ^\s*Unicast
  ^\s*No\sconnector
  ^\s*M[Dd][Ii]\s+type
  ^\s*Port\s+priority
  ^\s*Current\s*system
  ^\s*Peak
  ^\s*IPv4\s+traffic
  ^\s*IPv6\s+traffic
  ^\s+Tagged\s+VLAN
  ^\s+Un[tT]agged\s+VLAN
  ^\s*[Ii]nput
  ^\s*[Oo]utput
  ^\s*Physical
  ^\s*Internet\s+protocol
  ^\s*Port\s+hardware
  ^\s+\d+\s+unicasts
  ^\s+-\s+unicasts
  ^\s+\d+\s+[Cc][Rr][Cc]
  ^\s+\d+\s+aborts
  ^\s+\d+\s+packets,*\s*
  ^\s+\d+\s+errors,*\s*
  ^\s+\d+\s+lost
  ^\s+\d+\s+input\s+error
  ^\s+\d+\s+output\s+error
  ^\s+\d+\s+drops,*\s*
  ^\s+\d+\s+deferred,*\s*
  ^\s+\d+\s+broadcasts
  ^\s+\d+\s+ignored
  ^\s+\d+\s+dribbles
  ^\s*Tunnel\s
  ^\s*GRE
  ^\s*Checksumming\sof\sGRE
  ^\s+-\s+ignored
  ^\s+-\s+frame
  ^\s+-\s+aborts
  ^\s+-\s+lost\s+carrier
  ^\s*DCD:
  ^. -> Error
  ^\s*$$ ^. -> Error

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

FortyGigE2/0/30
Current state: UP
IP packet frame type: Ethernet II, hardware address: ec9b-8b87-6ebb
Description: DescriptionSanitized
Bandwidth: 40000000 kbps
Loopback is not set
Media type is optical fiber, port hardware type is 40G_BASE_LR4_QSFP_PLUS
40Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Maximum frame length: 1500
MDI type: Automdix
Last link flapping: 14 weeks 4 days 22 hours 58 minutes
Last clearing of counters: Never
 Peak input rate: 36118838 bytes/sec, at 2024-12-12 15:01:44 
 Peak output rate: 26480533 bytes/sec, at 2024-10-20 01:40:54 
 Last 300 second input: 785 packets/sec 427679 bytes/sec 0%
 Last 300 second output: 87 packets/sec 18859 bytes/sec 0%
 Input (total):  70305212465 packets, 16984268010832 bytes
         65808897390 unicasts, 1909665019 broadcasts, 2586650056 multicasts, 0 pauses
 Input (normal):  70305212465 packets, - bytes
         65808897390 unicasts, 1909665019 broadcasts, 2586650056 multicasts, 0 pauses
 Input:  0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
 Output (total): 503558376 packets, 152287197755 bytes
         450547961 unicasts, 19235889 broadcasts, 33774526 multicasts, 0 pauses
 Output (normal): 503558376 packets, - bytes
         450547961 unicasts, 19235889 broadcasts, 33774526 multicasts, 0 pauses
 Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier

FortyGigE2/0/31
Current state: UP
Line protocol state: UP
Description: DescriptionSanitized
Bandwidth: 40000000 kbps
Maximum transmission unit: 9008
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Internet address: 1.2.3.4/30 (primary)
IP packet frame type: Ethernet II, hardware address: ec9b-8b87-6712
IPv6 packet frame type: Ethernet II, hardware address: ec9b-8b87-6712
Loopback is not set
Media type is optical fiber, port hardware type is 40G_BASE_LR4L_QSFP_PLUS
Port priority: 0
40Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The maximum frame length is 10000
Last link flapping: 14 weeks 4 days 22 hours 58 minutes
Last clearing of counters: Never
 Peak input rate: 1092779782 bytes/sec, at 2024-11-19 11:21:23 
 Peak output rate: 1290025339 bytes/sec, at 2024-10-27 02:47:45 
 Last 300 second input: 121027 packets/sec 96927232 bytes/sec 1%
 Last 300 second output: 164684 packets/sec 195424831 bytes/sec 3%
 Input (total):  1079870545982 packets, 1102625609428051 bytes
         1079867808511 unicasts, 2 broadcasts, 2737469 multicasts, 0 pauses
 Input (normal):  1079870545802 packets, - bytes
         1079867808492 unicasts, 2 broadcasts, 2737469 multicasts, 0 pauses
 Input:  0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
 Output (total): 1584478018814 packets, 1749641174315111 bytes
         1584428578218 unicasts, 5 broadcasts, 49440591 multicasts, 0 pauses
 Output (normal): 1584478018768 packets, - bytes
         1584428578189 unicasts, 5 broadcasts, 49440591 multicasts, 0 pauses
 Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier

FortyGigE2/0/32
Current state: UP
Line protocol state: UP
Description: DescriptionSanitized
Bandwidth: 40000000 kbps
Maximum transmission unit: 9008
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Internet address: 2.3.4.5/30 (primary)
IP packet frame type: Ethernet II, hardware address: ec9b-8b87-6712
IPv6 packet frame type: Ethernet II, hardware address: ec9b-8b87-6712
Loopback is not set
Media type is optical fiber, port hardware type is 40G_BASE_LR4L_QSFP_PLUS
Port priority: 0
40Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The maximum frame length is 10000
Last link flapping: 14 weeks 4 days 22 hours 58 minutes
Last clearing of counters: Never
 Peak input rate: 1107838242 bytes/sec, at 2024-11-18 11:16:43 
 Peak output rate: 1820915311 bytes/sec, at 2024-11-01 02:39:51 
 Last 300 second input: 94727 packets/sec 73711786 bytes/sec 1%
 Last 300 second output: 228364 packets/sec 277463565 bytes/sec 5%
 Input (total):  1209343749313 packets, 1171816530005832 bytes
         1209341011832 unicasts, 2 broadcasts, 2737479 multicasts, 0 pauses
 Input (normal):  1209343749196 packets, - bytes
         1209341011815 unicasts, 2 broadcasts, 2737479 multicasts, 0 pauses
 Input:  0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
 Output (total): 2023879506096 packets, 2420341456820046 bytes
         2023828309222 unicasts, 5 broadcasts, 51196869 multicasts, 0 pauses
 Output (normal): 2023879505998 packets, - bytes
         2023828309204 unicasts, 5 broadcasts, 51196869 multicasts, 0 pauses
 Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier

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"

line 29 in textfsm template: (*** doesn't match ***)
^\s*Maximum\s+frame\s+length:\s+${L2MTU}
line 31 in textfsm template: (*** doesn't match, as the words are capitalize, and my output is lower-case ***)
^\s*The\sMaximum\s+Frame\s+Length\sis\s+${L2MTU}

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"

<HostnameSanitized>dis interface | i "frame.+ength"
The maximum frame length is 10000
The maximum frame length is 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
The maximum frame length is 10000
The maximum frame length is 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
The maximum frame length is 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000
Maximum frame length: 10000

STEPS TO REPRODUCE


raw_input = {from above}
parsed_output = parse_output(platform='hp_comware', command='display interface', data='raw_input')

** Using the Online TextFSM Playground. Notice that it is erroring out **
image

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:

  ^\s*The\s[Mm]aximum\s+[Ff]rame\s+[Ll]ength\sis\s+${L2MTU}

Below is a screenshot of a successful rendering with the proposed solution
image

@marcus-cain
Copy link
Contributor Author

@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

@mjbear
Copy link
Contributor

mjbear commented Jan 6, 2025

@marcus-cain
Sounds good.
Please maintain backwards compatibility.

@marcus-cain
Copy link
Contributor Author

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.
https://github.com/fidelity-contributions/networktocode-ntc-templates

@mjbear
Copy link
Contributor

mjbear commented Jan 8, 2025

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. https://github.com/fidelity-contributions/networktocode-ntc-templates

Cool. 😎

@marcus-cain
Copy link
Contributor Author

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.

@marcus-cain
Copy link
Contributor Author

PR has been submitted.
#1982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants