[ONOS-7766] Modify the use of invalidated checkReply methods in Netconf

Change-Id: I4400c33373a93926bcc8a397db4f24e141790b63
This commit is contained in:
Kim JeongWoo 2018-08-10 16:50:23 +09:00 committed by Andrea Campanella
parent 3dceff2dba
commit 8b03bc583b

View File

@ -410,7 +410,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession {
@Override
public String requestSync(String request) throws NetconfException {
String reply = sendRequest(request);
checkReply(reply);
if (!checkReply(reply)) {
throw new NetconfException("Request not successful with device "
+ deviceInfo + " with reply " + reply);
}
return reply;
}
@ -494,7 +497,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession {
throw new NetconfTransportException(t);
} else {
// FIXME avoid using checkReply, error handling is weird
checkReply(reply);
if (!checkReply(reply)) {
throw new NetconfTransportException("rpc-request not successful with device "
+ deviceInfo + " with reply " + reply);
}
return reply;
}
}, SharedExecutors.getPoolThreadExecutor());