Switch to using asynchronous JAX-RS interface (NETCONF-718)

[NETCONF-1155] Make RestconfDataServiceImpl.readData() asynchronous Created: 12/Sep/23  Updated: 23/Oct/23

Status: In Progress
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Sub-task Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Unresolved Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to NETCONF-1156 Improve NetconfDataTreeService to han... Confirmed

 Description   

The readData() operation should be pretty straightforward, but we have kinks in place.

First of all, there is the magic 'create YANG notification streams' bit, which is synchronous and should not even be present.

Second of all, there is the whole 'withFields' and 'withDefaults' processing, which requires synchronous reads in RestconfStrategy. These need some figuring out, but not much:

  1. current implementation should be in MdsalRestconfStrategy, really
  2. NETCONF should do its own thing for withFields based on NetconfDataTreeService
  3. NETCONF's stance to withDefaults needs to be fixed. Essentially if the device supports it, great, we will pass it down. If not ... that's tricky, as we can just reject the invocation, or do some fudging based on RFC6243 spec.

As part of this issue we want to specialize the 'read whole datastore' and 'read a particular resource', e.g. the difference in identifier being null.

When the dust around all of this settles, RestconfStrategy.readData() should return a RestconfFuture and just perform result mapping based on that – completing an AsyncResponse.


Generated at Wed Feb 07 20:16:48 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.