-
Notifications
You must be signed in to change notification settings - Fork 414
Added IOSXE parser for 'show wireless iot-coexistence summary' #972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ThomasJRyan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just needs a bit of maintenance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You no longer need to include changes to github_parser.json (and honestly I thought we had added this file to the .gitignore)
|
|
||
| from .show_wireless import ShowWirelessIotCoexistenceSummary | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary. Our library abstraction mechanism handles importing parsers. Please remove this
| """Schema for show wireless iot-coexistence summary""" | ||
|
|
||
| schema = { | ||
| Optional('ap_list'): { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The top-level key in a schema shouldn't be Optional. You need at least one static key that will always be there if a match has been made
| if not line: | ||
| continue | ||
|
|
||
| # Detect separator line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments should be examples of what's being matched. It's a lot easier to debug a parser when you can quickly reference the line it's matching
| if 'ap_list' not in show_wireless_iot_coexistence_summary_dict: | ||
| show_wireless_iot_coexistence_summary_dict['ap_list'] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just use setdefault here
| } | ||
| continue | ||
|
|
||
| # Try matching AP without counters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
| if 'ap_list' not in show_wireless_iot_coexistence_summary_dict: | ||
| show_wireless_iot_coexistence_summary_dict['ap_list'] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
Description
Added new parser for IOSXE command:
show wireless iot-coexistence summaryMotivation and Context
Enables automation of wireless IoT coexistence monitoring by extracting:
Impact (If any)
{}for empty output (valid empty state).Screenshots:
Checklist: