X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Fimpl%2FServicehandlerImpl.java;fp=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Fimpl%2FServicehandlerImpl.java;h=555910d30b7aa9b04796dfe0674ac247b9c43e45;hb=9f17579836675a4a48db481176726bb050ec8ca1;hp=a5674cde5a8e549dbb97e590199789de9dd656ed;hpb=8be42823a12d414dfa491305f4912bb642b6d5e2;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 a5674cde5..555910d30 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 @@ -169,7 +169,10 @@ import org.opendaylight.yang.gen.v1.nbi.notifications.rev211013.notification.pro import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.Rpc; +import org.opendaylight.yangtools.yang.common.ErrorTag; +import org.opendaylight.yangtools.yang.common.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResult; +import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; @@ -292,7 +295,7 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { input, ResponseCodes.FINAL_ACK_YES, validationResult.getResultMessage(), ResponseCodes.RESPONSE_FAILED); } - //Check any presence of services with the same name + //Check any presence of services with the same nameequipmentNotification String serviceName = input.getServiceName(); if (this.serviceDataStoreOperations.getService(serviceName).isPresent()) { LOG.warn(SERVICE_CREATE_MSG, LogMessages.serviceInDS(serviceName)); @@ -569,14 +572,18 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { public final ListenableFuture> equipmentNotification(EquipmentNotificationInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceRerouteConfirm(ServiceRerouteConfirmInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -643,20 +650,26 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { @Override public final ListenableFuture> serviceReversion(ServiceReversionInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceRoll(ServiceRollInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> networkReOptimization(NetworkReOptimizationInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -767,7 +780,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceDeleteComplexResultNotificationRequestOutput>> serviceDeleteComplexResultNotificationRequest( ServiceDeleteComplexResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -775,7 +790,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceCreateResultNotificationRequestOutput>> serviceCreateResultNotificationRequest( ServiceCreateResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -783,7 +800,9 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceDeleteResultNotificationRequestOutput>> serviceDeleteResultNotificationRequest( ServiceDeleteResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -791,27 +810,35 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceCreateComplexResultNotificationRequestOutput>> serviceCreateComplexResultNotificationRequest( ServiceCreateComplexResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceFeasibilityCheckBulk( ServiceFeasibilityCheckBulkInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceCreateBulk(ServiceCreateBulkInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> tempServiceCreateBulk( TempServiceCreateBulkInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -819,56 +846,72 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { ServiceRollResultNotificationRequestOutput>> serviceRollResultNotificationRequest( ServiceRollResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceReconfigureBulk( ServiceReconfigureBulkInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceReconfigureResultNotificationRequest(ServiceReconfigureResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceRestorationResultNotificationRequest(ServiceRestorationResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceReversionResultNotificationRequest(ServiceReversionResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> serviceRerouteConfirmResultNotificationRequest(ServiceRerouteConfirmResultNotificationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> opticalTunnelCreate(OpticalTunnelCreateInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> opticalTunnelRequestCancel( OpticalTunnelRequestCancelInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override @@ -942,35 +985,45 @@ public class ServicehandlerImpl implements OrgOpenroadmServiceService { @Override public final ListenableFuture> serviceSrlgGet(ServiceSrlgGetInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> endTerminalPerformanceInfoRequest( EndTerminalPerformanceInfoRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> endTerminalActivationRequest( EndTerminalActivationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> endTerminalDeactivationRequest( EndTerminalDeactivationRequestInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } @Override public final ListenableFuture> endTerminalPowerControl( EndTerminalPowerControlInput input) { // TODO Auto-generated method stub - return null; + return RpcResultBuilder.failed() + .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet") + .buildFuture(); } public Registration getRegisteredRpc() {