ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils.
createComputeResourceDescription(hostName, hostDesc, null, null);
String computeResourceId = airavataClient.registerComputeResource(computeResourceDescription);
if (computeResourceId.isEmpty()) throw new AiravataClientException();
ResourceJobManager resourceJobManager = RegisterSampleApplicationsUtils.
createResourceJobManager(resourceJobManagerType, monitoringEndPoint, jobMangerBinPath, null);
if (jobManagerCommand != null) {
Map<JobManagerCommand, String> jobManagerCommandStringMap = new HashMap<JobManagerCommand, String>();
jobManagerCommandStringMap.put(JobManagerCommand.SUBMISSION, jobManagerCommand);
resourceJobManager.setJobManagerCommands(jobManagerCommandStringMap);
}
SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
sshJobSubmission.setResourceJobManager(resourceJobManager);
sshJobSubmission.setSecurityProtocol(securityProtocol);
sshJobSubmission.setSshPort(portNumber);
boolean sshAddStatus = airavataClient.addSSHJobSubmissionDetails(computeResourceId, 1, sshJobSubmission);
if (!sshAddStatus) throw new AiravataClientException();
SCPDataMovement scpDataMovement = new SCPDataMovement();
scpDataMovement.setSecurityProtocol(securityProtocol);
scpDataMovement.setSshPort(portNumber);
boolean scpAddStatus = airavataClient.addSCPDataMovementDetails(computeResourceId, 1, scpDataMovement);
if (!scpAddStatus) throw new AiravataClientException();
return computeResourceId;
}