Update project version for Chlorine release train
[transportpce.git] / tapi / src / main / java / org / opendaylight / transportpce / tapi / impl / TapiProvider.java
index b84c3a1561ba99e9d21677211f88d5fc3734810c..b68f43ccf5c26fb0c0c6a23b9248a211f4558ae1 100644 (file)
@@ -20,6 +20,7 @@ import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
 import org.opendaylight.transportpce.tapi.connectivity.ConnectivityUtils;
 import org.opendaylight.transportpce.tapi.connectivity.TapiConnectivityImpl;
+import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelListenerImpl;
 import org.opendaylight.transportpce.tapi.listeners.TapiPceListenerImpl;
 import org.opendaylight.transportpce.tapi.listeners.TapiRendererListenerImpl;
 import org.opendaylight.transportpce.tapi.listeners.TapiServiceHandlerListenerImpl;
@@ -32,7 +33,7 @@ import org.opendaylight.transportpce.tapi.utils.TapiContext;
 import org.opendaylight.transportpce.tapi.utils.TapiInitialORMapping;
 import org.opendaylight.transportpce.tapi.utils.TapiLink;
 import org.opendaylight.transportpce.tapi.utils.TapiListener;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.TransportpcePceListener;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220615.TransportpcePceListener;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.Network;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.TransportpceRendererListener;
@@ -82,6 +83,7 @@ public class TapiProvider {
     private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
     private ListenerRegistration<TransportpceRendererListener> rendererlistenerRegistration;
     private ListenerRegistration<TransportpceServicehandlerListener> servicehandlerlistenerRegistration;
+    private ListenerRegistration<TapiNetworkModelListenerImpl> tapinetworkmodellistenerRegistration;
     private final OrgOpenroadmServiceService serviceHandler;
     private final ServiceDataStoreOperations serviceDataStoreOperations;
     private final TapiListener tapiListener;
@@ -94,6 +96,7 @@ public class TapiProvider {
     private TapiRendererListenerImpl rendererListenerImpl;
     private TapiServiceHandlerListenerImpl serviceHandlerListenerImpl;
     private final NotificationService notificationService;
+    private TapiNetworkModelListenerImpl tapiNetworkModelListenerImpl;
 
     public TapiProvider(DataBroker dataBroker, RpcProviderService rpcProviderService,
             OrgOpenroadmServiceService serviceHandler, ServiceDataStoreOperations serviceDataStoreOperations,
@@ -101,7 +104,8 @@ public class TapiProvider {
             TapiNetconfTopologyListener topologyListener, TapiPortMappingListener tapiPortMappingListener,
             TransportpceTapinetworkutilsService tapiNetworkUtils, TapiPceListenerImpl pceListenerImpl,
             TapiRendererListenerImpl rendererListenerImpl, TapiServiceHandlerListenerImpl serviceHandlerListenerImpl,
-            NotificationService notificationService, TapiOrLinkListener orLinkListener) {
+            NotificationService notificationService, TapiOrLinkListener orLinkListener,
+                        TapiNetworkModelListenerImpl tapiNetworkModelListenerImpl) {
         this.dataBroker = dataBroker;
         this.rpcProviderService = rpcProviderService;
         this.serviceHandler = serviceHandler;
@@ -116,6 +120,7 @@ public class TapiProvider {
         this.serviceHandlerListenerImpl = serviceHandlerListenerImpl;
         this.notificationService = notificationService;
         this.orLinkListener = orLinkListener;
+        this.tapiNetworkModelListenerImpl = tapiNetworkModelListenerImpl;
     }
 
     /**
@@ -135,7 +140,7 @@ public class TapiProvider {
         tapiInitialORMapping.performServInitialMapping();
 
         TapiConnectivityImpl tapi = new TapiConnectivityImpl(this.serviceHandler, tapiContext, connectivityUtils,
-                pceListenerImpl, rendererListenerImpl, serviceHandlerListenerImpl);
+                pceListenerImpl, rendererListenerImpl);
         TapiTopologyImpl topo = new TapiTopologyImpl(this.dataBroker, tapiContext, topologyUtils, tapiLink);
         rpcRegistration = rpcProviderService.registerRpcImplementation(TapiConnectivityService.class, tapi);
         rpcProviderService.registerRpcImplementation(TapiTopologyService.class, topo);
@@ -161,6 +166,8 @@ public class TapiProvider {
         rendererlistenerRegistration = notificationService.registerNotificationListener(rendererListenerImpl);
         servicehandlerlistenerRegistration =
                 notificationService.registerNotificationListener(serviceHandlerListenerImpl);
+        tapinetworkmodellistenerRegistration =
+                notificationService.registerNotificationListener(tapiNetworkModelListenerImpl);
     }
 
     /**
@@ -184,5 +191,6 @@ public class TapiProvider {
         rendererlistenerRegistration.close();
         servicehandlerlistenerRegistration.close();
         rpcRegistration.close();
+        tapinetworkmodellistenerRegistration.close();
     }
 }