genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

Fix status and flags parsing for junos

Open maximebel opened this issue 3 years ago • 2 comments

Description

The following cases were not handled properly for JunOS when parsing the interfaces

show interfaces ge-0/0/1 extensive Physical interface: ge-0/0/1, Administratively down, Physical link is Down

=> Administratively down was not supported by the regex

Logical interface ge-0/0/1.0 (Index 351) (SNMP ifIndex 558) (Generation 206) Flags: Device-Down SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.222 ]

  • Device-Down was not supported on its own in the regex
  • Encapsulation is optional

Motivation and Context

Fix the parsing so that python no longer crashed

Impact (If any)

All the existing tests are still working fine

maximebel avatar May 25 '22 15:05 maximebel

Ok modified my patch to fix some remaining test cases. Now it is ok. Please review

maximebel avatar May 26 '22 12:05 maximebel

Please follow this documentation and add a changelog explaining the improvements: https://pubhub.devnetcloud.com/media/pyats-development-guide/docs/contribute/contribute.html#update-changelog

sjpatel21 avatar Aug 24 '22 13:08 sjpatel21