Fix error reporting for PUT/POST 01/52101/1
authorTom Pantelis <tpanteli@brocade.com>
Mon, 13 Feb 2017 15:13:17 +0000 (10:13 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 21 Feb 2017 10:18:55 +0000 (10:18 +0000)
commitae1a78857c108ca7d4240c80019eebf485459c18
tree8f24ba84b5cfed035858aefb3cba2207930d92b2
parent58e0b7ab5e3a2d31994ebfbcc5656b04d2442af8
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>
(cherry picked from commit 0f3e7394ddba30db976ec5b0afe0db64c6186a32)
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