Fix error reporting for PUT/POST 92/51792/5
authorTom Pantelis <tpanteli@brocade.com>
Mon, 13 Feb 2017 15:13:17 +0000 (10:13 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 16 Feb 2017 10:08:41 +0000 (05:08 -0500)
commit0f3e7394ddba30db976ec5b0afe0db64c6186a32
tree4446d4adb842a43d48aaf2ba13951664803b5471
parent6a3199c487a2adf2f9bee7b2c73ec12bd08179a9
Fix error reporting for PUT/POST

If a datastore failure occurs for PUT or POST, restconf reports the
error message "Problem while PUT operations" which is neither useful
nor grammatically correct.

It used to report the underlying error info however this was broken by
https://git.opendaylight.org/gerrit/#/c/40235/ which changed the code to
use a Future callback with a CountDownLatch but doesn't propagate errors
from the Future. I don't understand why the code was changed in this manner
when it worked fine and was much simpler using checkedGet. I changed the
code back to use checkedGet, in several places.

Change-Id: I2e917d7eedc569702cdf3a54c4aa0321fe229ca1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/BrokerFacade.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/JSONRestconfServiceImplTest.java