genie 22.1 fails to parse STP (when using MST)
pyats 22.1 pyats.aereport 22.1 pyats.aetest 22.1 pyats.async 22.1 pyats.connections 22.1 pyats.datastructures 22.1 pyats.easypy 22.1 pyats.kleenex 22.1 pyats.log 22.1 pyats.reporter 22.1 pyats.results 22.1 pyats.tcl 22.1 pyats.topology 22.1 pyats.utils 22.1 genie 22.1 genie.libs.clean 22.1 genie.libs.conf 22.1 genie.libs.filetransferutils 22.1 genie.libs.health 22.1 genie.libs.ops 22.1 genie.libs.parser 22.1 genie.libs.sdk 22.1.2
Please note that we are using MST instance 1 and NO vlans are mapped to MST instance 0
2022-01-28 04:14:56,472: %UNICON-INFO: +++ ******** with via 'cli': executing command 'show spanning-tree mst detail' +++ show spanning-tree mst detail
##### MST0 vlans mapped: none Bridge address 0029.c2bf.ba80 priority 32768 (32768 sysid 0) Root address d4ad.71b4.a900 priority 4096 (4096 sysid 0) port Po1 path cost 0 Regional Root address d4ad.71b4.a900 priority 4096 (4096 sysid 0) internal cost 1250 rem hops 18 Operational hello time 2 , forward delay 15, max age 20, txholdcount 6 Configured hello time 2 , forward delay 15, max age 20, max hops 20
TwoGigabitEthernet1/0/1 of MST0 is designated forwarding
Port info port id 128.1 priority 128 cost 200000
Designated root address d4ad.71b4.a900 priority 4096 cost 0
Design. regional root address d4ad.71b4.a900 priority 4096 cost 1250
Designated bridge address 0029.c2bf.ba80 priority 32768 port id 128.1
Timers: message expires in 0 sec, forward delay 0, forward transitions 1
Bpdus sent 6296040, received 0
....
MST1 vlans mapped: 1-4094
Bridge address 0029.c2bf.ba80 priority 32769 (32768 sysid 1) Root address d4ad.71b4.a900 priority 4097 (4096 sysid 1) port Po1 cost 1250 rem hops 18
TwoGigabitEthernet1/0/1 of MST1 is designated forwarding
Port info port id 128.1 priority 128 cost 200000
Designated root address d4ad.71b4.a900 priority 4097 cost 1250
Designated bridge address 0029.c2bf.ba80 priority 32769 port id 128.1
Timers: message expires in 0 sec, forward delay 0, forward transitions 1
Bpdus (MRecords) sent 6296040, received 0
...
***************#
Traceback (most recent call last):
File "/play/gn-pyats/./savestp.py", line 23, in
Hi
I looked at the parse and this change in the parser will solve the issue:
p1 = re.compile(r'^#\sMST(?P