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

Paloalto generator should provide more informational/warning logs #271

Open
abhindes opened this issue May 12, 2021 · 0 comments
Open

Paloalto generator should provide more informational/warning logs #271

abhindes opened this issue May 12, 2021 · 0 comments

Comments

@abhindes
Copy link
Collaborator

Whenever a term is being rendered in the generator, there should be sufficient logging to help debug the translation of .pol to vendor syntax ACLs. This is because Capirca drops incorrect terms, and may process terms in various ways - group terms, or break single terms into multiple terms in order to generate correct vendor syntax.

  1. Informational logs should be present whenever some term being rendered could have clarifying information about why the flow is being rendered in that manner. While Informational logs are used for confirming that things are working as expected, we don't expect these logs to be everywhere, but only when something unexpected or convoluted is occurring.
  2. Warning level logs must be present whenever a term is not being rendered completely. Even if a single protocol in a term with multiple protocols is being skipped, this is considered as a term not being rendered completely, and thus a warning log should be present when this condition is triggered.

Some spots in the current paloalto generator where Warning level logs must be present -

  1. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L483-L485
  2. All 3 conditions in https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L527-L534
  3. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L555-L556
  4. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L574-L576
  5. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L577-L579
  6. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L274

Some spots where informational level logs could be added -

  1. https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L481-L482 can indicate that a src_any and dst_any flow was created.
  2. All conditions in https://github.com/google/capirca/blob/master/capirca/lib/paloaltofw.py#L486-L495 can have informational logs indicating the flows created.

This list is only semi-exhaustive since I may have missed conditions where a warning log may be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant