Reintroduce SP 1.6 models in TPCE
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / RendererProvider.java
index 4729514532aa0e65c0b0f848ac741bb72c9ef32a..8913c925dbe6a2e0b3a024d78b228a9dfc088c09 100644 (file)
@@ -7,50 +7,30 @@
  */
 package org.opendaylight.transportpce.renderer;
 
-import java.util.HashSet;
-import java.util.Set;
-
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.MountPointService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
-import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.renderer.rpcs.DeviceRendererRPCImpl;
 import org.opendaylight.transportpce.renderer.rpcs.TransportPCEServicePathRPCImpl;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.TransportpceDeviceRendererService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.TransportpceRendererService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class RendererProvider {
 
     private static final Logger LOG = LoggerFactory.getLogger(RendererProvider.class);
-    private final DataBroker dataBroker;
-    private final MountPointService mountPointService;
     private final RpcProviderRegistry rpcProviderRegistry;
-    private final PortMapping portMapping;
-    private final DeviceTransactionManager deviceTransactionManager;
-    private RpcRegistration<RendererService> deviceRendererRegistration;
     private DeviceRendererRPCImpl deviceRendererRPCImpl;
-    private RpcRegistration<TransportpceServicepathService> tpceServiceRegistry;
+    private RpcRegistration<TransportpceDeviceRendererService> deviceRendererRegistration;
+    private RpcRegistration<TransportpceRendererService> tpceServiceRegistry;
     private RendererServiceOperations rendererServiceOperations;
-    private RendererNotificationsImpl rendererNotificationsImpl;
-    private final Set<String> currentMountedDevice;
 
     public RendererProvider(RpcProviderRegistry rpcProviderRegistry, DeviceRendererRPCImpl deviceRendererRPCImpl,
-                            RendererServiceOperations rendererServiceOperations,DataBroker dataBroker,
-                            MountPointService mountPointService, PortMapping portMapping,
-                            DeviceTransactionManager deviceTransactionManager) {
+            RendererServiceOperations rendererServiceOperations) {
         this.rpcProviderRegistry = rpcProviderRegistry;
         this.deviceRendererRPCImpl = deviceRendererRPCImpl;
         this.rendererServiceOperations = rendererServiceOperations;
-        this.dataBroker = dataBroker;
-        this.mountPointService = mountPointService;
-        this.currentMountedDevice = new HashSet<>();
-        this.portMapping = portMapping;
-        this.deviceTransactionManager = deviceTransactionManager;
     }
 
     /**
@@ -61,11 +41,9 @@ public class RendererProvider {
         TransportPCEServicePathRPCImpl transportPCEServicePathRPCImpl =
             new TransportPCEServicePathRPCImpl(this.rendererServiceOperations);
         this.deviceRendererRegistration = this.rpcProviderRegistry
-                .addRpcImplementation(RendererService.class, this.deviceRendererRPCImpl);
+                .addRpcImplementation(TransportpceDeviceRendererService.class, deviceRendererRPCImpl);
         this.tpceServiceRegistry = this.rpcProviderRegistry
-                .addRpcImplementation(TransportpceServicepathService.class, transportPCEServicePathRPCImpl);
-        this.rendererNotificationsImpl = new RendererNotificationsImpl(this.dataBroker, this.mountPointService,
-                this.currentMountedDevice,this.portMapping,this.deviceTransactionManager);
+                .addRpcImplementation(TransportpceRendererService.class, transportPCEServicePathRPCImpl);
     }
 
     /**
@@ -79,10 +57,6 @@ public class RendererProvider {
         if (this.tpceServiceRegistry != null) {
             this.tpceServiceRegistry.close();
         }
-        // Clean up the RendererNotificationsImpl
-        if (this.rendererNotificationsImpl != null) {
-            this.rendererNotificationsImpl.close();
-        }
     }
 
 }