Juniper / netconf-java

Java library for NETCONF
Other
76 stars 63 forks source link

Add namespace-aware parsing for rpc-reply #51

Closed GregDThomas closed 3 years ago

GregDThomas commented 3 years ago

This builds on the earlier work for namespace-aware parsing of <hello>, and is now ready for review.

It introduces a new RpcReply class that is used to parse <rpc-reply> messages (with some refactoring of the Hello class to tease out common code).

Instead of searching for the text <ok/> in the String response, NetconfSession now uses the methods in RpcReply to determine if a response is OK (similarly for warning and errors).

Existing tests passes (a few textual exception messages changed slightly, I don't think that is a problem), and this also runs a suite of tests on my local device too.