[CONTROLLER-461] NetconfMapping.checkSuccessReply(NetconfMessage) should throw NetconfDocumentedException Created: 08/May/14  Updated: 19/Jun/14  Resolved: 19/Jun/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Devin Avery Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


External issue ID: 977

 Description   

CONTROLLER-177 (Fix netconf exception handling) added the NetconfDocumentedException to the checkSuccessReply method. However the method still throws an IllegalStateException internally (i.e. it does not use the added exception as well).

This bug should modify the method to throw the proper NetconfDocumentedException (since it is required for proper downstream handling of netconf related errors).



 Comments   
Comment by Tom Pantelis [ 08/May/14 ]

There already is an RpcError class containing the necessary info to produce appropriate restconf error output. Instead of setting an exception in the Future, I think NetconfDeviceListener.processMessage should convert the NetconfDocumentedException into an RpcError and return an RpcResult in the Future. I think this is the intention of the invoke RPC interface – an exception should only be thrown as a result of drastic internal error, ie unchecked ex (eg NPE) in code. It should make every effort to return an RpcError.

Comment by Tom Pantelis [ 02/Jun/14 ]

Submitted: https://git.opendaylight.org/gerrit/#/c/7608/

Generated at Wed Feb 07 19:53:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.