/** * Return all parameters values related to the subscription. The attached project is validated against the current * user to check it is visible. Beware, these parameters must not be returned to user, since clear encrypted * parameters are present. * * @param id * The subscription identifier. * @return all associated parameters values. Key of returned map is the identifier of * {@link org.ligoj.app.model.Parameter} */ @org.springframework.transaction.annotation.Transactional(readOnly = true) public Map<String, String> getParameters(final int id) { checkVisible(id); return getParametersNoCheck(id); }
private boolean completeStatus(final VmExecutionStatus task) { if (task.isFailed()) { task.setFinishedRemote(true); } if (!task.isFinishedRemote() && task.isFinished()) { // Complete the status for the uncompleted tasks final int subscription = task.getLocked().getId(); final String node = task.getLocked().getNode().getId(); try { final Vm vm = getTool(node).getVmDetails(subscriptionResource.getParametersNoCheck(subscription)); task.setVm(vm); task.setFinishedRemote(!vm.isBusy()); return true; } catch (final Exception e) { // Unable to get the VM details log.info("Unable to retrive VM information of subscription {}, node {}", subscription, node); } } return false; }