This fixes the parse_instances function to always return the MST instances 0 and 1 because their priority is defined by default in EOS. The MST instance 0 never shows up in the config section "spanning-tree mst configuration" and the MST instance 1 can show up if configured so.
Some additional tests are added to test the default mst instances and their priorities.
Example config which would can't be parsed without this fix:
switch#show run all | s spanning-tree mstspanning-tree mode mstpno spanning-tree mst pvst borderspanning-tree mst 0 priority 8192spanning-tree mst 1 priority 32768!spanning-tree mst configurationno namerevision 0switch#
This fixes the parse_instances function to always return the MST instances 0 and 1 because their priority is defined by default in EOS. The MST instance 0 never shows up in the config section "spanning-tree mst configuration" and the MST instance 1 can show up if configured so. Some additional tests are added to test the default mst instances and their priorities.
Example config which would can't be parsed without this fix:
switch#show run all | s spanning-tree mst
spanning-tree mode mstp
no spanning-tree mst pvst border
spanning-tree mst 0 priority 8192
spanning-tree mst 1 priority 32768
!
spanning-tree mst configuration
no name
revision 0
switch#