airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [1/2] https://issues.apache.org/jira/browse/AIRAVATA-1228
Date Sun, 06 Jul 2014 01:31:13 GMT
Repository: airavata
Updated Branches:
  refs/heads/master b085e96fb -> 097d955e3


http://git-wip-us.apache.org/repos/asf/airavata/blob/097d955e/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index a371653..8330ab1 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -21,8 +21,44 @@
 
 package org.apache.aiaravata.application.catalog.data.util;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.aiaravata.application.catalog.data.resources.*;
+import org.apache.aiaravata.application.catalog.data.resources.AbstractResource;
+import org.apache.aiaravata.application.catalog.data.resources.AppDeploymentResource;
+import org.apache.aiaravata.application.catalog.data.resources.AppEnvironmentResource;
+import org.apache.aiaravata.application.catalog.data.resources.AppInterfaceResource;
+import org.apache.aiaravata.application.catalog.data.resources.AppModuleMappingResource;
+import org.apache.aiaravata.application.catalog.data.resources.AppModuleResource;
+import org.apache.aiaravata.application.catalog.data.resources.ApplicationInputResource;
+import org.apache.aiaravata.application.catalog.data.resources.ApplicationOutputResource;
+import org.apache.aiaravata.application.catalog.data.resources.BatchQueueResource;
+import org.apache.aiaravata.application.catalog.data.resources.ComputeHostPreferenceResource;
+import org.apache.aiaravata.application.catalog.data.resources.ComputeResourceFileSystemResource;
+import org.apache.aiaravata.application.catalog.data.resources.ComputeResourceResource;
+import org.apache.aiaravata.application.catalog.data.resources.DataMovementInterfaceResource;
+import org.apache.aiaravata.application.catalog.data.resources.DataMovementProtocolResource;
+import org.apache.aiaravata.application.catalog.data.resources.GatewayProfileResource;
+import org.apache.aiaravata.application.catalog.data.resources.GlobusGKEndpointResource;
+import org.apache.aiaravata.application.catalog.data.resources.GlobusJobSubmissionResource;
+import org.apache.aiaravata.application.catalog.data.resources.GridftpDataMovementResource;
+import org.apache.aiaravata.application.catalog.data.resources.GridftpEndpointResource;
+import org.apache.aiaravata.application.catalog.data.resources.HostAliasResource;
+import org.apache.aiaravata.application.catalog.data.resources.HostIPAddressResource;
+import org.apache.aiaravata.application.catalog.data.resources.JobManagerCommandResource;
+import org.apache.aiaravata.application.catalog.data.resources.JobSubmissionInterfaceResource;
+import org.apache.aiaravata.application.catalog.data.resources.JobSubmissionProtocolResource;
+import org.apache.aiaravata.application.catalog.data.resources.LibraryApendPathResource;
+import org.apache.aiaravata.application.catalog.data.resources.LibraryPrepandPathResource;
+import org.apache.aiaravata.application.catalog.data.resources.Resource;
+import org.apache.aiaravata.application.catalog.data.resources.ResourceJobManagerResource;
+import org.apache.aiaravata.application.catalog.data.resources.ScpDataMovementResource;
+import org.apache.aiaravata.application.catalog.data.resources.SshJobSubmissionResource;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
@@ -30,49 +66,75 @@ import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDes
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.computeresource.BatchQueue;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.FileSystems;
+import org.apache.airavata.model.appcatalog.computeresource.GlobusJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayProfile;
 
