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_procurve_show_interfaces_brief error handling #1604

Open
rikosintie opened this issue Jan 18, 2024 · 4 comments
Open

hp_procurve_show_interfaces_brief error handling #1604

rikosintie opened this issue Jan 18, 2024 · 4 comments

Comments

@rikosintie
Copy link

rikosintie commented Jan 18, 2024

First off, thanks so much for creating the hp_procurve templates!

In issue 1405, error handling was added to the hp_procurve templates.

I also hit a similar exception on the hp_procurve_show_vlans template when the switch has a loopback configured.

I removed " ^. -> Error" on line 17 and the template worked for the interfaces brief.

Same thing for line 27 of the vlan template.

I read the article here:
https://pyneng.readthedocs.io/en/latest/book/21_textfsm/textfsm_syntax.html

but I don't understand what would be needed to allow the "Note: * indicates values dynamically overridden by RADIUS." line to be ignored and continue processing.

I'm new to the textfsm parser, if you need any additional information just let me know and I can provide more and do testing.

Thanks!

ISSUE TYPE
  • Template Issue with error and raw data
TEMPLATE USING
SAMPLE COMMAND OUTPUT

Please paste the raw output of the show command your are you using.

Status and Counters - Port Status

Note: * indicates values dynamically overridden by RADIUS.

                      | Intrusion                           MDI  Flow Bcast

