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

Feature Request: Do not print anything if 0 objects received #56

Open
abaluta opened this issue Feb 1, 2020 · 4 comments
Open

Feature Request: Do not print anything if 0 objects received #56

abaluta opened this issue Feb 1, 2020 · 4 comments

Comments

@abaluta
Copy link

abaluta commented Feb 1, 2020

RADb does not give data sometimes.
This happens very rarely (once a month) , so I can’t find the exact cause.

Is it possible not to print a standard template, if bgp3 got 0 networks?
Now I get (if the problem happened)

bgpq3 -J -S radb,ripe -l Client AS-CLIENT
  policy-options {
    replace:
      prefix-list Client {
      }
  }

And the client without networks :(

@snar
Copy link
Owner

snar commented Feb 2, 2020 via email

@abaluta
Copy link
Author

abaluta commented Feb 2, 2020

Can you please explain what do you mean by "standard template" ?
...
To avoid uploading empty prefix-lists to routers in automatical mode,
you may introduce step of checking "if generated prefix-list is empty
(generated file is five lines long) then do not upload it to routers"
in your prefix-list update system.

For the juniper these are these 5 lines, for Cisco 3 lines.
It seems to me that focusing on the number of lines is not ideal.
May be add additional exit codes?
For example:
2 - If the number of networks received in any object (parent or child) 0.
3 - If number of AS in as-set 0
and other...

@snar
Copy link
Owner

snar commented Feb 4, 2020 via email

@abaluta
Copy link
Author

abaluta commented Feb 4, 2020

On any level of recursion ?

Yes. I understand that there will be many false positives.
Of course, this should be enabled by the option. (It’s a pity that -p_aranoiac is busy)
It is not very scary to run in automatic mode with this option.

If it is difficult, I will count the lines.

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

No branches or pull requests

2 participants