-import java.util.*;
-
 public class AppCatalogThriftConversion {
     public static ComputeResourceResource getComputeHostResource (ComputeResourceDescription description){
         ComputeResourceResource resource = new ComputeResourceResource();
         resource.setHostName(description.getHostName());
-        resource.setDescription(description.getComputeResourceDescription());
-        resource.setPreferredJobSubmissionProtocol(description.getPreferredJobSubmissionProtocol());
-        resource.setPreferredJobSubmissionProtocol(description.getResourceId());
+        resource.setResourceDescription(description.getResourceDescription());
+        resource.setResourceId(description.getComputeResourceId());
         return resource;
     }
 
     public static ComputeResourceDescription getComputeHostDescription (ComputeResourceResource resource) throws AppCatalogException{
         ComputeResourceDescription description = new ComputeResourceDescription();
-        description.setResourceId(resource.getResoureId());
+        description.setComputeResourceId(resource.getResourceId());
         description.setHostName(resource.getHostName());
-        description.setResourceDescription(resource.getDescription());
-        description.setPreferredJobSubmissionProtocol(resource.getPreferredJobSubmissionProtocol());
+        description.setResourceDescription(resource.getResourceDescription());
         HostAliasResource aliasResource = new HostAliasResource();
-        List<Resource> resources = aliasResource.get(AbstractResource.HostAliasConstants.RESOURCE_ID, resource.getResoureId());
+        List<Resource> resources = aliasResource.get(AbstractResource.HostAliasConstants.RESOURCE_ID, resource.getResourceId());
         if (resources != null && !resources.isEmpty()){
             description.setHostAliases(getHostAliases(resources));
         }
         HostIPAddressResource ipAddressResource = new HostIPAddressResource();
-        List<Resource> ipAddresses = ipAddressResource.get(AbstractResource.HostIPAddressConstants.RESOURCE_ID, resource.getResoureId());
+        List<Resource> ipAddresses = ipAddressResource.get(AbstractResource.HostIPAddressConstants.RESOURCE_ID, resource.getResourceId());
         if (ipAddresses != null && !ipAddresses.isEmpty()){
             description.setIpAddresses(getIpAddresses(ipAddresses));
         }
 
-        JobSubmissionProtocolResource submissionProtocolResource = new JobSubmissionProtocolResource();
-        List<Resource> submissionProtocols = submissionProtocolResource.get(AbstractResource.JobSubmissionProtocolConstants.RESOURCE_ID, resource.getResoureId());
-        if (submissionProtocols != null && !submissionProtocols.isEmpty()){
-            description.setJobSubmissionProtocols(getJobSubmissionProtocolList(submissionProtocols));
-        }
-
-        DataMovementProtocolResource movementProtocolResource = new DataMovementProtocolResource();
-        List<Resource> dataMoveProtocols = movementProtocolResource.get(AbstractResource.DataMoveProtocolConstants.RESOURCE_ID, resource.getResoureId());
-        if (dataMoveProtocols != null && !dataMoveProtocols.isEmpty()){
-            description.setDataMovementProtocols(getDataMoveProtocolList(dataMoveProtocols));
+        BatchQueueResource bqResource = new BatchQueueResource();
+        List<Resource> batchQueues = bqResource.get(AbstractResource.BatchQueueConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
+        if (batchQueues != null && !batchQueues.isEmpty()){
+            description.setBatchQueues(getBatchQueues(batchQueues));
+        }
+        
+        ComputeResourceFileSystemResource fsResource = new ComputeResourceFileSystemResource();
+        List<Resource> fsList = fsResource.get(AbstractResource.ComputeResourceFileSystemConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
+        description.setFileSystems(new HashMap<FileSystems,String>());
+        if (fsList != null && !fsList.isEmpty()){
+        	for (Resource r : fsList) {
+        		ComputeResourceFileSystemResource rr=(ComputeResourceFileSystemResource)r;
+        		description.getFileSystems().put(FileSystems.valueOf(rr.getFileSystem()), rr.getPath());
+			}
+        }
+        
+        JobSubmissionInterfaceResource jsiResource = new JobSubmissionInterfaceResource();
+        List<Resource> hsiList = jsiResource.get(AbstractResource.JobSubmissionInterfaceConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
+        if (hsiList != null && !hsiList.isEmpty()){
+            description.setJobSubmissionInterfaces(getJobSubmissionInterfaces(batchQueues));
+        }
+        
+        DataMovementInterfaceResource dmiResource = new DataMovementInterfaceResource();
+        List<Resource> dmiList = dmiResource.get(AbstractResource.DataMovementInterfaceConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
+        if (dmiList != null && !dmiList.isEmpty()){
+            description.setDataMovemenetInterfaces(getDataMovementInterfaces(batchQueues));
         }
         return description;
     }
@@ -100,7 +162,85 @@ public class AppCatalogThriftConversion {
         }
         return hostIpAddresses;
     }
-
+    
+    public static List<BatchQueue> getBatchQueues (List<Resource> resources){
+    	List<BatchQueue> batchQueues = new ArrayList<BatchQueue>();
+        for (Resource resource : resources){
+        	batchQueues.add(getBatchQueue((BatchQueueResource)resource));
+        }
+        return batchQueues;
+    }
+    
+    public static List<DataMovementInterface> getDataMovementInterfaces(List<Resource> resources){
+    	List<DataMovementInterface> dataMovementInterfaces = new ArrayList<DataMovementInterface>();
+        for (Resource resource : resources){
+        	dataMovementInterfaces.add(getDataMovementInterface((DataMovementInterfaceResource)resource));
+        }
+        return dataMovementInterfaces;
+    }
+    
+    public static DataMovementInterface getDataMovementInterface(DataMovementInterfaceResource resource){
+    	DataMovementInterface dmi = new DataMovementInterface();
+    	dmi.setDataMovementInterfaceId(resource.getDataMovementInterfaceId());
+    	dmi.setDataMovementProtocol(DataMovementProtocol.valueOf(resource.getDataMovementProtocol()));
+    	dmi.setPriorityOrder(resource.getPriorityOrder());
+        return dmi;
+    }
+    
+    public static DataMovementInterfaceResource getDataMovementInterface(DataMovementInterface resource){
+    	DataMovementInterfaceResource dmi = new DataMovementInterfaceResource();
+    	dmi.setDataMovementInterfaceId(resource.getDataMovementInterfaceId());
+    	dmi.setDataMovementProtocol(resource.getDataMovementProtocol().toString());
+    	dmi.setPriorityOrder(resource.getPriorityOrder());
+        return dmi;
+    }
+    
+    public static List<JobSubmissionInterface> getJobSubmissionInterfaces(List<Resource> resources){
+    	List<JobSubmissionInterface> jobSubmissionInterfaces = new ArrayList<JobSubmissionInterface>();
+        for (Resource resource : resources){
+        	jobSubmissionInterfaces.add(getJobSubmissionInterface((JobSubmissionInterfaceResource)resource));
+        }
+        return jobSubmissionInterfaces;
+    }
+    
+    public static JobSubmissionInterface getJobSubmissionInterface(JobSubmissionInterfaceResource resource){
+    	JobSubmissionInterface jsi = new JobSubmissionInterface();
+    	jsi.setJobSubmissionInterfaceId(resource.getJobSubmissionInterfaceId());
+    	jsi.setJobSubmissionProtocol(JobSubmissionProtocol.valueOf(resource.getJobSubmissionProtocol()));
+    	jsi.setPriorityOrder(resource.getPriorityOrder());
+        return jsi;
+    }
+    
+    public static JobSubmissionInterfaceResource getJobSubmissionInterface(JobSubmissionInterface resource){
+    	JobSubmissionInterfaceResource jsi = new JobSubmissionInterfaceResource();
+    	jsi.setJobSubmissionInterfaceId(resource.getJobSubmissionInterfaceId());
+    	jsi.setJobSubmissionProtocol(resource.getJobSubmissionProtocol().toString());
+    	jsi.setPriorityOrder(resource.getPriorityOrder());
+        return jsi;
+    }
+    
+    public static BatchQueue getBatchQueue(BatchQueueResource resource){
+    	BatchQueue batchQueue = new BatchQueue();
+    	batchQueue.setMaxJobsInQueue(resource.getMaxJobInQueue());
+    	batchQueue.setMaxNodes(resource.getMaxNodes());
+    	batchQueue.setMaxProcessors(resource.getMaxProcessors());
+    	batchQueue.setMaxRunTime(resource.getMaxRuntime());
+    	batchQueue.setQueueDescription(resource.getQueueDescription());
+    	batchQueue.setQueueName(resource.getQueueName());
+        return batchQueue;
+    }
+
+    public static BatchQueueResource getBatchQueue(BatchQueue resource){
+    	BatchQueueResource batchQueue = new BatchQueueResource();
+    	batchQueue.setMaxJobInQueue(resource.getMaxJobsInQueue());
+    	batchQueue.setMaxNodes(resource.getMaxNodes());
+    	batchQueue.setMaxProcessors(resource.getMaxProcessors());
+    	batchQueue.setMaxRuntime(resource.getMaxRunTime());
+    	batchQueue.setQueueDescription(resource.getQueueDescription());
+    	batchQueue.setQueueName(resource.getQueueName());
+        return batchQueue;
+    }
+    
     public static Map<String, JobSubmissionProtocol> getJobSubmissionProtocolList(List<Resource> resources){
        Map<String, JobSubmissionProtocol> protocols = new HashMap<String, JobSubmissionProtocol>();
         for (Resource resource : resources){
@@ -119,89 +259,108 @@ public class AppCatalogThriftConversion {
         return protocols;
     }
 
-
-    public static GSISSHSubmissionResource getGSISSHSubmission (GSISSHJobSubmission submission){
-        GSISSHSubmissionResource resource = new GSISSHSubmissionResource();
-        resource.setSubmissionID(submission.getJobSubmissionDataID());
-        resource.setMonitorMode(submission.getMonitorMode());
-        resource.setInstalledPath(submission.getInstalledPath());
-        resource.setResourceJobManager(submission.getResourceJobManager().toString());
+    public static SshJobSubmissionResource getSSHJobSubmission (SSHJobSubmission submission){
+    	SshJobSubmissionResource resource = new SshJobSubmissionResource();
+        resource.setAlternativeSshHostname(submission.getAlternativeSSHHostName());
+        resource.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());
+        ResourceJobManagerResource resourceJobManager = getResourceJobManager(submission.getResourceJobManager());
+        resourceJobManager.setResourceJobManagerId(submission.getJobSubmissionInterfaceId());
+        resource.setResourceJobManagerId(resourceJobManager.getResourceJobManagerId());
+        resource.setResourceJobManagerResource(resourceJobManager);
+        resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
         resource.setSshPort(submission.getSshPort());
         return resource;
     }
 
-    public static GSISSHJobSubmission getGSISSHSubmissionDescription (GSISSHSubmissionResource submission) throws AppCatalogException {
-        GSISSHJobSubmission gsisshJobSubmission = new GSISSHJobSubmission();
-        gsisshJobSubmission.setJobSubmissionDataID(submission.getSubmissionID());
-        gsisshJobSubmission.setResourceJobManager(ResourceJobManager.valueOf(submission.getResourceJobManager()));
-        gsisshJobSubmission.setSshPort(submission.getSshPort());
-        gsisshJobSubmission.setInstalledPath(submission.getInstalledPath());
-        gsisshJobSubmission.setMonitorMode(submission.getMonitorMode());
-
-        GSISSHExportResource exportResource = new GSISSHExportResource();
-        List<Resource> exports = exportResource.get(AbstractResource.GSISSHExportConstants.SUBMISSION_ID, submission.getSubmissionID());
-        if (exports != null && !exports.isEmpty()){
-            gsisshJobSubmission.setExports(getGSISSHExports(exports));
-        }
-
-        GSISSHPostJobCommandResource postJobCommandResource = new GSISSHPostJobCommandResource();
-        List<Resource> resources = postJobCommandResource.get(AbstractResource.GSISSHPostJobCommandConstants.SUBMISSION_ID, submission.getSubmissionID());
-        if (resources != null && !resources.isEmpty()){
-            gsisshJobSubmission.setPostJobCommands(getGSISSHPostJobCommands(resources));
-        }
-
-        GSISSHPreJobCommandResource preJobCommandResource = new GSISSHPreJobCommandResource();
-        List<Resource> preJobCommands = preJobCommandResource.get(AbstractResource.GSISSHPreJobCommandConstants.SUBMISSION_ID, submission.getSubmissionID());
-        if (preJobCommands != null && !preJobCommands.isEmpty()){
-            gsisshJobSubmission.setPreJobCommands(getGSISSHPreJobCommands(preJobCommands));
-        }
-
-        return gsisshJobSubmission;
-    }
-
-    public static GlobusJobSubmission getGlobusJobSubmissionDescription (GlobusJobSubmissionResource submission) throws AppCatalogException {
-        GlobusJobSubmission globusJobSubmission = new GlobusJobSubmission();
-        globusJobSubmission.setJobSubmissionDataID(submission.getSubmissionID());
-        globusJobSubmission.setResourceJobManager(ResourceJobManager.valueOf(submission.getResourceJobManager()));
-        globusJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
-
-        GlobusGKEndpointResource endpointResource = new GlobusGKEndpointResource();
-        List<Resource> endpoints = endpointResource.get(AbstractResource.GlobusEPConstants.SUBMISSION_ID, submission.getSubmissionID());
-        if (endpoints != null && !endpoints.isEmpty()){
-            globusJobSubmission.setGlobusGateKeeperEndPoint(getGlobusGateKeeperEndPointList(endpoints));
-        }
-
-        return globusJobSubmission;
-    }
-
+    public static ResourceJobManagerResource getResourceJobManager(ResourceJobManager manager){
+    	ResourceJobManagerResource r = new ResourceJobManagerResource();
+    	r.setJobManagerBinPath(manager.getJobManagerBinPath());
+    	r.setPushMonitoringEndpoint(manager.getPushMonitoringEndpoint());
+    	r.setResourceJobManagerType(manager.getResourceJobManagerType().toString());
+    	return r;
+    }
+    
+    public static ResourceJobManager getResourceJobManager(ResourceJobManagerResource manager) throws AppCatalogException{
+    	ResourceJobManager r = new ResourceJobManager();
+    	r.setJobManagerBinPath(manager.getJobManagerBinPath());
+    	r.setPushMonitoringEndpoint(manager.getPushMonitoringEndpoint());
+    	r.setResourceJobManagerType(ResourceJobManagerType.valueOf(manager.getResourceJobManagerType()));
+    	r.setJobManagerCommands(new HashMap<JobManagerCommand, String>());
+    	JobManagerCommandResource jmcr=new JobManagerCommandResource();
+        List<Resource> jmcrList = jmcr.get(AbstractResource.JobManagerCommandConstants.RESOURCE_JOB_MANAGER_ID, manager.getResourceJobManagerId());
+        if (jmcrList != null && !jmcrList.isEmpty()){
+        	for (Resource rrr : jmcrList) {
+        		JobManagerCommandResource rr=(JobManagerCommandResource)rrr;
+        		r.getJobManagerCommands().put(JobManagerCommand.valueOf(rr.getCommandType()), rr.getCommand());
+			}
+        }
+    	return r;
+    }
+    
+    
     public static SSHJobSubmission getSSHJobSubmissionDescription (SshJobSubmissionResource submission) throws AppCatalogException {
-        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-        sshJobSubmission.setJobSubmissionDataID(submission.getSubmissionID());
-        sshJobSubmission.setResourceJobManager(ResourceJobManager.valueOf(submission.getResourceJobManager()));
-        sshJobSubmission.setSshPort(submission.getSshPort());
+    	SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+    	sshJobSubmission.setAlternativeSSHHostName(submission.getAlternativeSshHostname());
+    	sshJobSubmission.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());
+    	sshJobSubmission.setResourceJobManager(getResourceJobManager(submission.getResourceJobManagerResource()));
+    	sshJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
+    	sshJobSubmission.setSshPort(submission.getSshPort());
         return sshJobSubmission;
     }
 
+//    public static GlobusJobSubmission getGlobusJobSubmissionDescription (GlobusJobSubmissionResource submission) throws AppCatalogException {
+//        GlobusJobSubmission globusJobSubmission = new GlobusJobSubmission();
+//        globusJobSubmission.setJobSubmissionInterfaceId(submission.getSubmissionID());
+//        globusJobSubmission.setResourceJobManager(ResourceJobManager.valueOf(submission.getResourceJobManager()));
+//        globusJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
+//
+//        GlobusGKEndpointResource endpointResource = new GlobusGKEndpointResource();
+//        List<Resource> endpoints = endpointResource.get(AbstractResource.GlobusEPConstants.SUBMISSION_ID, submission.getSubmissionID());
+//        if (endpoints != null && !endpoints.isEmpty()){
+//            globusJobSubmission.setGlobusGateKeeperEndPoint(getGlobusGateKeeperEndPointList(endpoints));
+//        }
+//
+//        return globusJobSubmission;
+//    }
+
+
     public static SCPDataMovement getSCPDataMovementDescription (ScpDataMovementResource dataMovementResource) throws AppCatalogException {
         SCPDataMovement dataMovement = new SCPDataMovement();
-        dataMovement.setDataMovementDataID(dataMovementResource.getDataMoveID());
+        dataMovement.setDataMovementInterfaceId(dataMovementResource.getDataMovementInterfaceId());
+        dataMovement.setAlternativeSCPHostName(dataMovementResource.getAlternativeScpHostname());
         dataMovement.setSecurityProtocol(SecurityProtocol.valueOf(dataMovementResource.getSecurityProtocol()));
         dataMovement.setSshPort(dataMovementResource.getSshPort());
         return dataMovement;
     }
+    
+    public static ScpDataMovementResource getSCPDataMovementDescription (SCPDataMovement dataMovementResource) throws AppCatalogException {
+    	ScpDataMovementResource dataMovement = new ScpDataMovementResource();
+        dataMovement.setDataMovementInterfaceId(dataMovementResource.getDataMovementInterfaceId());
+        dataMovement.setAlternativeScpHostname(dataMovementResource.getAlternativeSCPHostName());
+        dataMovement.setSecurityProtocol(dataMovementResource.getSecurityProtocol().toString());
+        dataMovement.setSshPort(dataMovementResource.getSshPort());
+        return dataMovement;
+    }
 
     public static GridFTPDataMovement getGridFTPDataMovementDescription (GridftpDataMovementResource dataMovementResource) throws AppCatalogException {
         GridFTPDataMovement dataMovement = new GridFTPDataMovement();
-        dataMovement.setDataMovementDataID(dataMovementResource.getDataMoveID());
+        dataMovement.setDataMovementInterfaceId(dataMovementResource.getDataMovementInterfaceId());
         dataMovement.setSecurityProtocol(SecurityProtocol.valueOf(dataMovementResource.getSecurityProtocol()));
         GridftpEndpointResource endpointResource = new GridftpEndpointResource();
-        List<Resource> endpoints = endpointResource.get(AbstractResource.GridFTPDMEPConstants.DATA_MOVE_ID, dataMovementResource.getDataMoveID());
+        List<Resource> endpoints = endpointResource.get(AbstractResource.GridftpEndpointConstants.DATA_MOVEMENT_INTERFACE_ID, dataMovementResource.getDataMovementInterfaceId());
         if (endpoints != null && !endpoints.isEmpty()){
-            dataMovement.setGridFTPEndPoint(getGridFTPDMEPList(endpoints));
+            dataMovement.setGridFTPEndPoints(getGridFTPDMEPList(endpoints));
         }
         return dataMovement;
     }
 
+    public static GridftpDataMovementResource getGridFTPDataMovementDescription (GridFTPDataMovement dataMovementResource) throws AppCatalogException {
+    	GridftpDataMovementResource dataMovement = new GridftpDataMovementResource();
+        dataMovement.setDataMovementInterfaceId(dataMovementResource.getDataMovementInterfaceId());
+        dataMovement.setSecurityProtocol(dataMovementResource.getSecurityProtocol().toString());
+        return dataMovement;
+    }
+    
     public static List<String> getGridFTPDMEPList (List<Resource> endpoints){
         List<String> list = new ArrayList<String>();
         for (Resource resource : endpoints){
@@ -217,85 +376,78 @@ public class AppCatalogThriftConversion {
         }
         return list;
     }
-
-    public static List<GSISSHJobSubmission> getGSISSHSubmissionList (List<Resource> resources) throws AppCatalogException {
-        List<GSISSHJobSubmission> list = new ArrayList<GSISSHJobSubmission>();
-        for (Resource resource : resources){
-            list.add(getGSISSHSubmissionDescription((GSISSHSubmissionResource) resource));
-        }
-        return list;
-    }
-
-    public static List<GlobusJobSubmission> getGlobusSubmissionList (List<Resource> resources) throws AppCatalogException {
-        List<GlobusJobSubmission> list = new ArrayList<GlobusJobSubmission>();
-        for (Resource resource : resources){
-            list.add(getGlobusJobSubmissionDescription((GlobusJobSubmissionResource) resource));
-        }
-        return list;
-    }
-
-    public static List<SSHJobSubmission> getSSHSubmissionList (List<Resource> resources) throws AppCatalogException {
-        List<SSHJobSubmission> list = new ArrayList<SSHJobSubmission>();
-        for (Resource resource : resources){
-            list.add(getSSHJobSubmissionDescription((SshJobSubmissionResource) resource));
-        }
-        return list;
-    }
-
-    public static List<GridFTPDataMovement> getGridFTPDataMovementList (List<Resource> resources) throws AppCatalogException {
-        List<GridFTPDataMovement> list = new ArrayList<GridFTPDataMovement>();
-        for (Resource resource : resources){
-            list.add(getGridFTPDataMovementDescription((GridftpDataMovementResource) resource));
-        }
-        return list;
-    }
-
-    public static List<SCPDataMovement> getSCPDataMovementList (List<Resource> resources) throws AppCatalogException {
-        List<SCPDataMovement> list = new ArrayList<SCPDataMovement>();
-        for (Resource resource : resources){
-            list.add(getSCPDataMovementDescription((ScpDataMovementResource) resource));
-        }
-        return list;
-    }
-
-    public static Set<String> getGSISSHExports (List<Resource> gsisshExportResources){
-        Set<String> exports = new HashSet<String>();
-        for (Resource resource : gsisshExportResources){
-            exports.add(((GSISSHExportResource) resource).getExport());
-        }
-        return exports;
-    }
-
-    public static List<String> getGSISSHPreJobCommands (List<Resource> gsisshPreJobCommandResources){
-        List<String> list = new ArrayList<String>();
-        for (Resource resource : gsisshPreJobCommandResources){
-            list.add(((GSISSHPreJobCommandResource) resource).getCommand());
-        }
-        return list;
-    }
-
-    public static List<String> getGSISSHPostJobCommands (List<Resource> gsisshPostJobCommandResources){
-        List<String> list = new ArrayList<String>();
-        for (Resource resource : gsisshPostJobCommandResources){
-            list.add(((GSISSHPostJobCommandResource) resource).getCommand());
-        }
-        return list;
-    }
-
-    public static GlobusJobSubmissionResource getGlobusJobSubmission (GlobusJobSubmission submission){
-        GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
-        resource.setSubmissionID(submission.getJobSubmissionDataID());
-        resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
-        resource.setResourceJobManager(submission.getResourceJobManager().toString());
-        return resource;
-    }
-
-    public static SshJobSubmissionResource getSSHJobSubmission (SSHJobSubmission submission){
-        SshJobSubmissionResource resource = new SshJobSubmissionResource();
-        resource.setSubmissionID(submission.getJobSubmissionDataID());
-        resource.setResourceJobManager(submission.getResourceJobManager().toString());
-        return resource;
-    }
+//
+//    public static List<GSISSHJobSubmission> getGSISSHSubmissionList (List<Resource> resources) throws AppCatalogException {
+//        List<GSISSHJobSubmission> list = new ArrayList<GSISSHJobSubmission>();
+//        for (Resource resource : resources){
+//            list.add(getGSISSHSubmissionDescription((GSISSHSubmissionResource) resource));
+//        }
+//        return list;
+//    }
+//
+//    public static List<GlobusJobSubmission> getGlobusSubmissionList (List<Resource> resources) throws AppCatalogException {
+//        List<GlobusJobSubmission> list = new ArrayList<GlobusJobSubmission>();
+//        for (Resource resource : resources){
+//            list.add(getGlobusJobSubmissionDescription((GlobusJobSubmissionResource) resource));
+//        }
+//        return list;
+//    }
+//
+//    public static List<SSHJobSubmission> getSSHSubmissionList (List<Resource> resources) throws AppCatalogException {
+//        List<SSHJobSubmission> list = new ArrayList<SSHJobSubmission>();
+//        for (Resource resource : resources){
+//            list.add(getSSHJobSubmissionDescription((SshJobSubmissionResource) resource));
+//        }
+//        return list;
+//    }
+//
+//    public static List<GridFTPDataMovement> getGridFTPDataMovementList (List<Resource> resources) throws AppCatalogException {
+//        List<GridFTPDataMovement> list = new ArrayList<GridFTPDataMovement>();
+//        for (Resource resource : resources){
+//            list.add(getGridFTPDataMovementDescription((GridftpDataMovementResource) resource));
+//        }
+//        return list;
+//    }
+//
+//    public static List<SCPDataMovement> getSCPDataMovementList (List<Resource> resources) throws AppCatalogException {
+//        List<SCPDataMovement> list = new ArrayList<SCPDataMovement>();
+//        for (Resource resource : resources){
+//            list.add(getSCPDataMovementDescription((ScpDataMovementResource) resource));
+//        }
+//        return list;
+//    }
+//
+//    public static Set<String> getGSISSHExports (List<Resource> gsisshExportResources){
+//        Set<String> exports = new HashSet<String>();
+//        for (Resource resource : gsisshExportResources){
+//            exports.add(((GSISSHExportResource) resource).getExport());
+//        }
+//        return exports;
+//    }
+//
+//    public static List<String> getGSISSHPreJobCommands (List<Resource> gsisshPreJobCommandResources){
+//        List<String> list = new ArrayList<String>();
+//        for (Resource resource : gsisshPreJobCommandResources){
+//            list.add(((GSISSHPreJobCommandResource) resource).getCommand());
+//        }
+//        return list;
+//    }
+//
+//    public static List<String> getGSISSHPostJobCommands (List<Resource> gsisshPostJobCommandResources){
+//        List<String> list = new ArrayList<String>();
+//        for (Resource resource : gsisshPostJobCommandResources){
+//            list.add(((GSISSHPostJobCommandResource) resource).getCommand());
+//        }
+//        return list;
+//    }
+//
+//    public static GlobusJobSubmissionResource getGlobusJobSubmission (GlobusJobSubmission submission){
+//        GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
+//        resource.setSubmissionID(submission.getJobSubmissionDataID());
+//        resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
+//        resource.setResourceJobManager(submission.getResourceJobManager().toString());
+//        return resource;
+//    }
 
     public static ApplicationModule getApplicationModuleDesc (AppModuleResource resource){
         ApplicationModule module = new ApplicationModule();
@@ -397,7 +549,8 @@ public class AppCatalogThriftConversion {
         description.setComputeHostId(resource.getHostId());
         description.setExecutablePath(resource.getExecutablePath());
         description.setAppDeploymentDescription(resource.getAppDes());
-        description.setModuleLoadCmd(resource.getEnvModuleLoadCMD());
+        //TODO ModuleLoadCmds is a list now. need to create a table for this and the jpa layer
+//        description.setModuleLoadCmds(resource.getEnvModuleLoadCMD());
 
         LibraryPrepandPathResource prepandPathResource = new LibraryPrepandPathResource();
         List<Resource> libPrepandPaths = prepandPathResource.get(AbstractResource.LibraryPrepandPathConstants.DEPLOYMENT_ID, resource.getDeploymentId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/097d955e/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/AppDeploymentTest.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/AppDeploymentTest.java b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/AppDeploymentTest.java
index 68ec31c..7efeed7 100644
--- a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/AppDeploymentTest.java
+++ b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/AppDeploymentTest.java
@@ -83,7 +83,8 @@ public class AppDeploymentTest {
         description.setComputeHostId(hostId);
         description.setExecutablePath("/home/a/b/c");
         description.setAppDeploymentDescription("test app deployment");
-        description.setModuleLoadCmd("module load");
+        //TODO
+//        description.setModuleLoadCmd("module load");?
         List<SetEnvPaths> libPrepandPaths = new ArrayList<SetEnvPaths>();
         libPrepandPaths.add(createSetEnvPath("name1", "val1"));
         libPrepandPaths.add(createSetEnvPath("name2", "val2"));

http://git-wip-us.apache.org/repos/asf/airavata/blob/097d955e/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
index 64c61e6..4108738 100644
--- a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
+++ b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
@@ -61,190 +61,190 @@ public class ComputeResourceTest {
 
     }
 
-    @Test
-    public void testAddComputeResource (){
-        try {
-            ComputeResource computeResource = appcatalog.getComputeResource();
-            ComputeResourceDescription description = new ComputeResourceDescription();
-
-            description.setHostName("localhost");
-            description.setPreferredJobSubmissionProtocol("SSH");
-            description.setResourceDescription("test compute resource");
-            Set<String> ipdaresses = new HashSet<String>();
-            ipdaresses.add("222.33.43.444");
-            ipdaresses.add("23.344.44.454");
-            description.setIpAddresses(ipdaresses);
-            Set<String> aliases = new HashSet<String>();
-            aliases.add("test.alias1");
-            aliases.add("test.alias2");
-            description.setHostAliases(aliases);
-            String sshsubmissionId = addSSHJobSubmission();
-            System.out.println("**** SSH Submission id ****** :" + sshsubmissionId);
-            String gsiSSHsubmissionId = addGSISSHJobSubmission();
-            System.out.println("**** GSISSH Submission id ****** :" + gsiSSHsubmissionId);
-            String globusSubmissionId = addGlobusJobSubmission();
-            System.out.println("**** Globus Submission id ****** :" + globusSubmissionId);
-            Map<String, JobSubmissionProtocol> jobProtools = new HashMap<String, JobSubmissionProtocol>();
-            jobProtools.put(sshsubmissionId, JobSubmissionProtocol.SSH);
-            jobProtools.put(gsiSSHsubmissionId, JobSubmissionProtocol.GSISSH);
-            jobProtools.put(globusSubmissionId, JobSubmissionProtocol.GRAM);
-            description.setJobSubmissionProtocols(jobProtools);
-
-            String scpDataMoveId = addSCPDataMovement();
-            System.out.println("**** SCP DataMoveId****** :" + scpDataMoveId);
-            String gridFTPDataMoveId = addGridFTPDataMovement();
-            System.out.println("**** grid FTP DataMoveId****** :" + gridFTPDataMoveId);
-            Map<String, DataMovementProtocol> dataProtools = new HashMap<String, DataMovementProtocol>();
-            dataProtools.put(scpDataMoveId, DataMovementProtocol.SCP);
-            dataProtools.put(gridFTPDataMoveId, DataMovementProtocol.GridFTP);
-            description.setDataMovementProtocols(dataProtools);
-
-            String resourceId = computeResource.addComputeResource(description);
-            System.out.println("**********Resource id ************* : " +  resourceId);
-            ComputeResourceDescription host = null;
-            if (computeResource.isComputeResourceExists(resourceId)){
-                host = computeResource.getComputeResource(resourceId);
-                System.out.println("**********Resource name ************* : " +  host.getHostName());
-            }
-
-            SSHJobSubmission sshJobSubmission = computeResource.getSSHJobSubmission(sshsubmissionId);
-            System.out.println("**********SSH Submission resource job manager ************* : " +  sshJobSubmission.getResourceJobManager().toString());
-
-            GSISSHJobSubmission gsisshJobSubmission = computeResource.getGSISSHJobSubmission(gsiSSHsubmissionId);
-            System.out.println("**********GSISSH Submission resource job manager ************* : " +  gsisshJobSubmission.getResourceJobManager().toString());
-
-            GlobusJobSubmission globusJobSubmission = computeResource.getGlobusJobSubmission(globusSubmissionId);
-            System.out.println("**********Globus Submission resource job manager ************* : " + globusJobSubmission.getResourceJobManager().toString());
-
-            SCPDataMovement scpDataMovement = computeResource.getSCPDataMovement(scpDataMoveId);
-            System.out.println("**********SCP Data Move Security protocol ************* : " + scpDataMovement.getSecurityProtocol().toString());
-
-            GridFTPDataMovement gridFTPDataMovement = computeResource.getGridFTPDataMovement(gridFTPDataMoveId);
-            System.out.println("**********GRID FTP Data Move Security protocol ************* : " + gridFTPDataMovement.getSecurityProtocol().toString());
-
-            description.setHostName("localhost2");
-            computeResource.updateComputeResource(resourceId, description);
-            if (computeResource.isComputeResourceExists(resourceId)){
-                host = computeResource.getComputeResource(resourceId);
-                System.out.println("**********Updated Resource name ************* : " +  host.getHostName());
-            }
-
-            Map<String, String> cfilters = new HashMap<String, String>();
-            cfilters.put(AbstractResource.ComputeResourceConstants.HOST_NAME, "localhost2");
-            List<ComputeResourceDescription> computeResourceList = computeResource.getComputeResourceList(cfilters);
-            System.out.println("**********Size of compute resources ************* : " +  computeResourceList.size());
-
-            Map<String, String> globusfilters = new HashMap<String, String>();
-            globusfilters.put(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
-            List<GlobusJobSubmission> gList = computeResource.getGlobusJobSubmissionList(globusfilters);
-            System.out.println("**********Size of globus jobs ************* : " +  gList.size());
-
-            Map<String, String> sshfilters = new HashMap<String, String>();
-            sshfilters.put(AbstractResource.SSHSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
-            List<SSHJobSubmission> sshList = computeResource.getSSHJobSubmissionList(sshfilters);
-            System.out.println("**********Size of SSH jobs ************* : " + sshList.size());
-
-            Map<String, String> gsishfilters = new HashMap<String, String>();
-            gsishfilters.put(AbstractResource.GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
-            List<GSISSHJobSubmission> gsisshList = computeResource.getGSISSHJobSubmissionList(gsishfilters);
-            System.out.println("**********Size of GSISSH jobs ************* : " + gsisshList.size());
-
-            Map<String, String> scpfilters = new HashMap<String, String>();
-            scpfilters.put(AbstractResource.SCPDataMovementConstants.SECURITY_PROTOCOL, SecurityProtocol.SSH_KEYS.toString());
-            List<SCPDataMovement> scpDataMovementList = computeResource.getSCPDataMovementList(scpfilters);
-            System.out.println("**********Size of SCP DM list ************* : " + scpDataMovementList.size());
-
-            Map<String, String> ftpfilters = new HashMap<String, String>();
-            ftpfilters.put(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL, SecurityProtocol.SSH_KEYS.toString());
-            List<GridFTPDataMovement> ftpDataMovementList = computeResource.getGridFTPDataMovementList(ftpfilters);
-            System.out.println("**********Size of FTP DM list ************* : " + ftpDataMovementList.size());
-
-            assertTrue("Compute resource save successfully", host != null);
-        } catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public String addSSHJobSubmission (){
-        try {
-            SSHJobSubmission jobSubmission = new SSHJobSubmission();
-            jobSubmission.setSshPort(22);
-            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
-            return appcatalog.getComputeResource().addSSHJobSubmission(jobSubmission);
-        } catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public String addGSISSHJobSubmission (){
-        try {
-            GSISSHJobSubmission jobSubmission = new GSISSHJobSubmission();
-            jobSubmission.setSshPort(22);
-            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
-            Set<String> exports = new HashSet<String>();
-            exports.add("export1");
-            exports.add("export2");
-            jobSubmission.setExports(exports);
-            jobSubmission.setMonitorMode("testMonitormode");
-            List<String> preJobCommands = new ArrayList<String>();
-            preJobCommands.add("prejobcommand1");
-            preJobCommands.add("prejobcommand2");
-            jobSubmission.setPreJobCommands(preJobCommands);
-            List<String> postJobCommands = new ArrayList<String>();
-            postJobCommands.add("postjobcommand1");
-            postJobCommands.add("postjobcommand2");
-            jobSubmission.setPostJobCommands(postJobCommands);
-            jobSubmission.setInstalledPath("installedPath");
-            return appcatalog.getComputeResource().addGSISSHJobSubmission(jobSubmission);
-        } catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public String addGlobusJobSubmission (){
-        try {
-            GlobusJobSubmission jobSubmission = new GlobusJobSubmission();
-            jobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
-            List<String> endPoints = new ArrayList<String>();
-            endPoints.add("222.33.43.444");
-            endPoints.add("23.344.44.454");
-            jobSubmission.setGlobusGateKeeperEndPoint(endPoints);
-            return appcatalog.getComputeResource().addGlobusJobSubmission(jobSubmission);
-        } catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public String addSCPDataMovement (){
-        try {
-            SCPDataMovement dataMovement = new SCPDataMovement();
-            dataMovement.setSshPort(22);
-            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-            return appcatalog.getComputeResource().addScpDataMovement(dataMovement);
-        }catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public String addGridFTPDataMovement (){
-        try {
-            GridFTPDataMovement dataMovement = new GridFTPDataMovement();
-            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-            List<String> endPoints = new ArrayList<String>();
-            endPoints.add("222.33.43.444");
-            endPoints.add("23.344.44.454");
-            dataMovement.setGridFTPEndPoint(endPoints);
-            return appcatalog.getComputeResource().addGridFTPDataMovement(dataMovement);
-        }catch (AppCatalogException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
+//    @Test
+//    public void testAddComputeResource (){
+//        try {
+//            ComputeResource computeResource = appcatalog.getComputeResource();
+//            ComputeResourceDescription description = new ComputeResourceDescription();
+//
+//            description.setHostName("localhost");
+//            description.setPreferredJobSubmissionProtocol("SSH");
+//            description.setResourceDescription("test compute resource");
+//            Set<String> ipdaresses = new HashSet<String>();
+//            ipdaresses.add("222.33.43.444");
+//            ipdaresses.add("23.344.44.454");
+//            description.setIpAddresses(ipdaresses);
+//            Set<String> aliases = new HashSet<String>();
+//            aliases.add("test.alias1");
+//            aliases.add("test.alias2");
+//            description.setHostAliases(aliases);
+//            String sshsubmissionId = addSSHJobSubmission();
+//            System.out.println("**** SSH Submission id ****** :" + sshsubmissionId);
+//            String gsiSSHsubmissionId = addGSISSHJobSubmission();
+//            System.out.println("**** GSISSH Submission id ****** :" + gsiSSHsubmissionId);
+//            String globusSubmissionId = addGlobusJobSubmission();
+//            System.out.println("**** Globus Submission id ****** :" + globusSubmissionId);
+//            Map<String, JobSubmissionProtocol> jobProtools = new HashMap<String, JobSubmissionProtocol>();
+//            jobProtools.put(sshsubmissionId, JobSubmissionProtocol.SSH);
+//            jobProtools.put(gsiSSHsubmissionId, JobSubmissionProtocol.GSISSH);
+//            jobProtools.put(globusSubmissionId, JobSubmissionProtocol.GRAM);
+//            description.setJobSubmissionProtocols(jobProtools);
+//
+//            String scpDataMoveId = addSCPDataMovement();
+//            System.out.println("**** SCP DataMoveId****** :" + scpDataMoveId);
+//            String gridFTPDataMoveId = addGridFTPDataMovement();
+//            System.out.println("**** grid FTP DataMoveId****** :" + gridFTPDataMoveId);
+//            Map<String, DataMovementProtocol> dataProtools = new HashMap<String, DataMovementProtocol>();
+//            dataProtools.put(scpDataMoveId, DataMovementProtocol.SCP);
+//            dataProtools.put(gridFTPDataMoveId, DataMovementProtocol.GridFTP);
+//            description.setDataMovementProtocols(dataProtools);
+//
+//            String resourceId = computeResource.addComputeResource(description);
+//            System.out.println("**********Resource id ************* : " +  resourceId);
+//            ComputeResourceDescription host = null;
+//            if (computeResource.isComputeResourceExists(resourceId)){
+//                host = computeResource.getComputeResource(resourceId);
+//                System.out.println("**********Resource name ************* : " +  host.getHostName());
+//            }
+//
+//            SSHJobSubmission sshJobSubmission = computeResource.getSSHJobSubmission(sshsubmissionId);
+//            System.out.println("**********SSH Submission resource job manager ************* : " +  sshJobSubmission.getResourceJobManager().toString());
+//
+//            GSISSHJobSubmission gsisshJobSubmission = computeResource.getGSISSHJobSubmission(gsiSSHsubmissionId);
+//            System.out.println("**********GSISSH Submission resource job manager ************* : " +  gsisshJobSubmission.getResourceJobManager().toString());
+//
+//            GlobusJobSubmission globusJobSubmission = computeResource.getGlobusJobSubmission(globusSubmissionId);
+//            System.out.println("**********Globus Submission resource job manager ************* : " + globusJobSubmission.getResourceJobManager().toString());
+//
+//            SCPDataMovement scpDataMovement = computeResource.getSCPDataMovement(scpDataMoveId);
+//            System.out.println("**********SCP Data Move Security protocol ************* : " + scpDataMovement.getSecurityProtocol().toString());
+//
+//            GridFTPDataMovement gridFTPDataMovement = computeResource.getGridFTPDataMovement(gridFTPDataMoveId);
+//            System.out.println("**********GRID FTP Data Move Security protocol ************* : " + gridFTPDataMovement.getSecurityProtocol().toString());
+//
+//            description.setHostName("localhost2");
+//            computeResource.updateComputeResource(resourceId, description);
+//            if (computeResource.isComputeResourceExists(resourceId)){
+//                host = computeResource.getComputeResource(resourceId);
+//                System.out.println("**********Updated Resource name ************* : " +  host.getHostName());
+//            }
+//
+//            Map<String, String> cfilters = new HashMap<String, String>();
+//            cfilters.put(AbstractResource.ComputeResourceConstants.HOST_NAME, "localhost2");
+//            List<ComputeResourceDescription> computeResourceList = computeResource.getComputeResourceList(cfilters);
+//            System.out.println("**********Size of compute resources ************* : " +  computeResourceList.size());
+//
+//            Map<String, String> globusfilters = new HashMap<String, String>();
+//            globusfilters.put(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
+//            List<GlobusJobSubmission> gList = computeResource.getGlobusJobSubmissionList(globusfilters);
+//            System.out.println("**********Size of globus jobs ************* : " +  gList.size());
+//
+//            Map<String, String> sshfilters = new HashMap<String, String>();
+//            sshfilters.put(AbstractResource.SSHSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
+//            List<SSHJobSubmission> sshList = computeResource.getSSHJobSubmissionList(sshfilters);
+//            System.out.println("**********Size of SSH jobs ************* : " + sshList.size());
+//
+//            Map<String, String> gsishfilters = new HashMap<String, String>();
+//            gsishfilters.put(AbstractResource.GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER, ResourceJobManager.PBS.toString());
+//            List<GSISSHJobSubmission> gsisshList = computeResource.getGSISSHJobSubmissionList(gsishfilters);
+//            System.out.println("**********Size of GSISSH jobs ************* : " + gsisshList.size());
+//
+//            Map<String, String> scpfilters = new HashMap<String, String>();
+//            scpfilters.put(AbstractResource.SCPDataMovementConstants.SECURITY_PROTOCOL, SecurityProtocol.SSH_KEYS.toString());
+//            List<SCPDataMovement> scpDataMovementList = computeResource.getSCPDataMovementList(scpfilters);
+//            System.out.println("**********Size of SCP DM list ************* : " + scpDataMovementList.size());
+//
+//            Map<String, String> ftpfilters = new HashMap<String, String>();
+//            ftpfilters.put(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL, SecurityProtocol.SSH_KEYS.toString());
+//            List<GridFTPDataMovement> ftpDataMovementList = computeResource.getGridFTPDataMovementList(ftpfilters);
+//            System.out.println("**********Size of FTP DM list ************* : " + ftpDataMovementList.size());
+//
+//            assertTrue("Compute resource save successfully", host != null);
+//        } catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    public String addSSHJobSubmission (){
+//        try {
+//            SSHJobSubmission jobSubmission = new SSHJobSubmission();
+//            jobSubmission.setSshPort(22);
+//            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+//            return appcatalog.getComputeResource().addSSHJobSubmission(jobSubmission);
+//        } catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    public String addGSISSHJobSubmission (){
+//        try {
+//            GSISSHJobSubmission jobSubmission = new GSISSHJobSubmission();
+//            jobSubmission.setSshPort(22);
+//            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+//            Set<String> exports = new HashSet<String>();
+//            exports.add("export1");
+//            exports.add("export2");
+//            jobSubmission.setExports(exports);
+//            jobSubmission.setMonitorMode("testMonitormode");
+//            List<String> preJobCommands = new ArrayList<String>();
+//            preJobCommands.add("prejobcommand1");
+//            preJobCommands.add("prejobcommand2");
+//            jobSubmission.setPreJobCommands(preJobCommands);
+//            List<String> postJobCommands = new ArrayList<String>();
+//            postJobCommands.add("postjobcommand1");
+//            postJobCommands.add("postjobcommand2");
+//            jobSubmission.setPostJobCommands(postJobCommands);
+//            jobSubmission.setInstalledPath("installedPath");
+//            return appcatalog.getComputeResource().addGSISSHJobSubmission(jobSubmission);
+//        } catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    public String addGlobusJobSubmission (){
+//        try {
+//            GlobusJobSubmission jobSubmission = new GlobusJobSubmission();
+//            jobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+//            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+//            List<String> endPoints = new ArrayList<String>();
+//            endPoints.add("222.33.43.444");
+//            endPoints.add("23.344.44.454");
+//            jobSubmission.setGlobusGateKeeperEndPoint(endPoints);
+//            return appcatalog.getComputeResource().addGlobusJobSubmission(jobSubmission);
+//        } catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    public String addSCPDataMovement (){
+//        try {
+//            SCPDataMovement dataMovement = new SCPDataMovement();
+//            dataMovement.setSshPort(22);
+//            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+//            return appcatalog.getComputeResource().addScpDataMovement(dataMovement);
+//        }catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    public String addGridFTPDataMovement (){
+//        try {
+//            GridFTPDataMovement dataMovement = new GridFTPDataMovement();
+//            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+//            List<String> endPoints = new ArrayList<String>();
+//            endPoints.add("222.33.43.444");
+//            endPoints.add("23.344.44.454");
+//            dataMovement.setGridFTPEndPoint(endPoints);
+//            return appcatalog.getComputeResource().addGridFTPDataMovement(dataMovement);
+//        }catch (AppCatalogException e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
 
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/097d955e/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 862a95f..c4391be 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -75,12 +75,6 @@ import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDes
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.GSISSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.GlobusJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.workspace.experiment.DataObjectType;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.ExperimentState;
@@ -91,16 +85,9 @@ import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.schemas.gfac.DataType;
-import org.apache.airavata.schemas.gfac.GlobusHostType;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.JobTypeType;
 import org.apache.airavata.schemas.gfac.OutputParameterType;
 import org.apache.airavata.schemas.gfac.ParameterType;
-import org.apache.airavata.schemas.gfac.ProjectAccountType;
-import org.apache.airavata.schemas.gfac.QueueType;
-import org.apache.airavata.schemas.gfac.SSHHostType;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZKUtil;
 import org.apache.zookeeper.ZooKeeper;
@@ -265,118 +252,118 @@ public class BetterGfacImpl implements GFac {
 		hostDescription.getType().setHostName(computeResource.getHostName());
 		hostDescription.getType().setHostAddress(computeResource.getIpAddresses().iterator().next());
 		
-		String preferredJobSubmissionProtocol = computeResource.getPreferredJobSubmissionProtocol(); 
-		String preferredDataMovementProtocol = computeResource.getDataMovementProtocols().keySet().iterator().next(); 
-
-		if (preferredJobSubmissionProtocol==null){
-			preferredJobSubmissionProtocol=computeResource.getJobSubmissionProtocols().keySet().iterator().next();
-		}
-		JobSubmissionProtocol jobSubmissionProtocol = computeResource.getJobSubmissionProtocols().get(preferredJobSubmissionProtocol);
-		DataMovementProtocol dataMovementProtocol = computeResource.getDataMovementProtocols().get(preferredDataMovementProtocol);
-
-		if (jobSubmissionProtocol==JobSubmissionProtocol.GRAM){
-			hostDescription.getType().changeType(GlobusHostType.type);
-			
-			applicationDescription.getType().changeType(HpcApplicationDeploymentType.type);
-			HpcApplicationDeploymentType app=(HpcApplicationDeploymentType)applicationDescription.getType();
-			
-			GlobusJobSubmission globusJobSubmission = appCatalog.getComputeResource().getGlobusJobSubmission(preferredJobSubmissionProtocol);
-			((GlobusHostType)hostDescription.getType()).setGlobusGateKeeperEndPointArray(globusJobSubmission.getGlobusGateKeeperEndPoint().toArray(new String[]{}));
-			if (dataMovementProtocol==DataMovementProtocol.GridFTP) {
-				GridFTPDataMovement gridFTPDataMovement = appCatalog.getComputeResource().getGridFTPDataMovement(preferredDataMovementProtocol);
-				((GlobusHostType) hostDescription.getType())
-						.setGridFTPEndPointArray(gridFTPDataMovement
-								.getGridFTPEndPoint().toArray(
-										new String[] {}));
-			}
-			////////////////
-			if (computeResource.getHostName().equalsIgnoreCase("trestles.sdsc.edu")){
-		        ProjectAccountType projectAccountType = app.addNewProjectAccount();
-		        projectAccountType.setProjectAccountNumber("sds128");
-	
-		        QueueType queueType = app.addNewQueue();
-		        queueType.setQueueName("normal");
-	
-		        app.setCpuCount(1);
-		        app.setJobType(JobTypeType.SERIAL);
-		        app.setNodeCount(1);
-		        app.setProcessorsPerNode(1);
-	
-		        String tempDir = "/home/ogce/scratch";
-		        app.setScratchWorkingDirectory(tempDir);
-		        app.setMaxMemory(10);
-			}
-			////////////////
-		} else if (jobSubmissionProtocol==JobSubmissionProtocol.GSISSH){
-			hostDescription.getType().changeType(GsisshHostType.type);
-			applicationDescription.getType().changeType(HpcApplicationDeploymentType.type);
-			HpcApplicationDeploymentType app=(HpcApplicationDeploymentType)applicationDescription.getType();
-			
-			GSISSHJobSubmission gsisshJobSubmission = appCatalog.getComputeResource().getGSISSHJobSubmission(preferredJobSubmissionProtocol);
-	        ((GsisshHostType) hostDescription.getType()).setPort(gsisshJobSubmission.getSshPort());
-	        ((GsisshHostType) hostDescription.getType()).setInstalledPath(gsisshJobSubmission.getInstalledPath());
-	        if (computeResource.getHostName().equalsIgnoreCase("lonestar.tacc.utexas.edu")){
-	        	((GsisshHostType) hostDescription.getType()).setJobManager("sge");
-	            ((GsisshHostType) hostDescription.getType()).setInstalledPath("/opt/sge6.2/bin/lx24-amd64/");
-	            ((GsisshHostType) hostDescription.getType()).setPort(22);
-	            ProjectAccountType projectAccountType = app.addNewProjectAccount();
-	            projectAccountType.setProjectAccountNumber("TG-STA110014S");
-	            QueueType queueType = app.addNewQueue();
-	            queueType.setQueueName("normal");
-	            app.setCpuCount(1);
-	            app.setJobType(JobTypeType.SERIAL);
-	            app.setNodeCount(1);
-	            app.setProcessorsPerNode(1);
-	            app.setMaxWallTime(10);
-	            String tempDir = "/home1/01437/ogce";
-	            app.setScratchWorkingDirectory(tempDir);
-	            app.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
-	        } else if (computeResource.getHostName().equalsIgnoreCase("stampede.tacc.xsede.org")){
-		        ((GsisshHostType) hostDescription.getType()).setJobManager("slurm");
-		        ((GsisshHostType) hostDescription.getType()).setInstalledPath("/usr/bin/");
-		        ((GsisshHostType) hostDescription.getType()).setPort(2222);
-		        ((GsisshHostType) hostDescription.getType()).setMonitorMode("push");
-		        
-		        ProjectAccountType projectAccountType = app.addNewProjectAccount();
-		        projectAccountType.setProjectAccountNumber("TG-STA110014S");
-
-		        QueueType queueType = app.addNewQueue();
-		        queueType.setQueueName("normal");
-
-		        app.setCpuCount(1);
-		        app.setJobType(JobTypeType.SERIAL);
-		        app.setNodeCount(1);
-		        app.setProcessorsPerNode(1);
-		        app.setMaxWallTime(10);
-		        String tempDir = "/home1/01437/ogce";
-		        app.setScratchWorkingDirectory(tempDir);
-		        app.setInstalledParentPath("/usr/bin/");
-
-			} else if (computeResource.getHostName().equalsIgnoreCase("trestles.sdsc.edu")){
-	        	ProjectAccountType projectAccountType = app.addNewProjectAccount();
-	            projectAccountType.setProjectAccountNumber("sds128");
-
-	            QueueType queueType = app.addNewQueue();
-	            queueType.setQueueName("normal");
-
-	            app.setCpuCount(1);
-	            app.setJobType(JobTypeType.SERIAL);
-	            app.setNodeCount(1);
-	            app.setProcessorsPerNode(1);
-	            app.setMaxWallTime(10);
-	            String tempDir = "/oasis/scratch/trestles/ogce/temp_project/";
-	            app.setScratchWorkingDirectory(tempDir);
-	            app.setInstalledParentPath("/opt/torque/bin/");
-	        }
-		} else if (jobSubmissionProtocol==JobSubmissionProtocol.SSH){
-			hostDescription.getType().changeType(SSHHostType.type);
-			SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionProtocol);
-			applicationDescription.getType().setExecutableLocation(applicationDeployement.getExecutablePath());
-			//TODO update scratch location
-			if (computeResource.getHostName().equalsIgnoreCase("gw111.iu.xsede.org")){
-				applicationDescription.getType().setScratchWorkingDirectory("/tmp");
-			}
-		}
+//		String preferredJobSubmissionProtocol = computeResource.getPreferredJobSubmissionProtocol(); 
+//		String preferredDataMovementProtocol = computeResource.getDataMovementProtocols().keySet().iterator().next(); 
+//
+//		if (preferredJobSubmissionProtocol==null){
+//			preferredJobSubmissionProtocol=computeResource.getJobSubmissionProtocols().keySet().iterator().next();
+//		}
+//		JobSubmissionProtocol jobSubmissionProtocol = computeResource.getJobSubmissionProtocols().get(preferredJobSubmissionProtocol);
+//		DataMovementProtocol dataMovementProtocol = computeResource.getDataMovementProtocols().get(preferredDataMovementProtocol);
+//
+//		if (jobSubmissionProtocol==JobSubmissionProtocol.GRAM){
+//			hostDescription.getType().changeType(GlobusHostType.type);
+//			
+//			applicationDescription.getType().changeType(HpcApplicationDeploymentType.type);
+//			HpcApplicationDeploymentType app=(HpcApplicationDeploymentType)applicationDescription.getType();
+//			
+//			GlobusJobSubmission globusJobSubmission = appCatalog.getComputeResource().getGlobusJobSubmission(preferredJobSubmissionProtocol);
+//			((GlobusHostType)hostDescription.getType()).setGlobusGateKeeperEndPointArray(globusJobSubmission.getGlobusGateKeeperEndPoint().toArray(new String[]{}));
+//			if (dataMovementProtocol==DataMovementProtocol.GridFTP) {
+//				GridFTPDataMovement gridFTPDataMovement = appCatalog.getComputeResource().getGridFTPDataMovement(preferredDataMovementProtocol);
+//				((GlobusHostType) hostDescription.getType())
+//						.setGridFTPEndPointArray(gridFTPDataMovement
+//								.getGridFTPEndPoint().toArray(
+//										new String[] {}));
+//			}
+//			////////////////
+//			if (computeResource.getHostName().equalsIgnoreCase("trestles.sdsc.edu")){
+//		        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+//		        projectAccountType.setProjectAccountNumber("sds128");
+//	
+//		        QueueType queueType = app.addNewQueue();
+//		        queueType.setQueueName("normal");
+//	
+//		        app.setCpuCount(1);
+//		        app.setJobType(JobTypeType.SERIAL);
+//		        app.setNodeCount(1);
+//		        app.setProcessorsPerNode(1);
+//	
+//		        String tempDir = "/home/ogce/scratch";
+//		        app.setScratchWorkingDirectory(tempDir);
+//		        app.setMaxMemory(10);
+//			}
+//			////////////////
+//		} else if (jobSubmissionProtocol==JobSubmissionProtocol.GSISSH){
+//			hostDescription.getType().changeType(GsisshHostType.type);
+//			applicationDescription.getType().changeType(HpcApplicationDeploymentType.type);
+//			HpcApplicationDeploymentType app=(HpcApplicationDeploymentType)applicationDescription.getType();
+//			
+//			GSISSHJobSubmission gsisshJobSubmission = appCatalog.getComputeResource().getGSISSHJobSubmission(preferredJobSubmissionProtocol);
+//	        ((GsisshHostType) hostDescription.getType()).setPort(gsisshJobSubmission.getSshPort());
+//	        ((GsisshHostType) hostDescription.getType()).setInstalledPath(gsisshJobSubmission.getInstalledPath());
+//	        if (computeResource.getHostName().equalsIgnoreCase("lonestar.tacc.utexas.edu")){
+//	        	((GsisshHostType) hostDescription.getType()).setJobManager("sge");
+//	            ((GsisshHostType) hostDescription.getType()).setInstalledPath("/opt/sge6.2/bin/lx24-amd64/");
+//	            ((GsisshHostType) hostDescription.getType()).setPort(22);
+//	            ProjectAccountType projectAccountType = app.addNewProjectAccount();
+//	            projectAccountType.setProjectAccountNumber("TG-STA110014S");
+//	            QueueType queueType = app.addNewQueue();
+//	            queueType.setQueueName("normal");
+//	            app.setCpuCount(1);
+//	            app.setJobType(JobTypeType.SERIAL);
+//	            app.setNodeCount(1);
+//	            app.setProcessorsPerNode(1);
+//	            app.setMaxWallTime(10);
+//	            String tempDir = "/home1/01437/ogce";
+//	            app.setScratchWorkingDirectory(tempDir);
+//	            app.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
+//	        } else if (computeResource.getHostName().equalsIgnoreCase("stampede.tacc.xsede.org")){
+//		        ((GsisshHostType) hostDescription.getType()).setJobManager("slurm");
+//		        ((GsisshHostType) hostDescription.getType()).setInstalledPath("/usr/bin/");
+//		        ((GsisshHostType) hostDescription.getType()).setPort(2222);
+//		        ((GsisshHostType) hostDescription.getType()).setMonitorMode("push");
+//		        
+//		        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+//		        projectAccountType.setProjectAccountNumber("TG-STA110014S");
+//
+//		        QueueType queueType = app.addNewQueue();
+//		        queueType.setQueueName("normal");
+//
+//		        app.setCpuCount(1);
+//		        app.setJobType(JobTypeType.SERIAL);
+//		        app.setNodeCount(1);
+//		        app.setProcessorsPerNode(1);
+//		        app.setMaxWallTime(10);
+//		        String tempDir = "/home1/01437/ogce";
+//		        app.setScratchWorkingDirectory(tempDir);
+//		        app.setInstalledParentPath("/usr/bin/");
+//
+//			} else if (computeResource.getHostName().equalsIgnoreCase("trestles.sdsc.edu")){
+//	        	ProjectAccountType projectAccountType = app.addNewProjectAccount();
+//	            projectAccountType.setProjectAccountNumber("sds128");
+//
+//	            QueueType queueType = app.addNewQueue();
+//	            queueType.setQueueName("normal");
+//
+//	            app.setCpuCount(1);
+//	            app.setJobType(JobTypeType.SERIAL);
+//	            app.setNodeCount(1);
+//	            app.setProcessorsPerNode(1);
+//	            app.setMaxWallTime(10);
+//	            String tempDir = "/oasis/scratch/trestles/ogce/temp_project/";
+//	            app.setScratchWorkingDirectory(tempDir);
+//	            app.setInstalledParentPath("/opt/torque/bin/");
+//	        }
+//		} else if (jobSubmissionProtocol==JobSubmissionProtocol.SSH){
+//			hostDescription.getType().changeType(SSHHostType.type);
+//			SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionProtocol);
+//			applicationDescription.getType().setExecutableLocation(applicationDeployement.getExecutablePath());
+//			//TODO update scratch location
+//			if (computeResource.getHostName().equalsIgnoreCase("gw111.iu.xsede.org")){
+//				applicationDescription.getType().setScratchWorkingDirectory("/tmp");
+//			}
+//		}
 		
 		ApplicationInterfaceDescription applicationInterface = appCatalog.getApplicationInterface().getApplicationInterface(applicationId);
 		


Mime
View raw message