- rpcRegistration = rpcProviderService.registerRpcImplementation(TapiConnectivityService.class, tapi);
- rpcProviderService.registerRpcImplementation(TapiTopologyService.class, topo);
- rpcProviderService.registerRpcImplementation(TapiCommonService.class, topo);
- dataTreeChangeListenerRegistration1 =
- dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION,
- LINK_II), orLinkListener);
- dataTreeChangeListenerRegistration =
- dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL,
- InstanceIdentifiers.NETCONF_TOPOLOGY_II.child(Node.class)), topologyListener);
- mappingListenerListenerRegistration =
- dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION,
- MAPPING_II), tapiPortMappingListener);
- tapiNetworkutilsServiceRpcRegistration =
- rpcProviderService.registerRpcImplementation(TransportpceTapinetworkutilsService.class,
- this.tapiNetworkUtils);
- @NonNull
- InstanceIdentifier<ServiceInterfacePoints> sipIID = InstanceIdentifier.create(ServiceInterfacePoints.class);
- dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.create(
- LogicalDatastoreType.CONFIGURATION, sipIID), tapiListener);
+ this.listeners = new ArrayList<>();
+ TapiNetconfTopologyListener topologyListener = new TapiNetconfTopologyListener(tapiNetworkModelServiceImpl);
+ TapiOrLinkListener orLinkListener = new TapiOrLinkListener(tapiLink, networkTransactionService);
+ TapiPortMappingListener tapiPortMappingListener = new TapiPortMappingListener(tapiNetworkModelServiceImpl);
+ listeners.add(dataBroker.registerTreeChangeListener(
+ DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, LINK_II), orLinkListener));
+ listeners.add(dataBroker.registerTreeChangeListener(
+ DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, InstanceIdentifiers.NETCONF_TOPOLOGY_II
+ .child(Node.class)),
+ topologyListener));
+ listeners.add(dataBroker.registerTreeChangeListener(
+ DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, MAPPING_II), tapiPortMappingListener));
+ TapiListener tapiListener = new TapiListener();
+ listeners.add(dataBroker.registerTreeChangeListener(
+ DataTreeIdentifier.of(
+ LogicalDatastoreType.CONFIGURATION,
+ InstanceIdentifier.create(ServiceInterfacePoints.class)),
+ tapiListener));