X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Fimpl%2FServicehandlerImpl.java;h=435e809aba3729ffc0d82147ed8c66ae89d72614;hb=refs%2Fchanges%2F92%2F78292%2F17;hp=3a07abb10a6c35693ff30748c9253037e40284bb;hpb=15f6ff30d3f8f562ed139d8855e12ffa35bedf95;p=transportpce.git diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java index 3a07abb10..435e809ab 100644 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java @@ -147,8 +147,13 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceImplementationRequestInput serviceImplementationRequest = ModelMappingUtils.createServiceImplementationRequest(new ServiceInput(input), pceResponse); - ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations - .serviceImplementation(serviceImplementationRequest); + ServiceImplementationRequestOutput serviceImplementationRequestOutput = null; + try { + serviceImplementationRequestOutput = + this.rendererServiceOperations.serviceImplementation(serviceImplementationRequest).get(); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Renderer Service implementation failed !"); + } if (ResponseCodes.RESPONSE_OK .equals(serviceImplementationRequestOutput.getConfigurationResponseCommon().getResponseCode())) { String message = "Service rendered successfully !"; @@ -223,7 +228,12 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { .ServiceDeleteInput serviceDeleteInput = ModelMappingUtils.createServiceDeleteInput( new ServiceInput(input)); org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017 - .ServiceDeleteOutput output = this.rendererServiceOperations.serviceDelete(serviceDeleteInput); + .ServiceDeleteOutput output = null; + try { + output = this.rendererServiceOperations.serviceDelete(serviceDeleteInput).get(); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Renderer Service delete failed !"); + } if (!ResponseCodes.RESPONSE_OK .equals(output.getConfigurationResponseCommon().getResponseCode())) { @@ -408,7 +418,12 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { .ServiceDeleteInput serviceDeleteInput = ModelMappingUtils.createServiceDeleteInput( new ServiceInput(input)); org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017 - .ServiceDeleteOutput output = this.rendererServiceOperations.serviceDelete(serviceDeleteInput); + .ServiceDeleteOutput output = null; + try { + output = this.rendererServiceOperations.serviceDelete(serviceDeleteInput).get(); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Renderer Service delete failed ! "); + } if (!ResponseCodes.RESPONSE_OK .equals(output.getConfigurationResponseCommon().getResponseCode())) { @@ -478,8 +493,13 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceImplementationRequestInput serviceImplementationRequest = ModelMappingUtils.createServiceImplementationRequest(new ServiceInput(input), pceResponse); - ServiceImplementationRequestOutput serviceImplementationRequestOutput = this.rendererServiceOperations - .serviceImplementation(serviceImplementationRequest); + ServiceImplementationRequestOutput serviceImplementationRequestOutput = null; + try { + serviceImplementationRequestOutput = + this.rendererServiceOperations.serviceImplementation(serviceImplementationRequest).get(); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Renderer service implementation failed !"); + } if (ResponseCodes.RESPONSE_OK .equals(serviceImplementationRequestOutput.getConfigurationResponseCommon().getResponseCode())) { String message = "Service rendered successfully !";