--- /dev/null
+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
--- /dev/null
+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
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;
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());
}
.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
.$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
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;
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();
this.rendererServiceWrapper = new RendererServiceWrapper(rendererServiceOperations, notificationPublishService);
this.pceListenerImpl = pceListenerImpl;
this.rendererListenerImpl = rendererListenerImpl;
+ this.networkModelListenerImpl = networkModelListenerImpl;
}
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) {
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;
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;
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);
}
LOG.info("ServicehandlerProvider Closed");
pcelistenerRegistration.close();
rendererlistenerRegistration.close();
+ networkmodellistenerRegistration.close();
rpcRegistration.close();
}
--- /dev/null
+/*
+ * 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;
+ }
+}
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;
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
<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" />
<argument ref="rendererServiceOperations" />
<argument ref="pceListener" />
<argument ref="rendererListener" />
+ <argument ref="networkModelListener" />
</bean>
<bean id="provider"
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;
@Mock
private RendererListenerImpl rendererListenerImpl;
+ @Mock
+ private NetworkModelListenerImpl networkModelListenerImpl;
+
private ListeningExecutorService executorService;
private CountDownLatch endSignal;
private static final int NUM_THREADS = 5;
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() {
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
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());
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
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);
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() {
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() {
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() {
//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() {
//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);
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() {
//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() {
//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);
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() {
//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() {
//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);
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());
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
//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);
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() {
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() {