import org.opendaylight.transportpce.tapi.utils.TapiTopologyDataUtils;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.transportpce.test.utils.TopologyDataUtils;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.configuration.response.common.ConfigurationResponseCommonBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OrgOpenroadmServiceService;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateInput;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev221121.CreateConnectivityServiceInput;
}, executorService);
endSignal.await();
-
+ LOG.info("INPUT= {}", input.toString());
RpcResult<CreateConnectivityServiceOutput> rpcResult = result.get();
assertTrue(rpcResult.isSuccessful());
}
OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
-
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
tapipceNotificationHandler, tapirendererNotificationHandler, networkTransactionService);
ListenableFuture<RpcResult<DeleteConnectivityServiceOutput>> result =
@Test
void deleteConnServiceShouldBeSuccessForExistingService() throws ExecutionException, InterruptedException {
- when(rendererServiceOperations.serviceDelete(any(), any())).thenReturn(Futures.immediateFuture(any()));
+ ConfigurationResponseCommon crc = new ConfigurationResponseCommonBuilder()
+ .setRequestId("request 1")
+ .setResponseCode("OK")
+ .setAckFinalIndicator("requestProcessed").build();
+ ServiceDeleteOutput sdo = new ServiceDeleteOutputBuilder()
+ .setConfigurationResponseCommon(crc)
+ .build();
+ when(rendererServiceOperations.serviceDelete(any(), any()))
+ .thenReturn(Futures.immediateFuture(sdo));
OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
tapipceNotificationHandler, tapirendererNotificationHandler, networkTransactionService);
-
ServiceCreateInput createInput = TapiConnectivityDataUtils.buildServiceCreateInput();
serviceDataStoreOperations.createService(createInput);
tapiContext.updateConnectivityContext(TapiConnectivityDataUtils.createConnService(), new HashMap<>());
-
DeleteConnectivityServiceInput input = TapiConnectivityDataUtils.buildConnServiceDeleteInput();
ListenableFuture<RpcResult<DeleteConnectivityServiceOutput>> result =
tapiConnectivity.deleteConnectivityService(input);
}, executorService);
endSignal.await();
-
+ LOG.debug("RESULT = {}", result.toString());
RpcResult<DeleteConnectivityServiceOutput> rpcResult = result.get();
assertTrue(rpcResult.isSuccessful());
}
-}
\ No newline at end of file
+}