/** * Get list of password file entries * @return List */ @Override protected List<String> getPasswords() { List list = new ArrayList<String>(); NodeUtils nUtils = new NodeUtils(habitat, logger); list.add("AS_ADMIN_SSHPASSWORD=" + nUtils.sshL.expandPasswordAlias(remotePassword)); if (sshkeypassphrase != null) { list.add("AS_ADMIN_SSHKEYPASSPHRASE=" + nUtils.sshL.expandPasswordAlias(sshkeypassphrase)); } return list; }
/** * Get list of password file entries * @return List */ @Override protected final List<String> getPasswords() { List list = new ArrayList<String>(); NodeUtils nodeUtils = new NodeUtils(habitat, logger); list.add("AS_ADMIN_SSHPASSWORD=" + nodeUtils.sshL.expandPasswordAlias(remotepassword)); if (sshkeypassphrase != null) { list.add("AS_ADMIN_SSHKEYPASSPHRASE=" + nodeUtils.sshL.expandPasswordAlias(sshkeypassphrase)); } return list; }
private void startInstance(AdminCommandContext ctx) { NodeUtils nodeUtils = new NodeUtils(habitat, logger); ArrayList<String> command = new ArrayList<String>(); String humanCommand = null;
private void deleteInstanceFilesystem(AdminCommandContext ctx) { NodeUtils nodeUtils = new NodeUtils(habitat, logger); ArrayList<String> command = new ArrayList<String>(); String humanCommand = null;
report.setActionExitCode(ActionReport.ExitCode.SUCCESS); NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
report.setActionExitCode(ActionReport.ExitCode.SUCCESS); NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
NodeUtils nu = new NodeUtils(habitat, logger); f = new File(System.getProperty("java.io.tmpdir"), "pass.tmp"); out = new BufferedWriter(new FileWriter(f));
private String killInstance(AdminCommandContext context) { String msg = initializeInstance(); if (msg != null) return msg; String nodeName = instance.getNodeRef(); Node node = nodes.getNode(nodeName); NodeUtils nodeUtils = new NodeUtils(habitat, logger); // asadmin command to run on instances node ArrayList<String> command = new ArrayList<String>(); command.add("stop-local-instance"); command.add("--kill"); command.add(instanceName); String humanCommand = makeCommandHuman(command); String firstErrorMessage = Strings.get("stop.local.instance.kill", instanceName, nodeName, humanCommand); if (logger.isLoggable(Level.FINE)) logger.fine("stop-instance: running " + humanCommand + " on " + nodeName); nodeUtils.runAdminCommandOnNode(node, command, context, firstErrorMessage, humanCommand, null); ActionReport killreport = context.getActionReport(); if (killreport.getActionExitCode() != ActionReport.ExitCode.SUCCESS) { return killreport.getMessage(); } return null; }
private String killInstance(AdminCommandContext context) { String msg = initializeInstance(); if (msg != null) return msg; String nodeName = instance.getNodeRef(); Node node = nodes.getNode(nodeName); NodeUtils nodeUtils = new NodeUtils(habitat, logger); // asadmin command to run on instances node ArrayList<String> command = new ArrayList<String>(); command.add("stop-local-instance"); command.add("--kill"); command.add(instanceName); String humanCommand = makeCommandHuman(command); String firstErrorMessage = Strings.get("stop.local.instance.kill", instanceName, nodeName, humanCommand); logger.fine("stop-instance: running " + humanCommand + " on " + nodeName); nodeUtils.runAdminCommandOnNode(node, command, context, firstErrorMessage, humanCommand, null); ActionReport killreport = context.getActionReport(); if (killreport.getActionExitCode() != ActionReport.ExitCode.SUCCESS) { return killreport.getMessage(); } return null; }
private void startInstance() { NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
public void deleteInstanceFilesystem(AdminCommandContext context) { NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
final Session session = workflowSession.getSession(); final WorkflowData data = workItem.getWorkflowData(); String path = null; String type = data.getPayloadType(); try { if (type.equals(TYPE_JCR_PATH) && data.getPayload() != null) { String payloadData = (String) data.getPayload(); if (session.itemExists(payloadData)) { path = payloadData; } } NodeUtils nodeUtils = new NodeUtils(); if (path != null) { final Node payloadNode = (Node) session.getItem(path); final Node node = nodeUtils.getMainAsset(payloadNode, ASSET_NODE_TYPE, ROOT_NODE_TYPE); ...
report.setActionExitCode(ActionReport.ExitCode.SUCCESS); NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
report.setActionExitCode(ActionReport.ExitCode.SUCCESS); NodeUtils nodeUtils = new NodeUtils(habitat, logger); Server dasServer = servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
NodeUtils nodeUtils = new NodeUtils(habitat, logger);
NodeUtils nodeUtils = new NodeUtils(habitat, logger); nodeUtils.validate(map); if (install) {
nodeUtils = new NodeUtils(habitat, logger); nodeUtils.validate(map); if (install) {
NodeUtils nodeUtils = new NodeUtils(habitat, logger);
NodeUtils nodeUtils = new NodeUtils(habitat, logger); nodeUtils.validate(validateMap); } catch (CommandValidationException e) {
NodeUtils nodeUtils = new NodeUtils(habitat, logger); nodeUtils.validate(validateMap); } catch (CommandValidationException e) {