use of org.apache.airavata.model.data.movement.LOCALDataMovement in project airavata by apache.
the class ComputeResourceRegister method registerComputeHost.
public ComputeResourceProperties registerComputeHost(String hostName, String hostDesc, ResourceJobManagerType resourceJobManagerType, String monitoringEndPoint, String jobMangerBinPath, SecurityProtocol securityProtocol, String jobManagerCommand) throws TException {
ComputeResourceDescription computeResourceDescription = createComputeResourceDescription(hostName, hostDesc, null, null);
ComputeResourceProperties computeResourceProperties = new ComputeResourceProperties();
String computeResourceId = airavata.registerComputeResource(authzToken, computeResourceDescription);
computeResourceProperties.setComputeResourceId(computeResourceId);
if (computeResourceId.isEmpty())
throw new AiravataClientException();
ResourceJobManager resourceJobManager = createResourceJobManager(resourceJobManagerType, monitoringEndPoint, jobMangerBinPath, null);
if (jobManagerCommand != null) {
Map<JobManagerCommand, String> jobManagerCommandStringMap = new HashMap<JobManagerCommand, String>();
jobManagerCommandStringMap.put(JobManagerCommand.SUBMISSION, jobManagerCommand);
resourceJobManager.setJobManagerCommands(jobManagerCommandStringMap);
}
LOCALSubmission localobSubmission = new LOCALSubmission();
localobSubmission.setResourceJobManager(resourceJobManager);
localobSubmission.setSecurityProtocol(securityProtocol);
String localJobSubmissionId = airavata.addLocalSubmissionDetails(authzToken, computeResourceId, 0, localobSubmission);
computeResourceProperties.setJobSubmissionId(localJobSubmissionId);
airavata.addLocalDataMovementDetails(authzToken, computeResourceId, DMType.COMPUTE_RESOURCE, 0, new LOCALDataMovement());
return computeResourceProperties;
}
use of org.apache.airavata.model.data.movement.LOCALDataMovement in project airavata by apache.
the class StorageResourceRegister method registerStorageResource.
public String registerStorageResource(String hostName, String hostDesc) throws TException {
StorageResourceDescription storageResourceDescription = createStorageResourceDescription(hostName, hostDesc);
String storageResourceId = airavata.registerStorageResource(authzToken, storageResourceDescription);
airavata.addLocalDataMovementDetails(authzToken, storageResourceId, DMType.STORAGE_RESOURCE, 0, new LOCALDataMovement());
return storageResourceId;
}
Aggregations