Skip to content

Update EVPN EVI Detail Parser schema to make peer route keys optional#983

Open
sainc-g wants to merge 1 commit intoCiscoTestAutomation:mainfrom
sainc-g:patch-1
Open

Update EVPN EVI Detail Parser schema to make peer route keys optional#983
sainc-g wants to merge 1 commit intoCiscoTestAutomation:mainfrom
sainc-g:patch-1

Conversation

@sainc-g
Copy link

@sainc-g sainc-g commented Feb 6, 2026

Updated the schema for ShowL2vpnEvpnEviDetail parser to make peer route keys optional under the bridge_domain -> peer hierarchy.

Description

In certain EVPN EVI detail outputs, peer entries are present without route counters (MAC, MAC/IP, IMET, EAD).
Example CLI:
Peers:
172.16.254.7

Parser was failing with:
SchemaMissingKeyError:
Missing keys:

  • mac_routes
  • mac_ip_routes
  • imet_routes
  • ead_routes

Schema defined these keys as mandatory:

'mac_routes': int,
'mac_ip_routes': int,
'imet_routes': int,
'ead_routes': int,

However, device output does not always populate route counters for peers.

Motivation and Context

Converted mandatory peer route keys to optional:

Optional('mac_routes'): int,
Optional('mac_ip_routes'): int,
Optional('imet_routes'): int,
Optional('ead_routes'): int,

Impact

  • Prevents parser failures when peers exist without route data
  • Supports both scenarios:
    • Peer with route counters
    • Peer without route counters

Screenshots:

Tested with:

  1. EVPN EVI output containing peers with routes → Parsed successfully
  2. EVPN EVI output containing peers without routes → Parsed successfully
  3. No impact observed on existing passing parsers/scripts

Passed Log after parser change - https://earms-trade.cisco.com/tradeui/logs/logfile?logfile=TaskLog.Task-1&begin=10565910&size=45976&archive=%2Fnobackup%2Fsainc%2Fpolaris-dev%2Fpolaris%2Fbinos%2Flinkfarm%2Fsdks-host%2Fiosxe-pyats%2Fnativesdk%2Fsdk%2Fsysroots%2Fx86_64-xesdk-linux%2Fusr%2Fusers%2Fsainc%2Farchive%2F26-02%2Foc_oper_job_2026Feb05_12_40_43_141453.zip&ats=%2Fnobackup%2Fsainc%2Fpolaris-dev%2Fpolaris%2Fbinos%2Flinkfarm%2Fsdks-host%2Fiosxe-pyats%2Fnativesdk%2Fsdk%2Fsysroots%2Fx86_64-xesdk-linux%2Fusr&submitter=sainc&from=trade&view=all&atstype=pyATS

Failed Log before parser changes - https://earms-trade.cisco.com/tradeui/logs/logfile?logfile=TaskLog.Task-1&begin=8470177&size=47839&archive=%2Fnobackup%2Fsainc%2Fpolaris-dev%2Fpolaris%2Fbinos%2Flinkfarm%2Fsdks-host%2Fiosxe-pyats%2Fnativesdk%2Fsdk%2Fsysroots%2Fx86_64-xesdk-linux%2Fusr%2Fusers%2Fsainc%2Farchive%2F26-01%2Foc_oper_job_2026Jan30_08_35_27_280523.zip&ats=%2Fnobackup%2Fsainc%2Fpolaris-dev%2Fpolaris%2Fbinos%2Flinkfarm%2Fsdks-host%2Fiosxe-pyats%2Fnativesdk%2Fsdk%2Fsysroots%2Fx86_64-xesdk-linux%2Fusr&submitter=sainc&from=trade&view=all&atstype=pyATS

Checklist:

  • I have updated the changelog.
  • I have updated the documentation (If applicable).
  • I have added tests to cover my changes (If applicable).
  • All new and existing tests passed.
  • All new code passed compilation.

Updated the schema for `ShowL2vpnEvpnEviDetail` parser to make peer route keys optional under the `bridge_domain -> peer` hierarchy.
@sainc-g sainc-g requested a review from a team as a code owner February 6, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant