question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iosxr 'show inventory' parser can not parse empty description field

See original GitHub issue

Aloha, 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Aug 21, 2019

Hi Jeaubin, Yes, good Idea. I will do a pull request for this fix. Can I learn something more.
😃

0reactions
jeaubincommented, Aug 23, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found