-
Notifications
You must be signed in to change notification settings - Fork 65
NETCONF RFC6241 and RFC6242 conformance fixes #22
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
. xml version conformance . hello message conformance . rpc message conformance . framing protocol conformance - Extracting reused strings to constants - updated gitignore
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.
Adding the constant class is great. Thanks for cleaning up some of the whitespace.
I can't approve merges, so I'm only offering my opinions. I can reach out to the people who can do merges.
You also should probably bump the minor version in the pom.xml to 2.0.1.
Cheers!
P.S. The commit message is awesome! |
- fixed broken idents caused by auto-formatting
@peterjhill Thank you for your comments Peter! I changed the code to single imports and fixed the indention issues as well as bumping the minor version to 2.0.1 |
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.
Looks great. It might be nice to squash the commits into one.
git rebase -i HEAD~3
I think... if I am counting the commits in your PR correctly.
Congrats @jonasglass on your first github PR! |
@peterjhill Thank you for the motivational hints and messages Peter! Nice to see such friendly community. |
NETCONF RFC6241 and RFC6242 conformance fixes
XML Version Conformance (RFC6241 Section 3)
Added XML declaration before every NETCONF message
Hello Message Conformance (RFC6241 Section 8.1)
Fixed wrong URN in hello message xmlns and capability (using 1.0 of course)
RPC message conformance (RFC6241 Section 4.1)
Added the message-id element to RPCs. Also added XML NS to RPC as an attribute since it is present in all standards and most implementations.
Framing Protocol Conformance (RFC6242 Section 4.1)
The device prompt (
]]>]]>
) signals the end of a NETCONF message. In the current implementation the device prompt was only detected if it was followed by a \n sincereadLine()
was used. This is not in conformance to the RFC. I changed it to reading character by character so that the end of a NETCONF message is also detected if the prompt is not being followed by a line break.Using UTF8 encoding (RFC6241 Section 3)
Changed encoding and decoding to force-use UTF-8 instead of system default.
Extracting reused strings
Extracted constants which have been used in multiple places and classes to a seperate class.
Added debugging
Added debug-logging upon receiving of a NETCONF messages. Currently it was only logged when sending a NETCONF message.
Updated gitignore
Added IntelliJ folders to git ignore.