+ TapiContext tapiContext = new TapiContext(this.networkTransactionService);
+ LOG.info("Empty TAPI context created: {}", tapiContext.getTapiContext());
+ TapiLink tapiLink = new TapiLinkImpl(this.networkTransactionService);
+ TopologyUtils topologyUtils = new TopologyUtils(this.networkTransactionService, this.dataBroker, tapiLink);
+ ConnectivityUtils connectivityUtils = new ConnectivityUtils(this.serviceDataStoreOperations, new HashMap<>(),
+ tapiContext, this.networkTransactionService);
+ TapiInitialORMapping tapiInitialORMapping = new TapiInitialORMapping(topologyUtils, connectivityUtils,
+ tapiContext, this.serviceDataStoreOperations);
+ tapiInitialORMapping.performTopoInitialMapping();
+ tapiInitialORMapping.performServInitialMapping();
+ TapiPceNotificationHandler pceListenerImpl = new TapiPceNotificationHandler(dataBroker, connectivityUtils);
+ TapiRendererNotificationHandler rendererListenerImpl = new TapiRendererNotificationHandler(dataBroker,
+ notificationPublishService);
+
+ rpcRegistration = rpcProviderService.registerRpcImplementations(
+ new CreateConnectivityServiceImpl(rpcService, tapiContext, connectivityUtils, pceListenerImpl,
+ rendererListenerImpl),
+ new GetConnectivityServiceDetailsImpl(tapiContext),
+ new GetConnectionDetailsImpl(tapiContext),
+ new DeleteConnectivityServiceImpl(rpcService, tapiContext, networkTransactionService),
+ new GetConnectivityServiceListImpl(tapiContext),
+ new GetNodeDetailsImpl(tapiContext),
+ new GetTopologyDetailsImpl(tapiContext, topologyUtils, tapiLink, networkTransactionService),
+ new GetNodeEdgePointDetailsImpl(tapiContext),
+ new GetLinkDetailsImpl(tapiContext),
+ new GetTopologyListImpl(tapiContext),
+ new GetServiceInterfacePointDetailsImpl(tapiContext),
+ new GetServiceInterfacePointListImpl(tapiContext));
+
+ 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));
+ // Notification Listener
+ pcelistenerRegistration = notificationService.registerCompositeListener(pceListenerImpl.getCompositeListener());
+ rendererlistenerRegistration = notificationService
+ .registerCompositeListener(rendererListenerImpl.getCompositeListener());
+ TapiServiceNotificationHandler serviceHandlerListenerImpl = new TapiServiceNotificationHandler(dataBroker);
+ servicehandlerlistenerRegistration = notificationService
+ .registerCompositeListener(serviceHandlerListenerImpl.getCompositeListener());
+ tapinetworkmodellistenerRegistration = notificationService
+ .registerCompositeListener(tapiNetworkModelNotificationHandler.getCompositeListener());