NETCONF-514: Use exists instead of read for PUT 82/68782/4
authorTom Pantelis <tompantelis@gmail.com>
Mon, 26 Feb 2018 19:19:01 +0000 (14:19 -0500)
committerJakubToth <jakub.toth@pantheon.tech>
Tue, 27 Feb 2018 23:06:47 +0000 (23:06 +0000)
commit232008a47d7ed50f062f5e11a416e5cf6f92e128
treeba1d44b0791aa1654a4dbc652518c3316b31e14d
parent86e8b0bb2c9e0f10f7d679cf70495c3d4249e547
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/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/DeleteDataTransactionUtil.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PatchDataTransactionUtil.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PostDataTransactionUtil.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PutDataTransactionUtil.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/ResponseFactory.java
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfDataServiceImplTest.java
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PutDataTransactionUtilTest.java