Port Type | Alert Enabled Status Mode Mode Ctrl Limit
------------ ---------- + --------- ------- ------ ---------- ---- ---- -----
A1 1000SX | No Yes Up 1000FDx NA off 0
A2 1000SX | No Yes Up 1000FDx NA off 0
A3 1000SX | No Yes Up 1000FDx NA off 0
A4 1000SX | No Yes Up 1000FDx NA off 0
A5 1000SX | No Yes Up 1000FDx NA off 0
A6 1000SX | No Yes Up 1000FDx NA off 0
A7 1000SX | No Yes Up 1000FDx NA off 0
A8* SFP+SR | No Yes Up 10GigFD NA off 0
B1 1000SX | No Yes Up 1000FDx NA off 0
B2 1000SX | No Yes Up 1000FDx NA off 0
B3 1000SX | No Yes Up 1000FDx NA off 0
B4 1000SX | No Yes Up 1000FDx NA off 0
B5 1000SX | No Yes Up 1000FDx NA off 0
B6 1000SX | No Yes Up 1000FDx NA off 0
B7* 1000SX | No Yes Up 1000FDx NA off 0
B8 SFP+SR | No Yes Up 10GigFD NA off 0
C1 100/1000T | No Yes Up 1000FDx MDIX off 0
C2 100/1000T | No Yes Up 1000FDx MDI off 0
C3 100/1000T | No Yes Up 100FDx MDIX off 0
C4 100/1000T | No Yes Up 100FDx MDIX off 0
C5 100/1000T | No Yes Up 1000FDx MDI off 0
C6 100/1000T | No Yes Up 1000FDx MDIX off 0
C7 100/1000T | No Yes Up 1000FDx MDIX off 0
C8 100/1000T | No Yes Up 1000FDx MDI off 0
C9 100/1000T | No Yes Up 1000FDx MDIX off 0
C10 100/1000T | No Yes Up 1000FDx MDIX off 0
C11 100/1000T | No Yes Up 100FDx MDIX off 0
C12 100/1000T | No Yes Up 1000FDx MDI off 0
C13 100/1000T | No Yes Up 1000FDx MDIX off 0
C14 100/1000T | No Yes Up 1000FDx MDI off 0
C15 100/1000T | No Yes Up 1000FDx MDI off 0
C16 100/1000T | No Yes Up 1000FDx MDI off 0
C17 100/1000T | No Yes Up 100FDx MDI off 0
C18 100/1000T | No Yes Up 1000FDx MDIX off 0
C19 100/1000T | No Yes Up 100FDx MDI off 0
C20 100/1000T | No Yes Up 1000FDx MDIX off 0
C21 100/1000T | No Yes Up 1000FDx MDI off 0
C22 100/1000T | No Yes Up 1000FDx MDIX off 0
C23 100/1000T | No Yes Up 1000FDx MDIX off 0
C24 100/1000T | No Yes Up 1000FDx MDIX off 0
D1-Trk1 100/1000T | No Yes Up 1000FDx MDIX off 0
D2-Trk1 100/1000T | No Yes Up 1000FDx MDIX off 0
D3-Trk1 100/1000T | No Yes Up 1000FDx MDI off 0
D4-Trk1 100/1000T | No Yes Up 1000FDx MDIX off 0
D5 100/1000T | No No Down 1000FDx NA off 0
D6 100/1000T | No Yes Down 1000FDx NA off 0
D7 100/1000T | No Yes Down 1000FDx Auto off 0
D8 100/1000T | No Yes Down 1000FDx NA off 0
D9 100/1000T | No Yes Down 1000FDx NA off 0
D10 100/1000T | No Yes Down 1000FDx NA off 0
D11 100/1000T | No Yes Up 100FDx MDI off 0
D12 100/1000T | No Yes Down 1000FDx NA off 0
D13 100/1000T | No Yes Down 1000FDx Auto off 0
D14 100/1000T | No Yes Down 1000FDx NA off 0
D15 100/1000T | No Yes Down 1000FDx NA off 0
D16 100/1000T | No Yes Down 1000FDx Auto off 0
D17 100/1000T | No Yes Down 1000FDx NA off 0
D18 100/1000T | No Yes Up 100FDx MDI off 0
D19 100/1000T | No Yes Down 1000FDx NA off 0
D20 100/1000T | No Yes Down 1000FDx Auto off 0
D21 100/1000T | No Yes Down 1000FDx Auto off 0
D22 100/1000T | No Yes Down 1000FDx NA off 0
D23 100/1000T | No Yes Down 1000FDx Auto off 0
D24 100/1000T | No Yes Down 1000FDx Auto off 0
E1 SFP+DA3 | No No Down 10GigFD NA off 0
E2 SFP+DA3 | No No Down 10GigFD NA off 0
E3 | No Yes Down . off 0
E4 | No Yes Down . off 0
E5 | No Yes Down . off 0
E6 | No Yes Down . off 0
E7 SFP+SR | No Yes Up 10GigFD NA off 0
E8 SFP+SR | No Yes Up 10GigFD NA off 0
F1 10GbE-T | No Yes Up 2500FDx* MDI off 0
F2 10GbE-T | No Yes Up 2500FDx* MDI off 0
F3 10GbE-T | No Yes Up 2500FDx* MDI off 0
F4 10GbE-T | No Yes Up 2500FDx* MDIX off 0
F5 10GbE-T | No Yes Up 2500FDx* MDI off 0
F6 10GbE-T | No Yes Down 10GigFD NA off 0
F7 10GbE-T | No Yes Up 2500FDx* MDI off 0
F8 10GbE-T | No Yes Up 10GigFD MDIX off 0
G1 100/1000T | No Yes Up 100FDx MDIX off 0
G2 100/1000T | No Yes Up 100FDx MDI off 0
G3 100/1000T | No Yes Up 1000FDx MDI off 0
G4 100/1000T | No Yes Up 1000FDx MDI off 0
G5 100/1000T | No Yes Up 100FDx MDI off 0
G6 100/1000T | No Yes Up 100FDx MDI off 0
G7 100/1000T | No Yes Up 100FDx MDI off 0
G8 100/1000T | No Yes Up 100FDx MDI off 0
G9 100/1000T | No Yes Up 1000FDx MDIX off 0
G10 100/1000T | No Yes Up 1000FDx MDIX off 0
G11 100/1000T | No Yes Up 1000FDx MDIX off 0
G12 100/1000T | No Yes Up 1000FDx MDIX off 0
G13 100/1000T | No Yes Up 1000FDx MDI off 0
G14 100/1000T | No Yes Up 1000FDx MDIX off 0
G15 100/1000T | No Yes Up 100FDx MDIX off 0
G16 100/1000T | No Yes Up 100FDx MDI off 0
G17 100/1000T | No Yes Up 1000FDx* MDIX off 0
G18 100/1000T | No Yes Down 1000FDx NA off 0
G19 100/1000T | No Yes Up 1000FDx* MDI off 0
G20 100/1000T | No Yes Up 100FDx MDI off 0
G21 100/1000T | No Yes Down 1000FDx NA off 0
G22 100/1000T | No Yes Down 1000FDx NA off 0
G23 100/1000T | No Yes Up 100FDx MDIX off 0
G24 100/1000T | No Yes Up 1000FDx MDI off 0
H1 100/1000T | No Yes Down 1000FDx NA off 0
H2 100/1000T | No Yes Down 1000FDx Auto off 0
H3 100/1000T | No Yes Down 1000FDx NA off 0
H4 100/1000T | No Yes Down 1000FDx Auto off 0
H5 100/1000T | No Yes Down 1000FDx Auto off 0
H6 100/1000T | No Yes Down 1000FDx Auto off 0
H7 100/1000T | No Yes Down 1000FDx Auto off 0
H8 100/1000T | No Yes Down 1000FDx Auto off 0
H9 100/1000T | No Yes Down 1000FDx Auto off 0
H10 100/1000T | No Yes Down 1000FDx Auto off 0
H11 100/1000T | No Yes Down 1000FDx Auto off 0
H12 100/1000T | No Yes Down 1000FDx Auto off 0
H13 100/1000T | No Yes Down 1000FDx Auto off 0
H14 100/1000T | No Yes Down 1000FDx Auto off 0
H15 100/1000T | No Yes Down 1000FDx Auto off 0
H16 100/1000T | No Yes Down 1000FDx Auto off 0
H17 100/1000T | No Yes Down 1000FDx Auto off 0
H18 100/1000T | No Yes Down 1000FDx Auto off 0
H19 100/1000T | No Yes Down 1000FDx Auto off 0
H20 100/1000T | No Yes Down 1000FDx Auto off 0
H21 100/1000T | No Yes Down 1000FDx Auto off 0
H22 100/1000T | No Yes Down 1000FDx Auto off 0
H23 100/1000T | No Yes Up 100FDx MDI off 0
H24 100/1000T | No Yes Up 100FDx MDI off 0

  • third-party transceiver
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS

