genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

Update show_cts.py

Open komurzak-cisco opened this issue 4 years ago • 1 comments

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:

image

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.

komurzak-cisco avatar Aug 31 '21 06:08 komurzak-cisco

@domachad, unit test added, blank lines removed

komurzak-cisco avatar Sep 03 '21 04:09 komurzak-cisco

no update for 1 year. so closing. please reopen when you can work on.

tahigash avatar Sep 19 '22 13:09 tahigash