public NodeType ipAddress(String value) { getIpAddress().add(value); return this; }
public List<String> createIpAddressList() { PrismForJAXBUtil.createProperty(asPrismContainerValue(), F_IP_ADDRESS); return getIpAddress(); }
private List<PrismObject<NodeType>> getMatchingNodes(List<PrismObject<NodeType>> knownNodes, String remoteName, String remoteAddress, String operation) { List<PrismObject<NodeType>> matchingNodes = new ArrayList<>(); for (PrismObject<NodeType> node : knownNodes) { NodeType actualNode = node.asObjectable(); if (remoteName != null && remoteName.equalsIgnoreCase(actualNode.getHostname())) { LOGGER.trace("The node {} was recognized as a known node (remote host name {} matched). Attempting to execute the requested operation: {} ", actualNode.getName(), actualNode.getHostname(), operation); matchingNodes.add(node); continue; } if (actualNode.getIpAddress().contains(remoteAddress)) { LOGGER.trace("The node {} was recognized as a known node (remote host address {} matched). Attempting to execute the requested operation: {} ", actualNode.getName(), remoteAddress, operation); matchingNodes.add(node); continue; } } return matchingNodes; }
@NotNull private NodeType createLocalNodeObject(TaskManagerConfiguration configuration) { NodeType node = getPrismContext().createKnownObjectable(NodeType.class); String nodeId = configuration.getNodeId(); node.setNodeIdentifier(nodeId); node.setName(new PolyStringType(nodeId)); node.setHostname(getMyHostname()); node.getIpAddress().addAll(getMyIpAddresses()); node.setJmxPort(configuration.getJmxPort()); node.setClustered(configuration.isClustered()); node.setRunning(true); node.setLastCheckInTime(getCurrentTime()); node.setBuild(getBuildInformation()); node.setTaskExecutionLimitations( new TaskExecutionLimitationsType() .groupLimitation(new TaskGroupExecutionLimitationType().groupName("").limit(null)) .groupLimitation(new TaskGroupExecutionLimitationType().groupName(nodeId).limit(null)) .groupLimitation(new TaskGroupExecutionLimitationType().groupName(TaskConstants.LIMIT_FOR_OTHER_GROUPS).limit(0))); generateInternalNodeIdentifier(node); return node; }