Interface D creation. NetworkModel->ServiceHandler 47/93847/25
authorErrea Moreno, Javier <javier.errea_moreno@nokia.com>
Mon, 16 Nov 2020 17:50:20 +0000 (18:50 +0100)
committerJavier <errea@eurecom.fr>
Wed, 20 Jan 2021 16:01:54 +0000 (17:01 +0100)
- Added common-ord-topology-types.yang and networkmodel.yang
- Created empty NetworkModelListener in Service Handler module.
- Initialization of Network model listener.
- Modified servicehandler blueprint and ServicehandlerImplTest.java
- Added models to TPCEUtils.java (lighty)
- Added NetworkModelListenerImpl to the controller start up process

JIRA: TRNSPRTPCE-359
Change-Id: I25e7b3f28741386c3d2b38ad49a04d7d4b304597
Signed-off-by: Javier <errea@eurecom.fr>
api/src/main/yang/service_path/transportpce-common-ord-topology-types@2020-11-16.yang [new file with mode: 0644]
api/src/main/yang/service_path/transportpce-networkmodel@2020-11-16.yang [new file with mode: 0644]
lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java
lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java [new file with mode: 0644]
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceHandlerOperationsImpl.java
servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImplTest.java

diff --git a/api/src/main/yang/service_path/transportpce-common-ord-topology-types@2020-11-16.yang b/api/src/main/yang/service_path/transportpce-common-ord-topology-types@2020-11-16.yang
new file mode 100644 (file)
index 0000000..c87f4ea
--- /dev/null
@@ -0,0 +1,61 @@
+module transportpce-common-ord-topology-types {
+  namespace "http://org/transportpce/D-interface/ord/topology/types";
+  prefix transportpce-common-ord-topology-types;
+
+  organization
+    "transportPCE";
+  contact
+    "transportPCE committers - ODL";
+  description
+    "YANG definitions of D interface (transportPCE). Adapted from network topology definition (openroadm)
+     Copyright ©  2020 Nokia, Inc. and others.  All rights reserved.
+
+     openroadm copyright:
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      AT&T Intellectual Property.  All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-11-16 {
+    description
+      "Version 1.5";
+  }
+
+  typedef topology-notification-types {
+    type enumeration {
+      enum openroadm-topology-update {
+        value 1;
+      }
+      enum openroadm-network-update {
+        value 2;
+      }
+      enum clli-network-update {
+        value 3;
+      }
+      enum otn-topology-update {
+        value 4;
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/api/src/main/yang/service_path/transportpce-networkmodel@2020-11-16.yang b/api/src/main/yang/service_path/transportpce-networkmodel@2020-11-16.yang
new file mode 100644 (file)
index 0000000..0624c39
--- /dev/null
@@ -0,0 +1,79 @@
+module transportpce-networkmodel {
+  namespace "http://org/opendaylight/transportpce/networkmodel";
+  prefix org-opendaylight-transportpce-networkmodel;
+
+  import transportpce-common-ord-topology-types {
+    prefix transportpce-common-ord-topology-types;
+    revision-date 2020-11-16;
+  }
+
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2018-10-19;
+  }
+
+  organization
+    "transportPCE";
+  contact
+    "transportPCE committers - ODL";
+  description
+    "YANG definitions proposed for interface D (transportPCE). Adapted from service definition (openroadm)
+     Copyright © 2020 Nokia, Inc. and others.  All rights reserved.
+
+     openroadm copyright:
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      AT&T Intellectual Property.  All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-11-16 {
+    description
+      "Initial revision of network model version 1.5";
+  }
+
+  grouping element-change {
+    leaf id {
+      type string;
+      mandatory true;
+      description "Id of abstracted element that changed in the topology";
+    }
+    leaf state {
+      type org-openroadm-common-types:state;
+      mandatory true;
+      description "Operational state of the affected element";
+    }
+  }
+
+  notification topology-update-result {
+    description
+      "This Notification indicates result of an update in the openroadm topology";
+    leaf notification-type {
+      type transportpce-common-ord-topology-types:topology-notification-types;
+    }
+    list ord-topology-changes {
+      key "id";
+      uses element-change;
+    }
+  }
+}
\ No newline at end of file
index eca1e4f8a79c14e5e3e68cf5abae77f8b72a48f4..c7386fd182f71668a84240341f5126a579b77f57 100644 (file)
@@ -61,6 +61,7 @@ import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOpe
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperationsImpl;
 import org.opendaylight.transportpce.renderer.rpcs.DeviceRendererRPCImpl;
 import org.opendaylight.transportpce.servicehandler.impl.ServicehandlerProvider;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
@@ -212,9 +213,13 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
                 lightyServices.getBindingDataBroker());
         PceListenerImpl pceListenerImpl = new PceListenerImpl(rendererServiceOperations, pathComputationService,
                 lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
+        NetworkModelListenerImpl networkModelListenerImpl =
+                new NetworkModelListenerImpl(lightyServices.getBindingNotificationPublishService(),
+                        serviceDataStoreOperations);
         ServiceHandlerOperations serviceHandlerOperations = new ServiceHandlerOperationsImpl(
                 lightyServices.getBindingDataBroker(), pathComputationService, rendererServiceOperations,
-                lightyServices.getBindingNotificationPublishService(), pceListenerImpl, rendererListenerImpl);
+                lightyServices.getBindingNotificationPublishService(), pceListenerImpl, rendererListenerImpl,
+                networkModelListenerImpl);
         return new TapiProvider(lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(),
                 serviceHandlerOperations, new TapiListener());
     }
index 7e0a02b8de323ffd30d10dc94ebf0d8649e58f35..bae69c2560379d1d89edcebb809f07f6efafd4fc 100644 (file)
@@ -207,6 +207,8 @@ public final class TPCEUtils {
                     .getInstance(),
             org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev200128
                     .$YangModuleInfoImpl.getInstance(),
+            org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116
+                    .$YangModuleInfoImpl.getInstance(),
             org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.$YangModuleInfoImpl
                     .getInstance(),
             org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.$YangModuleInfoImpl
@@ -226,6 +228,8 @@ public final class TPCEUtils {
                     .$YangModuleInfoImpl.getInstance(),
             org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.$YangModuleInfoImpl
                     .getInstance(),
+            org.opendaylight.yang.gen.v1.http.org.transportpce.d._interface.ord.topology.types.rev201116
+                    .$YangModuleInfoImpl.getInstance(),
             org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.$YangModuleInfoImpl.getInstance(),
 
             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.$YangModuleInfoImpl
index c07bf0cd2df595e3a1446d9a6cf7951dedd5670b..4852cc6bea44d528bfa3047acd070696dd4b3755 100644 (file)
@@ -21,6 +21,7 @@ import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOpe
 import org.opendaylight.transportpce.servicehandler.DowngradeConstraints;
 import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
 import org.opendaylight.transportpce.servicehandler.ServiceInput;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
 import org.opendaylight.transportpce.servicehandler.service.PCEServiceWrapper;
@@ -105,12 +106,14 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
     private RendererServiceWrapper rendererServiceWrapper;
     private PceListenerImpl pceListenerImpl;
     private RendererListenerImpl rendererListenerImpl;
+    private NetworkModelListenerImpl networkModelListenerImpl;
 
     //TODO: remove private request fields as they are in global scope
 
     public ServicehandlerImpl(DataBroker databroker, PathComputationService pathComputationService,
             RendererServiceOperations rendererServiceOperations, NotificationPublishService notificationPublishService,
-            PceListenerImpl pceListenerImpl, RendererListenerImpl rendererListenerImpl) {
+            PceListenerImpl pceListenerImpl, RendererListenerImpl rendererListenerImpl,
+            NetworkModelListenerImpl networkModelListenerImpl) {
         this.db = databroker;
         this.serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(this.db);
         this.serviceDataStoreOperations.initialize();
@@ -118,6 +121,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
         this.rendererServiceWrapper = new RendererServiceWrapper(rendererServiceOperations, notificationPublishService);
         this.pceListenerImpl = pceListenerImpl;
         this.rendererListenerImpl = rendererListenerImpl;
+        this.networkModelListenerImpl = networkModelListenerImpl;
     }
 
 
@@ -172,6 +176,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService {
         this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
         this.rendererListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
         this.rendererListenerImpl.setServiceInput(new ServiceInput(input));
+        this.networkModelListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
         LOG.debug(SERVICE_CREATE_MSG, LogMessages.PCE_CALLING);
         PathComputationRequestOutput output = this.pceServiceWrapper.performPCE(input, true);
         if (output == null) {
index ec1e2f55649c13085795b59eac4dac554a814efa..d8662c68db7cb1176e5db77da786a11d8e5312d3 100644 (file)
@@ -14,8 +14,10 @@ import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.RpcProviderService;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TransportpceNetworkmodelListener;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.TransportpcePceListener;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.TransportpceRendererListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
@@ -40,6 +42,7 @@ public class ServicehandlerProvider {
     private final NotificationPublishService notificationPublishService;
     private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
     private ListenerRegistration<TransportpceRendererListener> rendererlistenerRegistration;
+    private ListenerRegistration<TransportpceNetworkmodelListener> networkmodellistenerRegistration;
     private ObjectRegistration<OrgOpenroadmServiceService> rpcRegistration;
     private PathComputationService pathComputationService;
     private RendererServiceOperations rendererServiceOperations;
@@ -65,10 +68,14 @@ public class ServicehandlerProvider {
                 pathComputationService, notificationPublishService, null);
         final RendererListenerImpl rendererListenerImpl =
                 new RendererListenerImpl(pathComputationService, notificationPublishService);
+        final NetworkModelListenerImpl networkModelListenerImpl =
+                new NetworkModelListenerImpl(notificationPublishService, null);
         pcelistenerRegistration = notificationService.registerNotificationListener(pceListenerImpl);
         rendererlistenerRegistration = notificationService.registerNotificationListener(rendererListenerImpl);
+        networkmodellistenerRegistration = notificationService.registerNotificationListener(networkModelListenerImpl);
         final ServicehandlerImpl servicehandler = new ServicehandlerImpl(dataBroker, pathComputationService,
-                rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
+                networkModelListenerImpl);
         rpcRegistration =
             rpcService.registerRpcImplementation(OrgOpenroadmServiceService.class, servicehandler);
     }
@@ -80,6 +87,7 @@ public class ServicehandlerProvider {
         LOG.info("ServicehandlerProvider Closed");
         pcelistenerRegistration.close();
         rendererlistenerRegistration.close();
+        networkmodellistenerRegistration.close();
         rpcRegistration.close();
     }
 
diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java
new file mode 100644 (file)
index 0000000..06b61ae
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2020 Nokia, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.servicehandler.listeners;
+
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TopologyUpdateResult;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TransportpceNetworkmodelListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NetworkModelListenerImpl implements TransportpceNetworkmodelListener {
+
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkModelListenerImpl.class);
+    private final NotificationPublishService notificationPublishService; // to be used for T-API notification
+    private ServiceDataStoreOperations serviceDataStoreOperations;
+
+    public NetworkModelListenerImpl(NotificationPublishService notificationPublishService,
+                                    ServiceDataStoreOperations serviceDataStoreOperations) {
+        this.notificationPublishService = notificationPublishService;
+        this.serviceDataStoreOperations = serviceDataStoreOperations;
+    }
+
+    @Override
+    public void onTopologyUpdateResult(TopologyUpdateResult notification) {
+        LOG.info("Topology update notification: {}", notification.toString());
+    }
+
+    public void setserviceDataStoreOperations(ServiceDataStoreOperations serviceData) {
+        this.serviceDataStoreOperations = serviceData;
+    }
+}
index bb3f257a3c662b539d0afebbf5e1ee1d955fdfb0..53675b18f48d7bf065122cd53027012c311efd7f 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.servicehandler.impl.ServicehandlerImpl;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
@@ -32,9 +33,10 @@ public class ServiceHandlerOperationsImpl implements ServiceHandlerOperations {
 
     public ServiceHandlerOperationsImpl(DataBroker databroker, PathComputationService pathComputationService,
         RendererServiceOperations rendererServiceOperations, NotificationPublishService notificationPublishService,
-        PceListenerImpl pceListenerImpl, RendererListenerImpl rendererListenerImpl) {
+        PceListenerImpl pceListenerImpl, RendererListenerImpl rendererListenerImpl,
+        NetworkModelListenerImpl networkModelListenerImpl) {
         this.serviceHandler = new ServicehandlerImpl(databroker, pathComputationService, rendererServiceOperations,
-            notificationPublishService, pceListenerImpl, rendererListenerImpl);
+            notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
     }
 
     @Override
index da36c098ebc9a7407eaac3185a1eb1556071af11..6c7513f33e9fa0d08dd30ce4d47a088de27778a9 100644 (file)
@@ -47,6 +47,11 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
         <argument ref="notificationPublishService" />
     </bean>
 
+    <bean id="networkModelListener" class="org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl">
+        <argument ref="notificationPublishService" />
+        <argument ref="serviceDatastoreOperation" />
+    </bean>
+
     <bean id="serviceHandlerImpl" class="org.opendaylight.transportpce.servicehandler.service.ServiceHandlerOperationsImpl">
         <argument ref="dataBroker"/>
         <argument ref="pathComputationService" />
@@ -54,6 +59,7 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
         <argument ref="rendererServiceOperations" />
         <argument ref="pceListener" />
         <argument ref="rendererListener" />
+        <argument ref="networkModelListener" />
     </bean>
 
     <bean id="provider"
index 470975d8fa42905889e7a16f41b8de3af1218788..f21715e9569840a8793ab70b8d5a9e119e07856c 100644 (file)
@@ -28,6 +28,7 @@ import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import org.opendaylight.transportpce.common.ResponseCodes;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
@@ -78,6 +79,9 @@ public class ServicehandlerImplTest extends AbstractTest  {
     @Mock
     private RendererListenerImpl rendererListenerImpl;
 
+    @Mock
+    private NetworkModelListenerImpl networkModelListenerImpl;
+
     private ListeningExecutorService executorService;
     private CountDownLatch endSignal;
     private static final int NUM_THREADS = 5;
@@ -95,7 +99,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void createServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
             new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceCreateOutput>> result =
             servicehandlerImpl.serviceCreate(new ServiceCreateInputBuilder().build());
         result.addListener(new Runnable() {
@@ -120,7 +124,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         Mockito.when(pathComputationService.pathComputationRequest(any())).thenReturn(Futures.immediateFuture(any()));
         ServicehandlerImpl servicehandlerImpl =
             new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceCreateOutput>> result =  servicehandlerImpl.serviceCreate(input);
         result.addListener(new Runnable() {
             @Override
@@ -141,7 +145,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void deleteServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
             new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceDeleteOutput>> result =
             servicehandlerImpl.serviceDelete(new ServiceDeleteInputBuilder()
                 .setServiceDeleteReqInfo(new ServiceDeleteReqInfoBuilder().setServiceName("").build()).build());
@@ -165,7 +169,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         ServiceDeleteInput input = ServiceDataUtils.buildServiceDeleteInput();
         ServicehandlerImpl servicehandlerImpl =
             new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceDeleteOutput>> result = servicehandlerImpl.serviceDelete(input);
         result.addListener(new Runnable() {
             @Override
@@ -188,7 +192,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         Mockito.when(rendererServiceOperations.serviceDelete(any(), any())).thenReturn(Futures.immediateFuture(any()));
         ServicehandlerImpl servicehandlerImpl =
             new ServicehandlerImpl(dataBroker, pathComputationService, rendererServiceOperations,
-                notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ServiceDataStoreOperationsImpl serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(dataBroker);
         ServiceCreateInput createInput = ServiceDataUtils.buildServiceCreateInput();
         serviceDataStoreOperations.createService(createInput);
@@ -214,7 +218,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void serviceFeasibilityCheckShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceFeasibilityCheckOutput>> result =
                 servicehandlerImpl.serviceFeasibilityCheck(new ServiceFeasibilityCheckInputBuilder().build());
         result.addListener(new Runnable() {
@@ -239,7 +243,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         Mockito.when(pathComputationService.pathComputationRequest(any())).thenReturn(Futures.immediateFuture(any()));
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceFeasibilityCheckOutput>> result =
             servicehandlerImpl.serviceFeasibilityCheck(input);
         result.addListener(new Runnable() {
@@ -261,7 +265,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void serviceReconfigureShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceReconfigureOutput>> result =
                 servicehandlerImpl.serviceReconfigure(new ServiceReconfigureInputBuilder().setServiceName("").build());
         result.addListener(new Runnable() {
@@ -287,7 +291,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //action -> service reconfigure
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceReconfigureOutput>> result = servicehandlerImpl.serviceReconfigure(input);
 
         result.addListener(new Runnable() {
@@ -316,7 +320,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //create service to reconfigure
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(dataBroker, pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ServiceDataStoreOperationsImpl serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(dataBroker);
         ServiceCreateInput createInput = ServiceDataUtils.buildServiceCreateInput();
         serviceDataStoreOperations.createService(createInput);
@@ -344,7 +348,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void serviceReRestorationShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceRestorationOutput>> result =
                 servicehandlerImpl.serviceRestoration(new ServiceRestorationInputBuilder().setServiceName("").build());
         result.addListener(new Runnable() {
@@ -370,7 +374,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //action -> service restore
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceRestorationOutput>> result = servicehandlerImpl.serviceRestoration(input);
 
         result.addListener(new Runnable() {
@@ -399,7 +403,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //create service to restore
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(dataBroker, pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ServiceDataStoreOperationsImpl serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(dataBroker);
         ServiceCreateInput createInput = ServiceDataUtils.buildServiceCreateInput();
         serviceDataStoreOperations.createService(createInput);
@@ -427,7 +431,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void serviceRerouteShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceRerouteOutput>> result =
                 servicehandlerImpl.serviceReroute(new ServiceRerouteInputBuilder().setServiceName("").build());
         result.addListener(new Runnable() {
@@ -452,7 +456,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //action -> service reconfigure
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<ServiceRerouteOutput>> result = servicehandlerImpl.serviceReroute(input);
 
         result.addListener(new Runnable() {
@@ -481,7 +485,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //create service to be rerouted later
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(dataBroker, pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ServiceDataStoreOperationsImpl serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(dataBroker);
         ServiceCreateInput createInput = ServiceDataUtils.buildServiceCreateInput();
         serviceDataStoreOperations.createService(createInput);
@@ -509,7 +513,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void tempServiceDeleteShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<TempServiceDeleteOutput>> result =
                 servicehandlerImpl.tempServiceDelete(new TempServiceDeleteInputBuilder()
                         .setCommonId("").build());
@@ -536,7 +540,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         TempServiceDeleteInput input = ServiceDataUtils.buildTempServiceDeleteInput();
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<TempServiceDeleteOutput>> result = servicehandlerImpl.tempServiceDelete(input);
         result.addListener(new Runnable() {
             @Override
@@ -561,7 +565,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
         //create temp service to delete in the temp delete action
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(dataBroker, pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ServiceDataStoreOperationsImpl serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(dataBroker);
         TempServiceCreateInput createInput = ServiceDataUtils.buildTempServiceCreateInput();
         serviceDataStoreOperations.createTempService(createInput);
@@ -588,7 +592,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
     public void tempServiceCreateShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
         ListenableFuture<RpcResult<TempServiceCreateOutput>> result =
                 servicehandlerImpl.tempServiceCreate(new TempServiceCreateInputBuilder().build());
         result.addListener(new Runnable() {
@@ -615,7 +619,7 @@ public class ServicehandlerImplTest extends AbstractTest  {
 
         ServicehandlerImpl servicehandlerImpl =
                 new ServicehandlerImpl(getNewDataBroker(), pathComputationService, rendererServiceOperations,
-                        notificationPublishService, pceListenerImpl, rendererListenerImpl);
+                        notificationPublishService, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl);
 
         ListenableFuture<RpcResult<TempServiceCreateOutput>> result =  servicehandlerImpl.tempServiceCreate(input);
         result.addListener(new Runnable() {