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.

IOS XR Parser for ISIS (ShowIsis)

See original GitHub issue

Genie generate error due a missing keys.

`Issue while parsing: <class 'genie.libs.parser.iosxr.show_isis.ShowIsis'>

Traceback (most recent call last):
  File "src/genie/cli/commands/learn.py", line 343, in genie.cli.commands.learn.LearnCommand._retrieve_ops
  File "/home/mpls/fipo/lib64/python3.6/site-packages/genie/libs/ops/isis/iosxr/isis.py", line 313, in learn
    self.make()
  File "/home/mpls/fipo/lib64/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
    self.maker.make(*args, **kwargs)
  File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
  File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
  File "src/genie/metaparser/_metaparser.py", line 302, in genie.metaparser._metaparser.MetaParser.parse
  File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse
  File "src/genie/metaparser/util/schemaengine.py", line 405, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['instance', 'core', 'vrf', 'default', 'topology', 'IPv4 Unicast', 'vrf', 'default', 'protocols_redistributed']]`

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ahersi2-ciscocommented, Jun 16, 2020

Hi @filippohronsky,

Sorry for the late reply, and thanks for providing the supporting information. A small tweak in the schema of this parser will fix your issue. The key called ;

protocols_redistributed

Can be changed to be an optional key. You should see other keys with similar behavior in the code. It should be around line 496 of show_isis.py file in the iosxr directory. Feel free to submit a PR if this change works for you, and if it doesn’t please let me know.

Thank you, Abdurahman

0reactions
filippohronskycommented, Jun 9, 2020

Hi @ahersi2-cisco, here is also output of show isis command. In genieparser there is mention about vrf, but show isis command isn’t include that information.

RP/0/RSP0/CPU0:A9K10#show isis
Tue Jun  9 07:59:23.124 CEST

IS-IS Router: core
  System Id: 0000.0000.0064 
  Instance Id: 0
  IS Levels: level-1
  Manual area address(es):
    01
  Routing for area address(es):
    01
  Non-stop forwarding: Cisco Proprietary NSF Restart enabled
  Most recent startup mode: Cold Restart
  TE connection status: Down
  Topologies supported by IS-IS:
    IPv4 Unicast
      Level-1
        Metric style (generate/accept): Wide/Wide
        Metric: 10
        ISPF status: Disabled
        TE Enabled
      Redistributing:
        BGP AS 65535
      Distance: 115
      Advertise Passive Interface Prefixes Only: Yes
  SRLB not allocated
  SRGB not allocated
  Interfaces supported by IS-IS:
    Bundle-Ether2 is running suppressed (active in configuration)
    Loopback0 is running passively (passive in configuration)
    GigabitEthernet0/2/0/0 is running suppressed (active in configuration)
    TenGigE0/2/1/2 is running suppressed (active in configuration)
    TenGigE0/2/1/3 is disabled (active in configuration)

Parser: genieparser/src/genie/libs/parser/iosxr/show_isis.py

class ShowIsisSchema(MetaParser):
    ''' Schema for commands:
        * show isis
        * show isis protocol
    '''
    schema = {
        'instance': {
            Any(): {
                'process_id': str,
                'instance': str,
                **'vrf': {
                    Any(): {**
                        'system_id': str,
                        'is_levels': str,
                        Optional('manual_area_address'): list,
                        Optional('routing_area_address'): list,

Hopefully, it was helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

genieparser/show_isis.py at master - GitHub
IOSXR parsers for the following show commands: * show isis. * show isis lsp-log. * show isis spf-log. * show isis protocol. *...
Read more >
Cisco IOS IP Routing: ISIS Command Reference
Enables the IS-IS routing protocol and specifies an IS-IS process. show isis topology. Displays a list of all connected routers in all areas....
Read more >
cisco_xr_show_isis_database_v...
Template to parse ISIS LSDB of Cisco IOS-XR devices out of "show isis database verbose" command output. This template produces this structure:.
Read more >
BRKRST-2315.pdf - Cisco Live
Configuring NET: NX-OS, IOS-[XR|XE] router isis 1 net 00.0000.0000.0001.00. RP/0/0/CPU0:XR1# show isis protocol. IS-IS Router: 1. System Id: 0000.0000.0001.
Read more >
'OR' Record on TextFSM ISIS Database IOS XR - Stack Overflow
I am writing a TextFSM template for command "show isis database detail" on an IOS XR box. However I am having trouble to...
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