CiscoDevNet / BootIntegrityValidator

Python module that validates the Boot Integrity Visibility output generated on a Cisco IOS-XE device
MIT License
6 stars 3 forks source link

Feature: Capture all KGV mismatches during validation #11

Closed mjavaid closed 2 years ago

mjavaid commented 2 years ago

Fixes #10

Rather than fail on the first KGV mismatch, capture all KGV mismatches and raise a collective Exception.

ministryofjay-cisco commented 2 years ago

@mjavaid ,

You were taking the individual exception and turning it in to a string. Then in your test you were using regex to pull out the information from the exception message. I think it is better to preserve the original exception and attach it to the raised exception. This way the external program can easily access each of the individually raised errors directly from the aggregate exception.

Take a look at let me know what you think