report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setMessage(msg);
return;
}
ParameterMap info = new ParameterMap();
if (uninstall) {
//store needed info for uninstall
SshConnector sshC = node.getSshConnector();
SshAuth sshAuth = sshC.getSshAuth();
if (sshAuth.getPassword() != null)
info.add(NodeUtils.PARAM_REMOTEPASSWORD, sshAuth.getPassword());
if (sshAuth.getKeyPassphrase() != null)
info.add(NodeUtils.PARAM_SSHKEYPASSPHRASE, sshAuth.getKeyPassphrase());
if (sshAuth.getKeyfile() != null)
info.add(NodeUtils.PARAM_SSHKEYFILE, sshAuth.getKeyfile());
info.add(NodeUtils.PARAM_INSTALLDIR, node.getInstallDir());
info.add(NodeUtils.PARAM_REMOTEPORT, sshC.getSshPort());
info.add(NodeUtils.PARAM_REMOTEUSER, sshAuth.getUserName());
info.add(NodeUtils.PARAM_NODEHOST, node.getNodeHost());
info.add(NodeUtils.PARAM_WINDOWS_DOMAIN, node.getWindowsDomain());
}
CommandInvocation ci = cr.getCommandInvocation("_delete-node", report);
ParameterMap map = new ParameterMap();
map.add("DEFAULT", name);
ci.parameters(map);
ci.execute();
//uninstall GlassFish after deleting the node
if (uninstall) {