import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.PathComputationRequestOutputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.PathComputationRerouteRequestOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.service.path.rpc.result.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddOpenroadmOperationalModesToCatalogInputBuilder;
@Mock
private NetworkListener networkModelListenerImpl;
+ @Mock
+ private PathDescription pathDescription;
private ServiceDataStoreOperations serviceDataStoreOperations;
private CatalogDataStoreOperations catalogDataStoreOperations;
private ServiceCreateInput serviceCreateInput;
serviceReconfigureInput = ServiceDataUtils.buildServiceReconfigureInput();
serviceRestorationInput = ServiceDataUtils.buildServiceRestorationInput();
serviceRerouteInput = ServiceDataUtils.buildServiceRerouteInput();
+ pathDescription = ServiceDataUtils.createPathDescription(0,1,0,1);
}
@Test
when(rendererServiceOperations.serviceDelete(any(), any())).thenReturn(Futures.immediateFuture(any()));
//create temp service to delete in the temp delete action
TempServiceCreateInput createInput = ServiceDataUtils.buildTempServiceCreateInput();
- serviceDataStoreOperations.createTempService(createInput);
+ serviceDataStoreOperations.createTempService(createInput, pathDescription);
ListenableFuture<RpcResult<TempServiceDeleteOutput>> result =
- new ServicehandlerImpl(
- pathComputationService, rendererServiceOperations, notificationPublishService,
- pceListenerImpl, rendererListenerImpl, networkModelListenerImpl,
- serviceDataStoreOperations, catalogDataStoreOperations)
- .tempServiceDelete(ServiceDataUtils.buildTempServiceDeleteInput(createInput.getCommonId()));
+ new ServicehandlerImpl(
+ pathComputationService, rendererServiceOperations, notificationPublishService,
+ pceListenerImpl, rendererListenerImpl, networkModelListenerImpl,
+ serviceDataStoreOperations, catalogDataStoreOperations)
+ .tempServiceDelete(ServiceDataUtils.buildTempServiceDeleteInput(createInput.getCommonId()));
result.addListener(() -> endSignal.countDown(), executorService);
endSignal.await();
assertEquals(