[
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.71.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.248.0",
"VLAN_NAME": "DEFAULT_VLAN"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.30.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "AP-575-Bridge-Tea..."
},
{
"CONFIG": "Disabled",
"IP_ADDRESS": "",
"LOCAL": "",
"PROXY": "",
"SUBNET_MASK": "",
"VLAN_NAME": "VLAN 72 vMotion N..."
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.74.30",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.224",
"VLAN_NAME": "VM_ESXI_CLUSTER_M..."
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.23.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "SERVER_VLAN_75"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.95.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.248.0",
"VLAN_NAME": "VLAN 88 Wireless ..."
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.201.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.254.0",
"VLAN_NAME": "VLAN 200 RHS ROP"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.203.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.254.0",
"VLAN_NAME": "Mountain HS"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.204.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "MOT LAN"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.2.126",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.128",
"VLAN_NAME": "575-Outdoor-APs"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.63.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.248.0",
"VLAN_NAME": "Staff/Student Wir..."
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.254.254",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "Device Management"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.112.1.2",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "Spectrum ME3400 G1"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.1.0.251",
"LOCAL": "No",
"PROXY": "No",
"SUBNET_MASK": "255.255.255.0",
"VLAN_NAME": "Fortigate P2"
},
{
"CONFIG": "IP",
"IP_ADDRESS": "Config",
"LOCAL": "",
"PROXY": "",
"SUBNET_MASK": "IP",
"VLAN_NAME": "Loopback"
},
{
"CONFIG": "Manual",
"IP_ADDRESS": "10.2.2.2",
"LOCAL": "",
"PROXY": "",
"SUBNET_MASK": "255.255.255.255",
"VLAN_NAME": "lo1"
}
]

ACTUAL RESULTS

A fatal exception

Exception has occurred: TextFSMError
State Error raised. Rule Line: 17. Input Line:  Note: * indicates values dynamically overridden by RADIUS.
  File "/Discovery/procurve_Config_pull.py", line 306, in <module>
    output_show_int_br = net_connect.send_command(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
textfsm.parser.TextFSMError: State Error raised. Rule Line: 17. Input Line:  Note: * indicates values dynamically overridden by RADIUS.
@jvanderaa
Copy link
Contributor

What is likely happening here @rikosintie is that there is an unaccounted for line. The output of Note: * indicates values dynamically overridden by RADIUS. just needs to get added to the template such as https://github.com/networktocode/ntc-templates/blob/master/ntc_templates/templates/cisco_ios_show_boot.textfsm#L41

@jvanderaa
Copy link
Contributor

If you want to try to take a stab at fixing it, that is terrific. If some additional help is needed, please send us an example output.

@rikosintie
Copy link
Author

Thanks for the response, I will take a look tomorrow!

@mjbear
Copy link
Contributor

mjbear commented Mar 12, 2024

If you want to try to take a stab at fixing it, that is terrific. If some additional help is needed, please send us an example output.

@rikosintie
If you'd like an assist on this I'm willing to take a look.

Please provide sample raw output returned by show interfaces brief on your HP Procurve switch in either a code block OR attach a plain text file containing the raw output to this issue (paper clip icon).

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

No branches or pull requests

3 participants