-
-
Notifications
You must be signed in to change notification settings - Fork 38
Added parser for openvpn status logs #44
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
Conversation
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.
You don't need to develop an extensive test suite, basic tests are good enough.
netdiff/parsers/openvpn.py
Outdated
graph.add_edge(source, target, weight=1) | ||
return graph | ||
|
||
def _txtinfo_to_jsoninfo(self, data): |
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.
this is the method that should be called to_python
(you can get rid of the other one).
You choose a starting point of another parser which was a special case.
Since you already have a library that parses the data, you don't really need to do much apart returning the data structure that the parser expects
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 you are right. We don't really need this method. Will edit
netdiff/parsers/openvpn.py
Outdated
|
||
def _txtinfo_to_jsoninfo(self, data): | ||
""" | ||
converts openvpn txtinfo format to jsoninfo |
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.
jsoninfo is an olsr specific thing, you should not reuse this terminology
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.
Oh. I see. Will edit it
netdiff/parsers/openvpn.py
Outdated
class OpenvpnParser(BaseParser): | ||
""" OpenVPN status log parser """ | ||
protocol = 'openvpn' | ||
version = '' |
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.
the status log file of openvpn has 2 versions, we could use this attribute to indicate which version we support
Oops! A wrong rebase. |
Thanks @rohithasrk, merged your commit in PR #47 |
References #43. As of now, the basic parser code has been written. This code is to be tested properly with appropriate test cases. We've decided to use the package openvpn-status for the logic behind parsing openvpn logs.
To Dos: