[NETCONF-918] Move NetconfDeviceTopologyAdapter to netconf.topology.spi Created: 05/Dec/22  Updated: 01/Jan/23  Resolved: 01/Jan/23

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks NETCONF-913 RemoteDeviceId should capture only MD... Resolved
is blocked by NETCONF-922 Expose sal-netconf-connector configur... Resolved

 Description   

NetconfDeviceTopologyAdapter is the only component which requires various netconf-topology-related things from RemoteDeviceId.

Unfortunately it is strongly referenced NetconfDeviceSalFacade, which effectively routes RemoteDeviceHandler.onDeviceConnected() and similar events.

The other thing the facade is doing is updating the mount instance with services. We definitely want to separate out the datastore update handling of NetconfDeviceTopologyAdapter to netconf-api's SPI component, where it lands on the proper layer of indirection, and thus can then be used in a composable way by netconf-topology(-singleton) and callhome-provider – all of which bind to netconf topology.

This should be rather easy to achieve by it implementing RemoteDeviceHandler, as all it really needs is already present there – up/down/reconnect along with session preferences.

As a further note, there is a bit of a mess with transaction chains: each device gets one, but then topology implementations are also updating the operational datastore – which ends up being ... funky.

As such, there needs to be a clear lifecycle binding between datastore updates, especially for netconf-topology-singleton: when a facade for a device starts transitioning away from master, it needs to signal to NetconfDeviceTopologyAdapter to stop updating datastore state AND that request needs to provide a ListenableFuture, which terminates only once the transaction chain actually finishes, so that the integration with SingletonService's shutdown hook works as expected.

 


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