Skip to content
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

refactoring check error reporting #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jplitza
Copy link
Contributor

@jplitza jplitza commented Jan 12, 2015

The current setup for the check script is a bit difficult and verbose. For example, having to count the errors manually is a PITA, introducing warnings would make the issue even worse.

Thus, I would like to

  • introduce functions or classes for different types of messages during the validation process (errors, warnings, ...) that count the number of occurrences of their type
    • make the whole thing a class Validator, instead of the function do_checks, so we still could invoke it multiple times with different srcdir and get different counters
  • make the error messages more structured, like [community] bgp.peer1.ipv4 invalid address: 123.456.789.0 or [community1,community2] networks.ipv4 overlap: 0.0.0.0/0 (community1), 10.0.0.0/24 (community2). I'm not totally sure on the details, but I find the current free text hard to correlate to the YAML.

This pull request is currently there to discuss these ideas. I'd like to hear comments. :)

@jplitza jplitza self-assigned this Jan 15, 2015
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