Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-918

Move NetconfDeviceTopologyAdapter to netconf.topology.spi


    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 5.0.0
    • None
    • netconf
    • None

      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.


            rovarga Robert Varga
            rovarga Robert Varga
            0 Vote for this issue
            1 Start watching this issue