iosxr 'show inventory' parser can not parse empty description field
See original GitHub issueAloha, The “show inventory” parser fails, if the description field is empty: CLI Output:
NAME: "module 0/0/0", DESCR: "ASR 9000 20-port 1GE Modular Port Adapter"
PID: A9K-MPA-20X1GE, VID: V03, SN: FOC19286666
NAME: "module mau 0/0/0/0", DESCR: ""
PID: N/A, VID: N/A, SN: FNS66661UTW
Parser output:
"module 0/0/0": {
"descr": "ASR 9000 20-port 1GE Modular Port Adapter",
"pid": "N/A",
"vid": "N/A",
"sn": "FNS66661UTW"
},
This fix helped:
in: show_platform.py
line 746:
' +DESCR: +\"(?P<descr>[\w\-\.\:\/\s,&]+)\"$')"
change the + with *
' +DESCR: +\"(?P<descr>[\w\-\.\:\/\s,&]*)\"$')
Then it works:
"module 0/0/0": {
"descr": "ASR 9000 20-port 1GE Modular Port Adapter",
"pid": "A9K-MPA-20X1GE",
"vid": "V03",
"sn": "FOC196666"
},
"module mau 0/0/0/0": {
"descr": "",
"pid": "N/A",
"vid": "N/A",
"sn": "FNS66661UTW"
},
Im just learning programming and this is my first issue report in Github. So forgive me, if I missed anything Cheers Marcel
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Troubleshooting Guide for Cisco NCS 1002, IOS XR Releases ...
This chapter provides procedures for troubleshooting the most common problems encountered when operating an NCS 1002. To troubleshoot specific ...
Read more >Advanced ASR 9000 - Operation and Troubleshooting
Questions? Use Cisco Webex Teams to chat with the speaker after the session. Find this session in the Cisco Live Mobile App.
Read more >Cisco IOS-XR Route Policy parse error · Issue #5625 - GitHub
Hi, My ASR 9K (IOS-XR) configs failed ingesting, and bfq.initIssues().answer() shows the following error: Type: Parse Error Line_Text: ...
Read more >ntc-templates 1.5.0 - PyPI
from ntc_templates.parse import parse_output >>> vlan_output ... BugFix: IOS - show ip bgp summary: Added new field ADDR_FAMILY for any that ...
Read more >ntc-templates Changelog - pyup.io
Bug fix: Multiple line parsing using lists with textfsm extracting wrong details by ... cisco\_ios\_show\_interfaces\_description.textfsm fails to parse ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Jeaubin, Yes, good Idea. I will do a pull request for this fix. Can I learn something more.
😃
As we are getting ready for the release; we’ve done this fix and it will be part of the next official release (next week)
Thanks to both of you for finding it and proposing fix!