import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
-
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
-
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.pce.PceComplianceCheck;
import org.opendaylight.transportpce.pce.PceComplianceCheckResult;
import org.opendaylight.transportpce.pce.PceSendingPceRPCs;
import org.opendaylight.transportpce.pce.gnpy.GnpyResult;
-
import org.opendaylight.yang.gen.v1.gnpy.path.rev200202.result.Response;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.CancelResourceReserveInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.CancelResourceReserveOutput;
LOG.info("close.");
}
+ @SuppressFBWarnings(
+ value = "UPM_UNCALLED_PRIVATE_METHOD",
+ justification = "false positive, this method is used by public method cancelResourceReserve")
private void sendNotifications(ServicePathNotificationTypes servicePathNotificationTypes, String serviceName,
RpcStatusEx rpcStatusEx, String message, PathDescription pathDescription) {
ServicePathRpcResultBuilder servicePathRpcResultBuilder =
RpcStatusEx.Pending, "Service compliant, submitting cancelResourceReserve Request ...", null);
PceSendingPceRPCs sendingPCE = new PceSendingPceRPCs();
sendingPCE.cancelResourceReserve();
- if (sendingPCE.getSuccess()) {
+ if (Boolean.TRUE.equals(sendingPCE.getSuccess())) {
message = "ResourceReserve cancelled !";
} else {
message = "Cancelling ResourceReserve failed !";
}
- LOG.info(message);
+ LOG.info("in PathComputationServiceImpl : {}",message);
sendNotifications(ServicePathNotificationTypes.CancelResourceReserve, input.getServiceName(),
RpcStatusEx.Successful, "cancel Resource Reserve successful!", null);
ConfigurationResponseCommonBuilder configurationResponseCommon =
}
output.setGnpyResponse(listResponse);
- if (!(sendingPCE.getSuccess()) || (path == null)) {
+ if (Boolean.FALSE.equals(sendingPCE.getSuccess()) || (path == null)) {
configurationResponseCommon.setAckFinalIndicator("Yes")
.setRequestId(input.getServiceHandlerHeader().getRequestId()).setResponseCode(responseCode)
.setResponseMessage(message);
feasible = true;
}
}
- GnpyResponse gnpypResp = new GnpyResponseBuilder().setPathDir(pathDir).setResponseType(respType)
- .setFeasibility(feasible).build();
- return gnpypResp;
+ return new GnpyResponseBuilder().setPathDir(pathDir).setResponseType(respType).setFeasibility(feasible).build();
}
}