Search in sources :

Example 11 with StorageResourceDescription

use of org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription in project airavata by apache.

the class StorageResourceRegister method createStorageResourceDescription.

public StorageResourceDescription createStorageResourceDescription(String hostName, String hostDesc) {
    StorageResourceDescription host = new StorageResourceDescription();
    host.setHostName(hostName);
    host.setStorageResourceDescription(hostDesc);
    host.setEnabled(true);
    return host;
}
Also used : StorageResourceDescription(org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription)

Example 12 with StorageResourceDescription

use of org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription 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;
}
Also used : StorageResourceDescription(org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription) LOCALDataMovement(org.apache.airavata.model.data.movement.LOCALDataMovement)

Aggregations

StorageResourceDescription (org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription)12 GFacException (org.apache.airavata.gfac.core.GFacException)4 ProcessContext (org.apache.airavata.gfac.core.context.ProcessContext)4 Session (com.jcraft.jsch.Session)3 URI (java.net.URI)3 URISyntaxException (java.net.URISyntaxException)3 AiravataException (org.apache.airavata.common.exception.AiravataException)3 CredentialStoreException (org.apache.airavata.credential.store.store.CredentialStoreException)3 AppCatalogException (org.apache.airavata.registry.cpi.AppCatalogException)3 TException (org.apache.thrift.TException)3 JSchException (com.jcraft.jsch.JSchException)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 ApplicationSettingsException (org.apache.airavata.common.exception.ApplicationSettingsException)2 AuthenticationInfo (org.apache.airavata.gfac.core.authentication.AuthenticationInfo)2 InputDataObjectType (org.apache.airavata.model.application.io.InputDataObjectType)2 OutputDataObjectType (org.apache.airavata.model.application.io.OutputDataObjectType)2 ErrorModel (org.apache.airavata.model.commons.ErrorModel)2 TaskStatus (org.apache.airavata.model.status.TaskStatus)2 DataStagingTaskModel (org.apache.airavata.model.task.DataStagingTaskModel)2