-
Notifications
You must be signed in to change notification settings - Fork 15
create a python script for quagga_parse
#8
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
base: nextgen
Are you sure you want to change the base?
Conversation
6602c19 to
b631d4c
Compare
dunxen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Running it against dumps currently.
b631d4c to
a6eef95
Compare
| print(f"Processing {file}...") | ||
| to_dump = "" | ||
| for entry in bgp: | ||
| if isinstance(entry.body, TableDumpV2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we support V1 tables too? I vaguely recall seeing such dumps too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added support for V1 tables because I realized bgpdump does it as well but I can drop it. Realized just one of the dumps was V1.
| route.attr.asPath | ||
| for route | ||
| in entry.body.routeEntries]) | ||
| else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the dumps can contain other entries besides just v1 and v2 table dumps. Does the BGPDump package already filter those out, or should we be explict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it already filter them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@property
def routeEntries(self):
if self._routeEntries is not None:
return self._routeEntries
self._routeEntries = []
for i in range(0, self.body.entry_count):
self._routeEntries.append(TableDumpV2RouteEntry(self.bgp, self.body.entries[i]))
return self._routeEntries|
Actually, I'm kind of confused about the state of the software here. I'm not sure I was using any of the code in the |
I feel the same haha. Seems like this project is the best fit to move asmap stuff forward, but it seems hard to contribute since there is a lack of documentation and project management. I'm willing to help manage this if you want. |
|
@brunoerg Please do! Feel free to reuse whatever is usable anywhere in the repo. I think that I was using:
|
|
Thanks, @sipa! I'm gonna move it forward! |
Instead of donwloading a lib like
libbgpdumpand calling it with ashscript, we could have a Python script to do the same work.