Catalog RPC Implementation
[transportpce.git] / lighty / src / main / java / io / lighty / controllers / tpce / module / TransportPCEImpl.java
index a888672b2c6ab3ab671d099eb51b75c63ed5629d..889c7f410754a30e35307f8291495ed7df003bd3 100644 (file)
@@ -12,6 +12,8 @@ import io.lighty.core.controller.api.LightyServices;
 import java.util.Arrays;
 import java.util.List;
 import org.opendaylight.mdsal.binding.api.NotificationService;
+import org.opendaylight.transportpce.servicehandler.catalog.CatalogDataStoreOperations;
+import org.opendaylight.transportpce.servicehandler.catalog.CatalogDataStoreOperationsImpl;
 import org.opendaylight.transportpce.common.crossconnect.CrossConnect;
 import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl;
 import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl121;
@@ -199,15 +201,17 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
             lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
         NetworkModelListenerImpl networkModelListenerImpl = new NetworkModelListenerImpl(
                 lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
+        CatalogDataStoreOperations catalogDataStoreOperations = new CatalogDataStoreOperationsImpl(
+                lightyServices.getBindingDataBroker());
         ServicehandlerImpl servicehandler = new ServicehandlerImpl(lightyServices.getBindingDataBroker(),
             pathComputationService, rendererServiceOperations, lightyServices.getBindingNotificationPublishService(),
-            pceListenerImpl, rendererListenerImpl, networkModelListenerImpl, serviceDataStoreOperations);
+            pceListenerImpl, rendererListenerImpl, networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
         ServiceListener serviceListener = new ServiceListener(servicehandler, serviceDataStoreOperations,
                 lightyServices.getBindingNotificationPublishService());
         servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
                 lightyServices.getRpcProviderService(), lightyServices.getNotificationService(),
                 serviceDataStoreOperations, pceListenerImpl, serviceListener, rendererListenerImpl,
-                networkModelListenerImpl, servicehandler);
+                networkModelListenerImpl, servicehandler, catalogDataStoreOperations);
         if (activateTapi) {
             LOG.info("Creating tapi beans ...");
             TapiLink tapiLink = new TapiLink(networkTransaction);
@@ -354,9 +358,9 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
         OpenRoadmInterfacesImpl121 openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(
                 deviceTransactionManager);
         OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221 = new OpenRoadmInterfacesImpl221(
-                deviceTransactionManager, portMapping, portMapping.getPortMappingVersion221());
+                deviceTransactionManager, portMapping);
         OpenRoadmInterfacesImpl710 openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(
-                deviceTransactionManager, portMapping, portMapping.getPortMappingVersion710());
+                deviceTransactionManager, portMapping);
         return new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils, openRoadmInterfacesImpl121,
                 openRoadmInterfacesImpl221, openRoadmInterfacesImpl710);
     }