genieparser
genieparser copied to clipboard
Update show_cts.py
updated 'show cts role-based permissions' parser to work on actual output
Description
This PR fixes #521 a bug when code is trying to access uninitialized 'indexes' key of a dictionary.
Motivation and Context
Show cts role-based permissions parses was giving error when trying to parse this cli output:
IPv4 Role-based permissions from group Invalid to group Invalid:
Permit IP-00
RBACL Monitor All for Dynamic Policies : FALSE
RBACL Monitor All for Configured Policies : FALSE
This PR will fix parsing output of show cts role-based permissions when there are no policies present.
Impact (If any)
No negative impact
Screenshots:

Checklist:
- [x] I have updated the changelog.
- [x] I have updated the documentation (If applicable).
- [x] I have added tests to cover my changes (If applicable).
- [ ] All new and existing tests passed.
- [x] All new code passed compilation.
@domachad, unit test added, blank lines removed
no update for 1 year. so closing. please reopen when you can work on.