NETCONF-514: Use exists instead of read for PUT 88/68988/1
authorTom Pantelis <tompantelis@gmail.com>
Mon, 26 Feb 2018 19:19:01 +0000 (14:19 -0500)
committerJakub Toth <jakub.toth@pantheon.tech>
Fri, 2 Mar 2018 06:52:58 +0000 (07:52 +0100)
commit68078d18219b1010edf9b8f8d51dcd6f21253f77
tree80ad13b1d976aae5f9599c07414b2367c5444069
parent834e8b25021ddbd640e3aa4052c4a792c25ec568
NETCONF-514: Use exists instead of read for PUT

The PUT operation needs to check if the path already exists
in order to return the proper response code according to the RFC
however calling exists instead of read is more efficient on the
back end.

Change-Id: Ibd7e99324c6a151aae91083e0c90bdf877161dee
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/DeleteDataTransactionUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/PatchDataTransactionUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/PostDataTransactionUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/PutDataTransactionUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/ResponseFactory.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/restful/services/impl/RestconfDataServiceImplTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/restful/utils/PutDataTransactionUtilTest.java