You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/11/05 19:29:49 UTC

[01/44] git commit: fixing input/outhandler - AIRAVATA-1488

Repository: airavata
Updated Branches:
  refs/heads/gfac_appcatalog_int e9ee22b97 -> 755273e1a


fixing input/outhandler - AIRAVATA-1488


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b3769516
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b3769516
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b3769516

Branch: refs/heads/gfac_appcatalog_int
Commit: b3769516eec7d7127e17d2e24e4001718763c1ec
Parents: 3b330c0
Author: lahiru <la...@apache.org>
Authored: Thu Oct 30 11:27:12 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Thu Oct 30 11:27:12 2014 -0400

----------------------------------------------------------------------
 .../impl/password/PasswordCredential.java       |   3 +-
 .../gfac/core/context/JobExecutionContext.java  |   2 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |   3 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |   2 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java | 114 ++++++++++---------
 .../ssh/handler/AdvancedSCPInputHandler.java    |   9 +-
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  12 +-
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  86 +++++++++++---
 8 files changed, 146 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
index ee32ef4..a31c98b 100644
--- a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
+++ b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
@@ -22,13 +22,14 @@
 package org.apache.airavata.credential.store.credential.impl.password;
 
 import org.apache.airavata.credential.store.credential.Credential;
+import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
 
 import java.util.Date;
 
 /**
  * User name password credentials.
  */
-public class PasswordCredential extends Credential {
+public class PasswordCredential extends SSHCredential {
 
     private String userName;
     private String password;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 9abab8d..2f94ec5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -234,7 +234,7 @@ public class JobExecutionContext extends AbstractContext implements Serializable
 
 	
 	public SecurityContext getSecurityContext(String name) throws GFacException{
-		SecurityContext secContext = securityContext.get(name);
+		SecurityContext secContext = securityContext.get(name+"-"+this.getApplicationContext().getHostDescription().getType().getHostAddress());
 		return secContext;
 	}
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 729c1ee..eef44a4 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -1092,7 +1092,8 @@ public class GFacUtils {
 		}else if(experimentEntry != null && GFacUtils.isCancelled(experimentID,taskID,zk) ){
             // this happens when a cancel request comes to a differnt gfac node, in this case we do not move gfac experiment
             // node to gfac node specific location, because original request execution will fail with errors
-            return true;
+            log.error("This experiment is already cancelled and its already executing the cancel operation so cannot submit again !");
+            return false;
         } else {
             log.error("ExperimentID: " + experimentID + " taskID: " + taskID
                     + " is already running by this Gfac instance");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 4d338e3..2f9dbc3 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -163,7 +163,7 @@ public class GFACGSISSHUtils {
             } catch (Exception e) {
                 throw new GFacException("An error occurred while creating GSI security context", e);
             }
-            jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT, context);
+            jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(), context);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index d3c3df8..952b30e 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -157,12 +157,10 @@ public class HPCPullMonitor extends PullMonitor {
         HostDescription currentHostDescription = null;
         try {
             take = this.queue.take();
-            Map<String,MonitorID> completedJobs = new HashMap<String,MonitorID>();
             List<HostMonitorData> hostMonitorData = take.getHostMonitorData();
             for (HostMonitorData iHostMonitorData : hostMonitorData) {
                 if (iHostMonitorData.getHost().getType() instanceof GsisshHostType
                         || iHostMonitorData.getHost().getType() instanceof SSHHostType) {
-                    currentHostDescription = iHostMonitorData.getHost();
                     String hostName =  iHostMonitorData.getHost().getType().getHostAddress();
                     ResourceConnection connection = null;
                     if (connections.containsKey(hostName)) {
@@ -181,17 +179,22 @@ public class HPCPullMonitor extends PullMonitor {
                     // before we get the statuses, we check the cancel job list and remove them permanently
                     List<MonitorID> monitorID = iHostMonitorData.getMonitorIDs();
                     Iterator<String> iterator1 = cancelJobList.iterator();
-
-                    for(MonitorID iMonitorID:monitorID){
+                    ListIterator<MonitorID> monitorIDListIterator = monitorID.listIterator();
+                    while (monitorIDListIterator.hasNext()){
+                        MonitorID iMonitorID = monitorIDListIterator.next();
                         while(iterator1.hasNext()) {
                             String cancelMId = iterator1.next();
                             if (cancelMId.equals(iMonitorID.getExperimentID() + "+" + iMonitorID.getTaskID())) {
                                 iMonitorID.setStatus(JobState.CANCELED);
-                                completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                                 iterator1.remove();
                                 logger.debugId(cancelMId, "Found a match in cancel monitor queue, hence moved to the " +
                                                 "completed job queue, experiment {}, task {} , job {}",
                                         iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobID());
+                                logger.info("Job cancelled: marking the Job as ************CANCELLED************ experiment {}, task {}, job name {} .",
+                                        iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
+                                sendNotification(iMonitorID);
+                                monitorIDListIterator.remove();
+                                GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
                                 break;
                             }
                         }
@@ -199,26 +202,36 @@ public class HPCPullMonitor extends PullMonitor {
                     }
                     synchronized (completedJobsFromPush) {
                         ListIterator<String> iterator = completedJobsFromPush.listIterator();
-                        for (MonitorID iMonitorID : monitorID) {
+                        monitorIDListIterator = monitorID.listIterator();
+                        while (monitorIDListIterator.hasNext()) {
+                            MonitorID iMonitorID = monitorIDListIterator.next();
                             String completeId = null;
                             while (iterator.hasNext()) {
                                  completeId = iterator.next();
                                 if (completeId.equals(iMonitorID.getUserName() + "," + iMonitorID.getJobName())) {
                                     logger.info("This job is finished because push notification came with <username,jobName> " + completeId);
-                                    completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                                     iMonitorID.setStatus(JobState.COMPLETE);
                                     iterator.remove();//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
                                     logger.debugId(completeId, "Push notification updated job {} status to {}. " +
                                                     "experiment {} , task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
                                             iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                    logger.info("AMQP message recieved: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                            iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
+
+                                    monitorIDListIterator.remove();
+                                    sendNotification(iMonitorID);
+                                    GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
                                     break;
                                 }
                             }
                             iterator = completedJobsFromPush.listIterator();
                         }
                     }
+
+                    // we have to get this again because we removed the already completed jobs with amqp messages
+                    monitorID = iHostMonitorData.getMonitorIDs();
                     Map<String, JobState> jobStatuses = connection.getJobStatuses(monitorID);
-                    Iterator<MonitorID> iterator = monitorID.iterator();
+                    Iterator<MonitorID> iterator = monitorID.listIterator();
                     while (iterator.hasNext()) {
                         MonitorID iMonitorID = iterator.next();
                         currentMonitorID = iMonitorID;
@@ -226,13 +239,25 @@ public class HPCPullMonitor extends PullMonitor {
                                 !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
                             iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
                         }else if(JobState.COMPLETE.equals(iMonitorID.getStatus())){
-                            completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                             logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
                                     "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                            iterator.remove();
+                            logger.info("PULL Notification is complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                    iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
+                            GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
                         }
-                        jobStatus = new JobStatusChangeRequestEvent();
                         iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID()+","+iMonitorID.getJobName()));    //IMPORTANT this is not a simple setter we have a logic
-
+                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                        sendNotification(iMonitorID);
+                        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status change request, " +
+                                        "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
+                                jobStatus.getJobIdentity().getTaskId());
+                        // if the job is completed we do not have to put the job to the queue again
+                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                    }
+                    iterator = monitorID.listIterator();
+                    while(iterator.hasNext()){
+                        MonitorID iMonitorID = iterator.next();
                         if (iMonitorID.getFailedCount() > FAILED_COUNT) {
                             iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                             String outputDir = iMonitorID.getJobExecutionContext().getApplicationContext()
@@ -245,15 +270,19 @@ public class HPCPullMonitor extends PullMonitor {
                                     // this is because while we run output handler something failed and during exception
                                     // we store all the jobs in the monitor queue again
                                     logger.error("We know this  job is already attempted to run out-handlers");
-                                    CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
+//                                    CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
                                 }
                             }
                             if (stdOut != null && stdOut.size() > 0 && !stdOut.get(0).isEmpty()) { // have to be careful with this
                                 iMonitorID.setStatus(JobState.COMPLETE);
-                                completedJobs.put(iMonitorID.getJobName(), iMonitorID);
-                                logger.errorId(iMonitorID.getJobID(), "Job monitoring failed {} times, removed job {} from " +
-                                                "monitor queue. Experiment {} , task {}", iMonitorID.getFailedCount(),
+                                logger.errorId(iMonitorID.getJobID(), "Job monitoring failed {} times, " +
+                                                " Experiment {} , task {}", iMonitorID.getFailedCount(),
                                         iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                logger.info("Listing directory came as complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                        iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
+                                sendNotification(iMonitorID);
+                                iterator.remove();
+                                GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
                             } else {
                                 iMonitorID.setFailedCount(0);
                             }
@@ -263,22 +292,9 @@ public class HPCPullMonitor extends PullMonitor {
                             // if the job is complete we remove it from the Map, if any of these maps
                             // get empty this userMonitorData will get delete from the queue
                         }
-                        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobID(),
-                                iMonitorID.getTaskID(),
-                                iMonitorID.getWorkflowNodeID(),
-                                iMonitorID.getExperimentID(),
-                                iMonitorID.getJobExecutionContext().getGatewayID());
-                        jobStatus.setJobIdentity(jobIdentity);
-                        jobStatus.setState(iMonitorID.getStatus());
-                        // we have this JobStatus class to handle amqp monitoring
-
-                        publisher.publish(jobStatus);
-                        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status change request, " +
-                                        "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
-                                jobStatus.getJobIdentity().getTaskId());
-                        // if the job is completed we do not have to put the job to the queue again
-                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                     }
+
+
                 } else {
                     logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.getHost()
                             .getType().getHostAddress());
@@ -287,30 +303,6 @@ public class HPCPullMonitor extends PullMonitor {
             // We have finished all the HostMonitorData object in userMonitorData, now we need to put it back
             // now the userMonitorData goes back to the tail of the queue
             queue.put(take);
-            // cleaning up the completed jobs, this method will remove some of the userMonitorData from the queue if
-            // they become empty
-            Map<String, Integer> jobRemoveCountMap = new HashMap<String, Integer>();
-            ZooKeeper zk = null;
-            Set<String> keys = completedJobs.keySet();
-            for (String jobName: keys) {
-                MonitorID completedJob = completedJobs.get(jobName);
-                CommonUtils.removeMonitorFromQueue(queue, completedJob);
-//                    gfac.invokeOutFlowHandlers(completedJob.getJobExecutionContext());
-                  GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, completedJob, publisher));
-                if (zk == null) {
-                    zk = completedJob.getJobExecutionContext().getZk();
-                }
-                String key = CommonUtils.getJobCountUpdatePath(completedJob);
-                int i = 0;
-                if (jobRemoveCountMap.containsKey(key)) {
-                    i = Integer.valueOf(jobRemoveCountMap.get(key));
-                }
-                jobRemoveCountMap.put(key, ++i);
-            }
-            if (completedJobs.size() > 0) {
-                // reduce completed job count from zookeeper
-                CommonUtils.updateZkWithJobCount(zk, jobRemoveCountMap, false);
-            }
         } catch (InterruptedException e) {
             if (!this.queue.contains(take)) {
                 try {
@@ -357,6 +349,20 @@ public class HPCPullMonitor extends PullMonitor {
         return true;
     }
 
+    private void sendNotification(MonitorID iMonitorID) {
+        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
+        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobID(),
+                iMonitorID.getTaskID(),
+                iMonitorID.getWorkflowNodeID(),
+                iMonitorID.getExperimentID(),
+                iMonitorID.getJobExecutionContext().getGatewayID());
+        jobStatus.setJobIdentity(jobIdentity);
+        jobStatus.setState(iMonitorID.getStatus());
+        // we have this JobStatus class to handle amqp monitoring
+
+        publisher.publish(jobStatus);
+    }
+
     /**
      * This is the method to stop the polling process
      *

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
index ce296da..de4dd41 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -72,6 +72,7 @@ import java.util.*;
 public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
     private static final Logger log = LoggerFactory.getLogger(AdvancedSCPInputHandler.class);
     public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
+    public static final int DEFAULT_SSH_PORT = 22;
 
     private String password = null;
 
@@ -131,11 +132,11 @@ public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
                         this.passPhrase);
             }
             ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-            String key = this.userName + this.hostName;
-            jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new SSHAuthWrapper(serverInfo,authenticationInfo,key));
-            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT) == null) {
+            String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
+            SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
+            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key) == null) {
                 try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                    GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
                 } catch (ApplicationSettingsException e) {
                     log.error(e.getMessage());
                     try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index ad2131e..aed6e9f 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -73,6 +73,8 @@ import java.util.Set;
 public class AdvancedSCPOutputHandler extends AbstractHandler {
     private static final Logger log = LoggerFactory.getLogger(AdvancedSCPOutputHandler.class);
 
+    public static final int DEFAULT_SSH_PORT = 22;
+
     private String password = null;
 
     private String publicKeyPath;
@@ -87,8 +89,6 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
 
     private String outputPath;
 
-    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
-
 
     public void initProperties(Properties properties) throws GFacHandlerException {
         password = (String)properties.get("password");
@@ -111,12 +111,12 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
                     this.passPhrase);
         }
         ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        String key = this.userName + this.hostName;
-        jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new SSHAuthWrapper(serverInfo,authenticationInfo,key));
+        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
+        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
         try {
-            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT) == null) {
+            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key) == null) {
                 try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                    GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
                 } catch (ApplicationSettingsException e) {
                     log.error(e.getMessage());
                     try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 7ee5d6a..94f07b1 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -62,9 +62,12 @@ public class GFACSSHUtils {
 
     public static int maxClusterCount = 5;
 
-    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
-
-
+    /**
+     * This method is to add computing resource specific authentication, if its a third party machine, use the other addSecurityContext
+     * @param jobExecutionContext
+     * @throws GFacException
+     * @throws ApplicationSettingsException
+     */
     public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
         HostDescription registeredHost = jobExecutionContext.getApplicationContext().getHostDescription();
         if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType() instanceof UnicoreHostType) {
@@ -77,8 +80,6 @@ public class GFACSSHUtils {
             requestData.setTokenId(credentialStoreToken);
 
             ServerInfo serverInfo = new ServerInfo(null, registeredHost.getType().getHostAddress());
-            SSHAuthWrapper sshAuth = (SSHAuthWrapper) jobExecutionContext.getProperty(ADVANCED_SSH_AUTH);
-
             Cluster pbsCluster = null;
             try {
                 TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
@@ -95,9 +96,6 @@ public class GFACSSHUtils {
 
                 String key = credentials.getPortalUserName() + registeredHost.getType().getHostAddress() +
                         serverInfo.getPort();
-                if(sshAuth!=null){
-                    key=sshAuth.getKey();
-                }
                 boolean recreate = false;
                 synchronized (clusters) {
                     if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
@@ -125,15 +123,8 @@ public class GFACSSHUtils {
                         recreate = true;
                     }
                     if (recreate) {
-                        if (sshAuth != null) {
-                            pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),
+                        pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,
                                     CommonUtils.getPBSJobManager(installedParentPath));
-                            jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,null); // some other provider might fail
-                            key = sshAuth.getKey();
-                        } else {
-                            pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,
-                                    CommonUtils.getPBSJobManager(installedParentPath));
-                        }
                         List<Cluster> pbsClusters = null;
                         if (!(clusters.containsKey(key))) {
                             pbsClusters = new ArrayList<Cluster>();
@@ -148,10 +139,71 @@ public class GFACSSHUtils {
                 e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
             }
             sshSecurityContext.setPbsCluster(pbsCluster);
-            jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT, sshSecurityContext);
+            jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(), sshSecurityContext);
         }
     }
 
+    /**
+     * This method can be used to add third party resource security contexts
+     * @param jobExecutionContext
+     * @param sshAuth
+     * @throws GFacException
+     * @throws ApplicationSettingsException
+     */
+    public static void addSecurityContext(JobExecutionContext jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException, ApplicationSettingsException {
+            try {
+                if(sshAuth== null) {
+                    throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
+                }
+                SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+                Cluster pbsCluster = null;
+                String key=sshAuth.getKey();
+                boolean recreate = false;
+                synchronized (clusters) {
+                    if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                        recreate = true;
+                    } else if (clusters.containsKey(key)) {
+                        int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                        if (clusters.get(key).get(i).getSession().isConnected()) {
+                            pbsCluster = clusters.get(key).get(i);
+                        } else {
+                            clusters.get(key).remove(i);
+                            recreate = true;
+                        }
+                        if (!recreate) {
+                            try {
+                                pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                            } catch (Exception e) {
+                                clusters.get(key).remove(i);
+                                logger.info("Connection found the connection map is expired, so we create from the scratch");
+                                maxClusterCount++;
+                                recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                            }
+                        }
+                        logger.info("Re-using the same connection used with the connection string:" + key);
+                    } else {
+                        recreate = true;
+                    }
+                    if (recreate) {
+                        pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null);
+                        key = sshAuth.getKey();
+                        List<Cluster> pbsClusters = null;
+                        if (!(clusters.containsKey(key))) {
+                            pbsClusters = new ArrayList<Cluster>();
+                        } else {
+                            pbsClusters = clusters.get(key);
+                        }
+                        pbsClusters.add(pbsCluster);
+                        clusters.put(key, pbsClusters);
+                    }
+                }
+                sshSecurityContext.setPbsCluster(pbsCluster);
+                jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+key, sshSecurityContext);
+            } catch (Exception e) {
+                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            }
+    }
+
     public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext,
                                                     ApplicationDeploymentDescriptionType app, Cluster cluster) {
         JobDescriptor jobDescriptor = new JobDescriptor();


[37/44] git commit: Removed legacy descriptions from MonitorID, GSISSH provider and utils and AMQPMonitor classes

Posted by ch...@apache.org.
Removed legacy descriptions from MonitorID, GSISSH provider and utils and AMQPMonitor classes


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/eb626fa7
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/eb626fa7
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/eb626fa7

Branch: refs/heads/gfac_appcatalog_int
Commit: eb626fa754d75bcb6fc328507d9ff8c3bceb4bcf
Parents: 5136157
Author: shamrath <sh...@gmail.com>
Authored: Fri Oct 31 12:25:31 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:23:05 2014 -0500

----------------------------------------------------------------------
 .../data/impl/GwyResourceProfileImpl.java       |   8 +-
 .../data/util/AppCatalogThriftConversion.java   |   4 +-
 .../app/catalog/test/GatewayProfileTest.java    |   8 +-
 .../gfac/core/context/JobExecutionContext.java  |   4 +
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  33 +++---
 .../airavata/gfac/core/monitor/MonitorID.java   |  19 ++--
 .../gsissh/provider/impl/GSISSHProvider.java    |  64 ++++++-----
 .../gfac/gsissh/util/GFACGSISSHUtils.java       | 108 ++++++++++---------
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  57 +++++-----
 .../apache/airavata/job/AMQPMonitorTest.java    |  64 +++++++----
 10 files changed, 213 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
index ed66bff..101b647 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
@@ -66,8 +66,8 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
                     resource.setGatewayId(profileResource.getGatewayID());
                     resource.setOverrideByAiravata(preference.isOverridebyAiravata());
-                    resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol());
-                    resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol());
+                    resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
+                    resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
                     resource.setBatchQueue(preference.getPreferredBatchQueue());
                     resource.setProjectNumber(preference.getAllocationProjectNumber());
                     resource.setScratchLocation(preference.getScratchLocation());
@@ -100,8 +100,8 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
                     resource.setGatewayId(gatewayId);
                     resource.setOverrideByAiravata(preference.isOverridebyAiravata());
-                    resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol());
-                    resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol());
+                    resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
+                    resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
                     resource.setBatchQueue(preference.getPreferredBatchQueue());
                     resource.setProjectNumber(preference.getAllocationProjectNumber());
                     resource.setScratchLocation(preference.getScratchLocation());

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/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 14a0ab0..35549f4 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
@@ -670,8 +670,8 @@ public class AppCatalogThriftConversion {
         ComputeResourcePreference preference = new ComputeResourcePreference();
         preference.setComputeResourceId(resource.getResourceId());
         preference.setOverridebyAiravata(resource.getOverrideByAiravata());
-        preference.setPreferredJobSubmissionProtocol(resource.getPreferredJobProtocol());
-        preference.setPreferredDataMovementProtocol(resource.getPreferedDMProtocol());
+        preference.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.valueOf(resource.getPreferredJobProtocol()));
+        preference.setPreferredDataMovementProtocol(DataMovementProtocol.valueOf(resource.getPreferedDMProtocol()));
         preference.setPreferredBatchQueue(resource.getBatchQueue());
         preference.setScratchLocation(resource.getScratchLocation());
         preference.setAllocationProjectNumber(resource.getProjectNumber());

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/GatewayProfileTest.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/GatewayProfileTest.java b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/GatewayProfileTest.java
index 66eb6bb..3593e11 100644
--- a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/GatewayProfileTest.java
+++ b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/GatewayProfileTest.java
@@ -84,8 +84,8 @@ public class GatewayProfileTest {
         ComputeResourcePreference preference1 = new ComputeResourcePreference();
         preference1.setComputeResourceId(hostId1);
         preference1.setOverridebyAiravata(true);
-        preference1.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.SSH.toString());
-        preference1.setPreferredDataMovementProtocol(DataMovementProtocol.SCP.toString());
+        preference1.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.SSH);
+                preference1.setPreferredDataMovementProtocol(DataMovementProtocol.SCP);
         preference1.setPreferredBatchQueue("queue1");
         preference1.setScratchLocation("/tmp");
         preference1.setAllocationProjectNumber("project1");
@@ -93,8 +93,8 @@ public class GatewayProfileTest {
         ComputeResourcePreference preference2 = new ComputeResourcePreference();
         preference2.setComputeResourceId(hostId2);
         preference2.setOverridebyAiravata(true);
-        preference2.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.LOCAL.toString());
-        preference2.setPreferredDataMovementProtocol(DataMovementProtocol.GridFTP.toString());
+        preference2.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.LOCAL);
+        preference2.setPreferredDataMovementProtocol(DataMovementProtocol.GridFTP);
         preference2.setPreferredBatchQueue("queue2");
         preference2.setScratchLocation("/tmp");
         preference2.setAllocationProjectNumber("project2");

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 3616b42..cade06b 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -430,4 +430,8 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     public void setPreferredJobSubmissionInterface(JobSubmissionInterface preferredJobSubmissionInterface) {
         this.preferredJobSubmissionInterface = preferredJobSubmissionInterface;
     }
+
+    public String getHostName() {
+        return applicationContext.getComputeResourceDescription().getHostName();
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/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 696b61b..e8e4c66 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
@@ -302,6 +302,20 @@ public class BetterGfacImpl implements GFac,Watcher {
         jobExecutionContext.setGfac(this);
         jobExecutionContext.setZk(zk);
         jobExecutionContext.setCredentialStoreToken(AiravataZKUtils.getExpTokenId(zk, experimentID, taskID));
+
+        List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
+        if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
+            Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
+                @Override
+                public int compare(JobSubmissionInterface jobSubmissionInterface, JobSubmissionInterface jobSubmissionInterface2) {
+                    return jobSubmissionInterface.getPriorityOrder() - jobSubmissionInterface2.getPriorityOrder();
+                }
+            });
+
+            jobExecutionContext.setHostPrioritizedJobSubmissionInterfaces(jobSubmissionInterfaces);
+        }else {
+            throw new GFacException("Compute resource should have at least one job submission interface defined...");
+        }
         if (gatewayResourcePreferences != null ) {
             if (gatewayResourcePreferences.getScratchLocation() == null) {
                 gatewayResourcePreferences.setScratchLocation("/tmp");
@@ -326,22 +340,11 @@ public class BetterGfacImpl implements GFac,Watcher {
             jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
 
             jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
+            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+                jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
+                jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
+            }
         }
-
-        List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
-        if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
-            Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
-                @Override
-                public int compare(JobSubmissionInterface jobSubmissionInterface, JobSubmissionInterface jobSubmissionInterface2) {
-                    return jobSubmissionInterface.getPriorityOrder() - jobSubmissionInterface2.getPriorityOrder();
-                }
-            });
-
-            jobExecutionContext.setHostPrioritizedJobSubmissionInterfaces(jobSubmissionInterfaces);
-        }else {
-            throw new GFacException("Compute resource should have at least one job submission interface defined...");
-        }
-
         return jobExecutionContext;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
index 6ea1839..55da288 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
@@ -22,7 +22,6 @@ package org.apache.airavata.gfac.core.monitor;
 
 import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.workspace.experiment.JobState;
@@ -44,7 +43,7 @@ public class MonitorID {
 
     private Timestamp lastMonitored;
 
-    private HostDescription host;
+    private ComputeResourceDescription computeResourceDescription;
 
     private Map<String, Object> parameters;
 
@@ -67,7 +66,7 @@ public class MonitorID {
     public MonitorID() {
     }
     public MonitorID(MonitorID monitorID){
-        this.host = monitorID.getHost();
+        this.computeResourceDescription = monitorID.getComputeResourceDescription();
         this.jobStartedTime = new Timestamp((new Date()).getTime());
         this.userName = monitorID.getUserName();
         this.jobID = monitorID.getJobID();
@@ -76,8 +75,8 @@ public class MonitorID {
         this.workflowNodeID = monitorID.getWorkflowNodeID();
         this.jobName = monitorID.getJobName();
     }
-    public MonitorID(HostDescription host, String jobID, String taskID, String workflowNodeID, String experimentID, String userName,String jobName) {
-        this.host = host;
+    public MonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID, String experimentID, String userName,String jobName) {
+        this.computeResourceDescription = computeResourceDescription;
         this.jobStartedTime = new Timestamp((new Date()).getTime());
         this.userName = userName;
         this.jobID = jobID;
@@ -89,7 +88,7 @@ public class MonitorID {
 
     public MonitorID(JobExecutionContext jobExecutionContext) {
         this.jobExecutionContext = jobExecutionContext;
-        host = jobExecutionContext.getApplicationContext().getHostDescription();
+        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
         userName = jobExecutionContext.getExperiment().getUserName();
         taskID = jobExecutionContext.getTaskData().getTaskID();
         experimentID = jobExecutionContext.getExperiment().getExperimentID();
@@ -102,12 +101,12 @@ public class MonitorID {
         }
     }
 
-    public HostDescription getHost() {
-        return host;
+    public ComputeResourceDescription getComputeResourceDescription() {
+        return computeResourceDescription;
     }
 
-    public void setHost(HostDescription host) {
-        this.host = host;
+    public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
+        this.computeResourceDescription = computeResourceDescription;
     }
 
     public Timestamp getLastMonitored() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index b5a325a..92a50e4 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -20,6 +20,9 @@
 */
 package org.apache.airavata.gfac.gsissh.provider.impl;
 
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.ExecutionMode;
 import org.apache.airavata.gfac.GFacException;
@@ -36,11 +39,16 @@ import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.zookeeper.KeeperException;
@@ -48,6 +56,7 @@ import org.apache.zookeeper.ZooKeeper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.management.monitor.Monitor;
 import java.util.List;
 import java.util.Map;
 
@@ -76,14 +85,18 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
         log.info("Invoking GSISSH Provider Invoke ...");
         StringBuffer data = new StringBuffer();
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-        HostDescriptionType host = jobExecutionContext.getApplicationContext().
-                getHostDescription().getType();
-        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) jobExecutionContext.getApplicationContext().
-                getApplicationDeploymentDescription().getType();
+        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
+                .getComputeResourceDescription();
+        ApplicationDeploymentDescription appDeployDesc = jobExecutionContext.getApplicationContext()
+                .getApplicationDeploymentDescription();
         JobDetails jobDetails = new JobDetails();
         Cluster cluster = null;
-        
+
         try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(
+                    jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId());
+
             if (jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT) != null) {
                 cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getPbsCluster();
             }
@@ -93,7 +106,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
                 log.info("Successfully retrieved the Security Context");
             }
             // This installed path is a mandetory field, because this could change based on the computing resource
-            JobDescriptor jobDescriptor = GFACGSISSHUtils.createJobDescriptor(jobExecutionContext, app, cluster);
+            JobDescriptor jobDescriptor = GFACGSISSHUtils.createJobDescriptor(jobExecutionContext, cluster);
             jobDetails.setJobName(jobDescriptor.getJobName());
 
             log.info(jobDescriptor.toXML());
@@ -113,10 +126,10 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
 
             // Now job has submitted to the resource, its up to the Provider to parse the information to daemon handler
             // to perform monitoring, daemon handlers can be accessed from anywhere
-            delegateToMonitorHandlers(jobExecutionContext, (GsisshHostType) host, jobDetails.getJobID());
+            delegateToMonitorHandlers(jobExecutionContext, sshJobSubmission , jobDetails.getJobID());
             // we know this host is type GsiSSHHostType
         } catch (Exception e) {
-		    String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+		    String error = "Error submitting the job to host " + computeResourceDescription.getHostName() + " message: " + e.getMessage();
             log.error(error);
             jobDetails.setJobID("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
@@ -130,18 +143,18 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
           
     }
 
-    public void delegateToMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
+    public void delegateToMonitorHandlers(JobExecutionContext jobExecutionContext, SSHJobSubmission sshJobSubmission, String jobID) throws GFacHandlerException {
         List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }
         ThreadedHandler pullMonitorHandler = null;
         ThreadedHandler pushMonitorHandler = null;
-        String monitorMode = host.getMonitorMode();
+        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
         for (ThreadedHandler threadedHandler : daemonHandlers) {
             if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
                 pullMonitorHandler = threadedHandler;
-                if ("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PULL.equals(monitorMode)) {
+                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
                     log.info("Job is launched successfully now parsing it to monitoring in pull mode, JobID Returned:  " + jobID);
                     pullMonitorHandler.invoke(jobExecutionContext);
                 } else {
@@ -150,7 +163,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
                 }
             } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
                 pushMonitorHandler = threadedHandler;
-                if ("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PUSH.equals(monitorMode)) {
+                if (monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
                     log.info("Job is launched successfully now parsing it to monitoring in push mode, JobID Returned:  " + jobID);
                     pushMonitorHandler.invoke(jobExecutionContext);
                 } else {
@@ -166,18 +179,18 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
         }
     }
 
-    public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
+    public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, SSHJobSubmission sshJobSubmission, String jobID) throws GFacHandlerException {
         List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }
         ThreadedHandler pullMonitorHandler = null;
         ThreadedHandler pushMonitorHandler = null;
-        String monitorMode = host.getMonitorMode();
+        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
         for (ThreadedHandler threadedHandler : daemonHandlers) {
             if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
                 pullMonitorHandler = threadedHandler;
-                if ("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PULL.equals(monitorMode)) {
+                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
                     jobExecutionContext.setProperty("cancel","true");
                     pullMonitorHandler.invoke(jobExecutionContext);
                 } else {
@@ -186,7 +199,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
                 }
             } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
                 pushMonitorHandler = threadedHandler;
-                if ("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PUSH.equals(monitorMode)) {
+                if ( monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
                     pushMonitorHandler.invoke(jobExecutionContext);
                 } else {
                     log.error("Currently we only support Pull and Push monitoring and monitorMode should be PUSH" +
@@ -208,8 +221,6 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     public void cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
         //To change body of implemented methods use File | Settings | File Templates.
         log.info("canceling the job status in GSISSHProvider!!!!!");
-        HostDescriptionType host = jobExecutionContext.getApplicationContext().
-                getHostDescription().getType();
         JobDetails jobDetails = jobExecutionContext.getJobDetails();
         try {
             Cluster cluster = null;
@@ -236,14 +247,14 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
             // we know this host is type GsiSSHHostType
         } catch (SSHApiException e) {
-            String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
             log.error(error);
             jobDetails.setJobID("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
             GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
             throw new GFacProviderException(error, e);
         } catch (Exception e) {
-            String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
             log.error(error);
             jobDetails.setJobID("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
@@ -255,8 +266,8 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
         // have to implement the logic to recover a gfac failure
         log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
-        HostDescriptionType host = jobExecutionContext.getApplicationContext().
-                getHostDescription().getType();
+        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
+                .getComputeResourceDescription();
         String jobId = "";
         String jobDesc = "";
         try {
@@ -306,8 +317,11 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
                     throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
                 }
             }
-            delegateToMonitorHandlers(jobExecutionContext, (GsisshHostType) host, jobId);
-        } catch (GFacHandlerException e) {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(
+                    jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId());
+            delegateToMonitorHandlers(jobExecutionContext, sshJobSubmission, jobId);
+        } catch (Exception e) {
             throw new GFacProviderException("Error delegating already ran job to Monitoring", e);
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 2f9dbc3..baca65c 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -20,21 +20,19 @@
 */
 package org.apache.airavata.gfac.gsissh.util;
 
-import java.sql.SQLException;
-import java.util.*;
-
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.MappingFactory;
-import org.apache.airavata.credential.store.credential.Credential;
 import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
@@ -47,22 +45,26 @@ import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
 import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.FileArrayType;
-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.SSHHostType;
 import org.apache.airavata.schemas.gfac.StringArrayType;
 import org.apache.airavata.schemas.gfac.URIArrayType;
-import org.apache.airavata.schemas.gfac.UnicoreHostType;
-import org.apache.openjpa.lib.log.Log;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.validation.constraints.Max;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
 
 
 public class GFACGSISSHUtils {
@@ -74,32 +76,35 @@ public class GFACGSISSHUtils {
     public static int maxClusterCount = 5;
     public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
     public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
-        HostDescription registeredHost = jobExecutionContext.getApplicationContext().getHostDescription();
-        if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType() instanceof UnicoreHostType
-                || registeredHost.getType() instanceof SSHHostType) {
-            logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
-        } else if (registeredHost.getType() instanceof GsisshHostType) {
-            String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
-            RequestData requestData = new RequestData(ServerSettings.getDefaultUserGateway());
-            requestData.setTokenId(credentialStoreToken);
-            PBSCluster pbsCluster = null;
-            GSISecurityContext context = null;
-            try {
+        JobSubmissionInterface jobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+        JobSubmissionProtocol jobProtocol = jobSubmissionInterface.getJobSubmissionProtocol();
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+            if (jobProtocol == JobSubmissionProtocol.GLOBUS || jobProtocol == JobSubmissionProtocol.UNICORE
+                    || jobProtocol == JobSubmissionProtocol.CLOUD || jobProtocol == JobSubmissionProtocol.LOCAL) {
+                logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
+            } else if (jobProtocol == JobSubmissionProtocol.SSH && sshJobSubmission.getSecurityProtocol() == SecurityProtocol.GSI) {
+                String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
+                RequestData requestData = new RequestData(ServerSettings.getDefaultUserGateway());
+                requestData.setTokenId(credentialStoreToken);
+                PBSCluster pbsCluster = null;
+                GSISecurityContext context = null;
+
                 TokenizedMyProxyAuthInfo tokenizedMyProxyAuthInfo = new TokenizedMyProxyAuthInfo(requestData);
                 CredentialReader credentialReader = GFacUtils.getCredentialReader();
-                if(credentialReader != null){
-                	CertificateCredential credential = null;
-					try {
-						credential = (CertificateCredential)credentialReader.getCredential(ServerSettings.getDefaultUserGateway(), credentialStoreToken);
-			      		requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
-					} catch (Exception e) {
-						logger.error(e.getLocalizedMessage());
-					}
+                if (credentialReader != null) {
+                    CertificateCredential credential = null;
+                    try {
+                        credential = (CertificateCredential) credentialReader.getCredential(ServerSettings.getDefaultUserGateway(), credentialStoreToken);
+                        requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
+                    } catch (Exception e) {
+                        logger.error(e.getLocalizedMessage());
+                    }
                 }
 
-                GsisshHostType gsisshHostType = (GsisshHostType) registeredHost.getType();
-                String key = requestData.getMyProxyUserName() + registeredHost.getType().getHostAddress() +
-                        gsisshHostType.getPort();
+                String key = requestData.getMyProxyUserName() + jobExecutionContext.getHostName()+
+                        sshJobSubmission.getSshPort();
                 boolean recreate = false;
                 synchronized (clusters) {
                     if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
@@ -112,7 +117,7 @@ public class GFACGSISSHUtils {
                             clusters.get(key).remove(i);
                             recreate = true;
                         }
-                        if(!recreate) {
+                        if (!recreate) {
                             try {
                                 pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
                             } catch (Exception e) {
@@ -129,13 +134,12 @@ public class GFACGSISSHUtils {
                     }
 
                     if (recreate) {
-                        ServerInfo serverInfo = new ServerInfo(requestData.getMyProxyUserName(), registeredHost.getType().getHostAddress(),
-                                gsisshHostType.getPort());
+                        ServerInfo serverInfo = new ServerInfo(requestData.getMyProxyUserName(), jobExecutionContext.getHostName(),
+                                sshJobSubmission.getSshPort());
 
                         JobManagerConfiguration jConfig = null;
-                        String installedParentPath = ((HpcApplicationDeploymentType)
-                                jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType()).getInstalledParentPath();
-                        String jobManager = ((GsisshHostType) registeredHost.getType()).getJobManager();
+                        String installedParentPath = sshJobSubmission.getResourceJobManager().getJobManagerBinPath();
+                        String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
                         if (jobManager == null) {
                             logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
                             jConfig = CommonUtils.getPBSJobManager(installedParentPath);
@@ -160,28 +164,30 @@ public class GFACGSISSHUtils {
                         clusters.put(key, pbsClusters);
                     }
                 }
-            } catch (Exception e) {
-                throw new GFacException("An error occurred while creating GSI security context", e);
+
+                jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT, context);
             }
-            jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(), context);
+        } catch (Exception e) {
+            throw new GFacException("An error occurred while creating GSI security context", e);
         }
     }
 
-    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext,
-                                                    ApplicationDeploymentDescriptionType app, Cluster cluster) {
+    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) {
         JobDescriptor jobDescriptor = new JobDescriptor();
+        ApplicationContext applicationContext = jobExecutionContext.getApplicationContext();
+        ApplicationDeploymentDescription app = applicationContext.getApplicationDeploymentDescription();
         // this is common for any application descriptor
         jobDescriptor.setCallBackIp(ServerSettings.getIp());
         jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
-        jobDescriptor.setInputDirectory(app.getInputDataDirectory());
-        jobDescriptor.setOutputDirectory(app.getOutputDataDirectory());
-        jobDescriptor.setExecutablePath(app.getExecutableLocation());
-        jobDescriptor.setStandardOutFile(app.getStandardOutput());
-        jobDescriptor.setStandardErrorFile(app.getStandardError());
+        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
+        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
+        jobDescriptor.setExecutablePath(app.getExecutablePath());
+        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
+        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
         Random random = new Random();
         int i = random.nextInt(Integer.MAX_VALUE); // We always set the job name
         jobDescriptor.setJobName("A" + String.valueOf(i+99999999));
-        jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
+        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
 
         List<String> inputValues = new ArrayList<String>();
         MessageContext input = jobExecutionContext.getInMessageContext();

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
index baab7b4..28d13f2 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
@@ -30,12 +30,12 @@ import java.util.concurrent.BlockingQueue;
 
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.monitor.core.PushMonitor;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.gfac.monitor.util.AMQPConnectionUtil;
 import org.apache.airavata.gfac.monitor.util.CommonUtils;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
 import org.apache.airavata.model.workspace.experiment.JobState;
@@ -107,30 +107,37 @@ public class AMQPMonitor extends PushMonitor {
     @Override
     public boolean registerListener(MonitorID monitorID) throws AiravataMonitorException {
         // we subscribe to read user-host based subscription
-        HostDescription host = monitorID.getHost();
-        String hostAddress = host.getType().getHostAddress();
-        // in amqp case there are no multiple jobs per each host, because once a job is put in to the queue it
-        // will be picked by the Monitor, so jobs will not stay in this queueu but jobs will stay in finishQueue
-        String channelID = CommonUtils.getChannelID(monitorID);
-        if(availableChannels.get(channelID) == null){
-        try {
-            //todo need to fix this rather getting it from a file
-            Connection connection = AMQPConnectionUtil.connect(amqpHosts, connectionName, proxyPath);
-            Channel channel = null;
-            channel = connection.createChannel();
-            availableChannels.put(channelID, channel);
-            String queueName = channel.queueDeclare().getQueue();
-
-            BasicConsumer consumer = new
-                    BasicConsumer(new JSONMessageParser(), localPublisher);          // here we use local publisher
-            channel.basicConsume(queueName, true, consumer);
-            String filterString = CommonUtils.getRoutingKey(monitorID.getUserName(), hostAddress);
-            // here we queuebind to a particular user in a particular machine
-            channel.queueBind(queueName, "glue2.computing_activity", filterString);
-            logger.info("Using filtering string to monitor: " + filterString);
-        } catch (IOException e) {
-            logger.error("Error creating the connection to finishQueue the job:" + monitorID.getUserName());
-        }
+        ComputeResourceDescription computeResourceDescription = monitorID.getComputeResourceDescription();
+        if (computeResourceDescription.isSetIpAddresses() && computeResourceDescription.getIpAddresses().size() > 0) {
+            // we get first ip address for the moment
+            String hostAddress = computeResourceDescription.getIpAddresses().get(0);
+            // in amqp case there are no multiple jobs per each host, because once a job is put in to the queue it
+            // will be picked by the Monitor, so jobs will not stay in this queueu but jobs will stay in finishQueue
+            String channelID = CommonUtils.getChannelID(monitorID);
+            if (availableChannels.get(channelID) == null) {
+                try {
+                    //todo need to fix this rather getting it from a file
+                    Connection connection = AMQPConnectionUtil.connect(amqpHosts, connectionName, proxyPath);
+                    Channel channel = null;
+                    channel = connection.createChannel();
+                    availableChannels.put(channelID, channel);
+                    String queueName = channel.queueDeclare().getQueue();
+
+                    BasicConsumer consumer = new
+                            BasicConsumer(new JSONMessageParser(), localPublisher);          // here we use local publisher
+                    channel.basicConsume(queueName, true, consumer);
+                    String filterString = CommonUtils.getRoutingKey(monitorID.getUserName(), hostAddress);
+                    // here we queuebind to a particular user in a particular machine
+                    channel.queueBind(queueName, "glue2.computing_activity", filterString);
+                    logger.info("Using filtering string to monitor: " + filterString);
+                } catch (IOException e) {
+                    logger.error("Error creating the connection to finishQueue the job:" + monitorID.getUserName());
+                }
+            }
+        } else {
+            throw new AiravataMonitorException("Couldn't register monitor for jobId :" + monitorID.getJobID() +
+                    " , ComputeResourceDescription " + computeResourceDescription.getHostName() + " doesn't has an " +
+                    "IpAddress with it");
         }
         return true;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb626fa7/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
index 94528b9..a979890 100644
--- a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
+++ b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
@@ -20,15 +20,11 @@
 */
 package org.apache.airavata.job;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
 import org.apache.airavata.gsi.ssh.api.Cluster;
@@ -38,14 +34,29 @@ import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+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.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.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 
 public class AMQPMonitorTest {
 
@@ -54,12 +65,13 @@ public class AMQPMonitorTest {
     private String certificateLocation;
     private String pbsFilePath;
     private String workingDirectory;
-    private HostDescription hostDescription;
     private MonitorPublisher monitorPublisher;
     private BlockingQueue<MonitorID> finishQueue;
     private BlockingQueue<MonitorID> pushQueue;
     private Thread pushThread;
     private String proxyFilePath;
+    private ComputeResourceDescription computeResourceDescription;
+
     @Before
     public void setUp() throws Exception {
         System.setProperty("myproxy.username", "ogce");
@@ -98,14 +110,26 @@ public class AMQPMonitorTest {
         } catch (Exception e) {
             e.printStackTrace();
         }
+        computeResourceDescription = new ComputeResourceDescription("TestComputerResoruceId", "TestHostName");
+        computeResourceDescription.setHostName("stampede-host");
+        computeResourceDescription.addToIpAddresses("login1.stampede.tacc.utexas.edu");
+        ResourceJobManager resourceJobManager = new ResourceJobManager("1234", ResourceJobManagerType.SLURM);
+        Map<JobManagerCommand, String> commandMap = new HashMap<JobManagerCommand, String>();
+        commandMap.put(JobManagerCommand.SUBMISSION, "test");
+        resourceJobManager.setJobManagerCommands(commandMap);
+        resourceJobManager.setJobManagerBinPath("/usr/bin/");
+        resourceJobManager.setPushMonitoringEndpoint("push"); // TODO - add monitor mode
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission("TestSSHJobSubmissionInterfaceId", SecurityProtocol.GSI,
+                resourceJobManager);
+
+        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+        String jobSubmissionID = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
+
+        JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface(jobSubmissionID, JobSubmissionProtocol.SSH, 1);
+
+        computeResourceDescription.addToJobSubmissionInterfaces(jobSubmissionInterface);
+        computeResourceDescription.addToDataMovementInterfaces(new DataMovementInterface("4532", DataMovementProtocol.SCP, 1));
 
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("login1.stampede.tacc.utexas.edu");
-        hostDescription.getType().setHostName("stampede-host");
-        ((GsisshHostType) hostDescription.getType()).setJobManager("slurm");
-        ((GsisshHostType) hostDescription.getType()).setInstalledPath("/usr/bin/");
-        ((GsisshHostType) hostDescription.getType()).setPort(2222);
-        ((GsisshHostType) hostDescription.getType()).setMonitorMode("push");
     }
 
     @Test
@@ -151,7 +175,7 @@ public class AMQPMonitorTest {
         String jobID = pbsCluster.submitBatchJob(jobDescriptor);
         System.out.println(jobID);
         try {
-            pushQueue.add(new MonitorID(hostDescription, jobID,null,null,null, "ogce", jobName));
+            pushQueue.add(new MonitorID(computeResourceDescription, jobID,null,null,null, "ogce", jobName));
         } catch (Exception e) {
             e.printStackTrace();
         }


[22/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 806d317..20134a8 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -48,6 +48,7 @@ interface AiravataIf {
   public function registerApplicationModule(\Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule);
   public function getApplicationModule($appModuleId);
   public function updateApplicationModule($appModuleId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule);
+  public function getAllModules();
   public function deleteApplicationModule($appModuleId);
   public function registerApplicationDeployment(\Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment);
   public function getApplicationDeployment($appDeploymentId);
@@ -108,6 +109,13 @@ interface AiravataIf {
   public function getAllGatewayComputeResourcePreferences($gatewayID);
   public function updateGatewayComputeResourcePreference($gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference);
   public function deleteGatewayComputeResourcePreference($gatewayID, $computeResourceId);
+  public function getAllWorkflows();
+  public function getWorkflow($workflowTemplateId);
+  public function deleteWorkflow($workflowTemplateId);
+  public function registerWorkflow(\Airavata\Model\Workflow $workflow);
+  public function updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow);
+  public function getWorkflowTemplateId($workflowName);
+  public function isWorkflowExistWithName($workflowName);
 }
 
 class AiravataClient implements \Airavata\API\AiravataIf {
@@ -2004,6 +2012,65 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("updateApplicationModule failed: unknown result");
   }
 
+  public function getAllModules()
+  {
+    $this->send_getAllModules();
+    return $this->recv_getAllModules();
+  }
+
+  public function send_getAllModules()
+  {
+    $args = new \Airavata\API\Airavata_getAllModules_args();
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllModules', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllModules', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getAllModules()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllModules_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getAllModules_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getAllModules failed: unknown result");
+  }
+
   public function deleteApplicationModule($appModuleId)
   {
     $this->send_deleteApplicationModule($appModuleId);
@@ -5637,118 +5704,2352 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteGatewayComputeResourcePreference failed: unknown result");
   }
 
-}
-
-// HELPER FUNCTIONS AND STRUCTURES
+  public function getAllWorkflows()
+  {
+    $this->send_getAllWorkflows();
+    return $this->recv_getAllWorkflows();
+  }
 
-class Airavata_getAPIVersion_args {
-  static $_TSPEC;
+  public function send_getAllWorkflows()
+  {
+    $args = new \Airavata\API\Airavata_getAllWorkflows_args();
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllWorkflows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllWorkflows', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
 
+  public function recv_getAllWorkflows()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllWorkflows_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
 
-  public function __construct() {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        );
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getAllWorkflows_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
     }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getAllWorkflows failed: unknown result");
   }
 
-  public function getName() {
-    return 'Airavata_getAPIVersion_args';
+  public function getWorkflow($workflowTemplateId)
+  {
+    $this->send_getWorkflow($workflowTemplateId);
+    return $this->recv_getWorkflow();
   }
 
-  public function read($input)
+  public function send_getWorkflow($workflowTemplateId)
   {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
+    $args = new \Airavata\API\Airavata_getWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
     {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
+      thrift_protocol_write_binary($this->output_, 'getWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
     }
-    $xfer += $input->readStructEnd();
-    return $xfer;
   }
 
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_args');
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
+  public function recv_getWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getWorkflow failed: unknown result");
   }
 
-}
+  public function deleteWorkflow($workflowTemplateId)
+  {
+    $this->send_deleteWorkflow($workflowTemplateId);
+    $this->recv_deleteWorkflow();
+  }
 
-class Airavata_getAPIVersion_result {
-  static $_TSPEC;
+  public function send_deleteWorkflow($workflowTemplateId)
+  {
+    $args = new \Airavata\API\Airavata_deleteWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'deleteWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('deleteWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
 
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
+  public function recv_deleteWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
 
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
       }
+      $result = new \Airavata\API\Airavata_deleteWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
     }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    return;
   }
 
-  public function getName() {
-    return 'Airavata_getAPIVersion_result';
+  public function registerWorkflow(\Airavata\Model\Workflow $workflow)
+  {
+    $this->send_registerWorkflow($workflow);
+    return $this->recv_registerWorkflow();
   }
 
-  public function read($input)
+  public function send_registerWorkflow(\Airavata\Model\Workflow $workflow)
   {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
+    $args = new \Airavata\API\Airavata_registerWorkflow_args();
+    $args->workflow = $workflow;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'registerWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('registerWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_registerWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_registerWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("registerWorkflow failed: unknown result");
+  }
+
+  public function updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow)
+  {
+    $this->send_updateWorkflow($workflowTemplateId, $workflow);
+    $this->recv_updateWorkflow();
+  }
+
+  public function send_updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow)
+  {
+    $args = new \Airavata\API\Airavata_updateWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $args->workflow = $workflow;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'updateWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('updateWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_updateWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_updateWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    return;
+  }
+
+  public function getWorkflowTemplateId($workflowName)
+  {
+    $this->send_getWorkflowTemplateId($workflowName);
+    return $this->recv_getWorkflowTemplateId();
+  }
+
+  public function send_getWorkflowTemplateId($workflowName)
+  {
+    $args = new \Airavata\API\Airavata_getWorkflowTemplateId_args();
+    $args->workflowName = $workflowName;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getWorkflowTemplateId', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getWorkflowTemplateId', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getWorkflowTemplateId()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getWorkflowTemplateId_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getWorkflowTemplateId_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getWorkflowTemplateId failed: unknown result");
+  }
+
+  public function isWorkflowExistWithName($workflowName)
+  {
+    $this->send_isWorkflowExistWithName($workflowName);
+    return $this->recv_isWorkflowExistWithName();
+  }
+
+  public function send_isWorkflowExistWithName($workflowName)
+  {
+    $args = new \Airavata\API\Airavata_isWorkflowExistWithName_args();
+    $args->workflowName = $workflowName;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'isWorkflowExistWithName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('isWorkflowExistWithName', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_isWorkflowExistWithName()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_isWorkflowExistWithName_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_isWorkflowExistWithName_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("isWorkflowExistWithName failed: unknown result");
+  }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class Airavata_getAPIVersion_args {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getAPIVersion_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_args');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getAPIVersion_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getAPIVersion_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_createProject_args {
+  static $_TSPEC;
+
+  public $project = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'project',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Project',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['project'])) {
+        $this->project = $vals['project'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_createProject_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->project = new \Airavata\Model\Workspace\Project();
+            $xfer += $this->project->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_createProject_args');
+    if ($this->project !== null) {
+      if (!is_object($this->project)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('project', TType::STRUCT, 1);
+      $xfer += $this->project->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_createProject_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_createProject_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_createProject_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateProject_args {
+  static $_TSPEC;
+
+  public $projectId = null;
+  public $updatedProject = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'projectId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'updatedProject',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Project',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['projectId'])) {
+        $this->projectId = $vals['projectId'];
+      }
+      if (isset($vals['updatedProject'])) {
+        $this->updatedProject = $vals['updatedProject'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateProject_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->projectId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->updatedProject = new \Airavata\Model\Workspace\Project();
+            $xfer += $this->updatedProject->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateProject_args');
+    if ($this->projectId !== null) {
+      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
+      $xfer += $output->writeString($this->projectId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->updatedProject !== null) {
+      if (!is_object($this->updatedProject)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('updatedProject', TType::STRUCT, 2);
+      $xfer += $this->updatedProject->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateProject_result {
+  static $_TSPEC;
+
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+  public $pnfe = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        4 => array(
+          'var' => 'pnfe',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ProjectNotFoundException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['pnfe'])) {
+        $this->pnfe = $vals['pnfe'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateProject_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+            $xfer += $this->pnfe->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateProject_result');
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->pnfe !== null) {
+      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
+      $xfer += $this->pnfe->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getProject_args {
+  static $_TSPEC;
+
+  public $projectId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'projectId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['projectId'])) {
+        $this->projectId = $vals['projectId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getProject_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->projectId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getProject_args');
+    if ($this->projectId !== null) {
+      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
+      $xfer += $output->writeString($this->projectId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getProject_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+  public $pnfe = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Project',
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        4 => array(
+          'var' => 'pnfe',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ProjectNotFoundException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['pnfe'])) {
+        $this->pnfe = $vals['pnfe'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getProject_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Workspace\Project();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+            $xfer += $this->pnfe->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getProject_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->pnfe !== null) {
+      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
+      $xfer += $this->pnfe->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getAllUserProjects_args {
+  static $_TSPEC;
+
+  public $userName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getAllUserProjects_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getAllUserProjects_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getAllUserProjects_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Project',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getAllUserProjects_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\Workspace\Project();
+              $xfer += $elem5->read($input);
+              $this->success []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getAllUserProjects_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter6)
+          {
+            $xfer += $iter6->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchProjectsByProjectName_args {
+  static $_TSPEC;
+
+  public $userName = null;
+  public $projectName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'projectName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['projectName'])) {
+        $this->projectName = $vals['projectName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchProjectsByProjectName_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->projectName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchProjectsByProjectName_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->projectName !== null) {
+      $xfer += $output->writeFieldBegin('projectName', TType::STRING, 2);
+      $xfer += $output->writeString($this->projectName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchProjectsByProjectName_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Project',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchProjectsByProjectName_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size7 = 0;
+            $_etype10 = 0;
+            $xfer += $input->readListBegin($_etype10, $_size7);
+            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+            {
+              $elem12 = null;
+              $elem12 = new \Airavata\Model\Workspace\Project();
+              $xfer += $elem12->read($input);
+              $this->success []= $elem12;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchProjectsByProjectName_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter13)
+          {
+            $xfer += $iter13->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchProjectsByProjectDesc_args {
+  static $_TSPEC;
+
+  public $userName = null;
+  public $description = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchProjectsByProjectDesc_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchProjectsByProjectDesc_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchProjectsByProjectDesc_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Project',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchProjectsByProjectDesc_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size14 = 0;
+            $_etype17 = 0;
+            $xfer += $input->readListBegin($_etype17, $_size14);
+            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+            {
+              $elem19 = null;
+              $elem19 = new \Airavata\Model\Workspace\Project();
+              $xfer += $elem19->read($input);
+              $this->success []= $elem19;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchProjectsByProjectDesc_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchExperimentsByName_args {
+  static $_TSPEC;
+
+  public $userName = null;
+  public $expName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'expName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['expName'])) {
+        $this->expName = $vals['expName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByName_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->expName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByName_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->expName !== null) {
+      $xfer += $output->writeFieldBegin('expName', TType::STRING, 2);
+      $xfer += $output->writeString($this->expName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchExperimentsByName_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Experiment\ExperimentSummary',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByName_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size21 = 0;
+            $_etype24 = 0;
+            $xfer += $input->readListBegin($_etype24, $_size21);
+            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
+            {
+              $elem26 = null;
+              $elem26 = new \Airavata\Model\Workspace\Experiment\ExperimentSummary();
+              $xfer += $elem26->read($input);
+              $this->success []= $elem26;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByName_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter27)
+          {
+            $xfer += $iter27->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchExperimentsByDesc_args {
+  static $_TSPEC;
+
+  public $userName = null;
+  public $description = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByDesc_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true)
     {
@@ -5758,9 +8059,136 @@ class Airavata_getAPIVersion_result {
       }
       switch ($fid)
       {
-        case 0:
+        case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByDesc_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchExperimentsByDesc_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Experiment\ExperimentSummary',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByDesc_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size28 = 0;
+            $_etype31 = 0;
+            $xfer += $input->readListBegin($_etype31, $_size28);
+            for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
+            {
+              $elem33 = null;
+              $elem33 = new \Airavata\Model\Workspace\Experiment\ExperimentSummary();
+              $xfer += $elem33->read($input);
+              $this->success []= $elem33;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -5801,10 +8229,22 @@ class Airavata_getAPIVersion_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_result');
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByDesc_result');
     if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter34)
+          {
+            $xfer += $iter34->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -5829,30 +8269,37 @@ class Airavata_getAPIVersion_result {
 
 }
 
-class Airavata_createProject_args {
+class Airavata_searchExperimentsByApplication_args {
   static $_TSPEC;
 
-  public $project = null;
+  public $userName = null;
+  public $applicationId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'project',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Project',
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'applicationId',
+          'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['project'])) {
-        $this->project = $vals['project'];
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['applicationId'])) {
+        $this->applicationId = $vals['applicationId'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_createProject_args';
+    return 'Airavata_searchExperimentsByApplication_args';
   }
 
   public function read($input)
@@ -5871,9 +8318,15 @@ class Airavata_createProject_args {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->project = new \Airavata\Model\Workspace\Project();
-            $xfer += $this->project->read($input);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -5890,13 +8343,15 @@ class Airavata_createProject_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_createProject_args');
-    if ($this->project !== null) {
-      if (!is_object($this->project)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('project', TType::STRUCT, 1);
-      $xfer += $this->project->write($output);
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByApplication_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationId !== null) {
+      $xfer += $output->writeFieldBegin('applicationId', TType::STRING, 2);
+      $xfer += $output->writeString($this->applicationId);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -5906,7 +8361,7 @@ class Airavata_createProject_args {
 
 }
 
-class Airavata_createProject_result {
+class Airavata_searchExperimentsByApplication_result {
   static $_TSPEC;
 
   public $success = null;
@@ -5919,7 +8374,12 @@ class Airavata_createProject_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::STRING,
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Experiment\ExperimentSummary',
+            ),
           ),
         1 => array(
           'var' => 'ire',
@@ -5955,7 +8415,7 @@ class Airavata_createProject_result {
   }
 
   public function getName() {
-    return 'Airavata_createProject_result';
+    return 'Airavata_searchExperimentsByApplication_result';
   }
 
   public function read($input)
@@ -5974,8 +8434,19 @@ class Airavata_createProject_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size35 = 0;
+            $_etype38 = 0;
+            $xfer += $input->readListBegin($_etype38, $_size35);
+            for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
+            {
+              $elem40 = null;
+              $elem40 = new \Airavata\Model\Workspace\Experiment\ExperimentSummary();
+              $xfer += $elem40->read($input);
+              $this->success []= $elem40;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -6016,10 +8487,22 @@ class Airavata_createProject_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_createProject_result');
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByApplication_result');
     if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter41)
+          {
+            $xfer += $iter41->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -6044,38 +8527,37 @@ class Airavata_createProject_result {
 
 }
 
-class Airavata_updateProject_args {
+class Airavata_searchExperimentsByStatus_args {
   static $_TSPEC;
 
-  public $projectId = null;
-  public $updatedProject = null;
+  public $userName = null;
+  public $experimentState = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'projectId',
+          'var' => 'userName',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'updatedProject',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Project',
+          'var' => 'experimentState',
+          'type' => TType::I32,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['projectId'])) {
-        $this->projectId = $vals['projectId'];
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
       }
-      if (isset($vals['updatedProject'])) {
-        $this->updatedProject = $vals['updatedProject'];
+      if (isset($vals['experimentState'])) {
+        $this->experimentState = $vals['experimentState'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_updateProject_args';
+    return 'Airavata_searchExperimentsByStatus_args';
   }
 
   public function read($input)
@@ -6095,15 +8577,14 @@ class Airavata_updateProject_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectId);
+            $xfer += $input->readString($this->userName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->updatedProject = new \Airavata\Model\Workspace\Project();
-            $xfer += $this->updatedProject->read($input);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->experimentState);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -6120,18 +8601,15 @@ class Airavata_updateProject_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateProject_args');
-    if ($this->projectId !== null) {
-      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
-      $xfer += $output->writeString($this->projectId);
+    $xfer += $output->writeStructBegin('Airavata_searchExperimentsByStatus_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->updatedProject !== null) {
-      if (!is_object($this->updatedProject)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('updatedProject', TType::STRUCT, 2);
-      $xfer += $this->updatedProject->write($output);
+    if ($this->experime

<TRUNCATED>

[35/44] git commit: adding BES provider changes

Posted by ch...@apache.org.
adding BES provider changes


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/3f953e02
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/3f953e02
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/3f953e02

Branch: refs/heads/gfac_appcatalog_int
Commit: 3f953e026ab6a5341fe762f6a98fc6807d67ca29
Parents: eb626fa
Author: chathuriw <ka...@gmail.com>
Authored: Fri Oct 31 14:40:50 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:23:05 2014 -0500

----------------------------------------------------------------------
 .../gfac/bes/handlers/AbstractSMSHandler.java   |  74 ++--
 .../gfac/bes/provider/impl/BESProvider.java     | 378 +++++++++----------
 .../bes/security/UNICORESecurityContext.java    |   4 +-
 .../gfac/bes/utils/ApplicationProcessor.java    | 212 ++++-------
 .../airavata/gfac/core/utils/GFacUtils.java     |  23 +-
 .../apache/airavata/gfac/ec2/EC2Provider.java   |  15 +-
 6 files changed, 306 insertions(+), 400 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
index 8f6fcf4..71ca0db 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
@@ -2,6 +2,7 @@ package org.apache.airavata.gfac.bes.handlers;
 
 import java.util.Properties;
 
+import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.bes.security.UNICORESecurityContext;
 import org.apache.airavata.gfac.bes.security.X509SecurityContext;
@@ -13,6 +14,7 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.schemas.gfac.JobDirectoryModeDocument.JobDirectoryMode;
@@ -43,42 +45,42 @@ public abstract class AbstractSMSHandler implements BESConstants, GFacHandler{
 	@Override
 	public void invoke(JobExecutionContext jobExecutionContext)
 			throws GFacHandlerException {
-		
-		// if not SMS then not to pass further
-//		if(!isSMSEnabled(jobExecutionContext)) return;
-		
-		initSecurityProperties(jobExecutionContext);
-		
+		try {
+            initSecurityProperties(jobExecutionContext);
+            JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            JobSubmissionProtocol protocol = preferredJobSubmissionInterface.getJobSubmissionProtocol();
+            String interfaceId = preferredJobSubmissionInterface.getJobSubmissionInterfaceId();
+            String factoryUrl = null;
+            if (protocol.equals(JobSubmissionProtocol.UNICORE)) {
+                    UnicoreJobSubmission unicoreJobSubmission = GFacUtils.getUnicoreJobSubmission(interfaceId);
+                    factoryUrl = unicoreJobSubmission.getUnicoreEndPointURL();
+            }
+            storageClient = null;
 
-		
-		UnicoreHostType host = (UnicoreHostType) jobExecutionContext.getApplicationContext().getHostDescription()
-                .getType();
-        String factoryUrl = host.getUnicoreBESEndPointArray()[0];
-        
-        storageClient = null;
-        
-        if(!isSMSInstanceExisting(jobExecutionContext)) {
-            EndpointReferenceType eprt = EndpointReferenceType.Factory.newInstance();
-            eprt.addNewAddress().setStringValue(factoryUrl);
-            StorageCreator storageCreator = new StorageCreator(secProperties, factoryUrl, 5, null);
-            try {
-                storageClient = storageCreator.createStorage();
-            } catch (Exception e2) {
-                log.error("Cannot create storage..");
-                throw new GFacHandlerException("Cannot create storage..", e2);
+            if (!isSMSInstanceExisting(jobExecutionContext)) {
+                EndpointReferenceType eprt = EndpointReferenceType.Factory.newInstance();
+                eprt.addNewAddress().setStringValue(factoryUrl);
+                StorageCreator storageCreator = new StorageCreator(secProperties, factoryUrl, 5, null);
+                try {
+                    storageClient = storageCreator.createStorage();
+                } catch (Exception e2) {
+                    log.error("Cannot create storage..");
+                    throw new GFacHandlerException("Cannot create storage..", e2);
+                }
+                jobExecutionContext.setProperty(PROP_SMS_EPR, storageClient.getEPR());
+            } else {
+                EndpointReferenceType eprt = (EndpointReferenceType) jobExecutionContext.getProperty(PROP_SMS_EPR);
+                try {
+                    storageClient = new StorageClient(eprt, secProperties);
+                } catch (Exception e) {
+                    throw new GFacHandlerException("Cannot create storage..", e);
+                }
             }
-            jobExecutionContext.setProperty(PROP_SMS_EPR, storageClient.getEPR());
-        }
-        else {
-        	EndpointReferenceType eprt = (EndpointReferenceType)jobExecutionContext.getProperty(PROP_SMS_EPR);
-        		try {
-					storageClient = new StorageClient(eprt, secProperties);
-				} catch (Exception e) {
-					throw new GFacHandlerException("Cannot create storage..", e);
-				}
+            dataTransferrer = new DataTransferrer(jobExecutionContext, storageClient);
+        } catch (AppCatalogException e) {
+            throw new GFacHandlerException("Error occurred while retrieving unicore job submission interface..", e);
         }
-        dataTransferrer = new DataTransferrer(jobExecutionContext, storageClient);
-	}
+    }
 	
 	protected void initSecurityProperties(JobExecutionContext jobExecutionContext) throws GFacHandlerException{
 		log.debug("Initializing SMSInHandler security properties ..");
@@ -136,9 +138,9 @@ public abstract class AbstractSMSHandler implements BESConstants, GFacHandler{
 	 * of the job execution context.
 	 * */
 	protected boolean isSMSEnabled(JobExecutionContext jobExecutionContext){
-		if(((UnicoreHostType)jobExecutionContext.getApplicationContext().getHostDescription().getType()).getJobDirectoryMode() == JobDirectoryMode.SMS_BYTE_IO) {
-			return true;
-		}
+//		if(((UnicoreHostType)jobExecutionContext.getApplicationContext().getHostDescription().getType()).getJobDirectoryMode() == JobDirectoryMode.SMS_BYTE_IO) {
+//			return true;
+//		}
 		return false;
 	}
 	

http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index 7ed038a..398f05c 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -23,6 +23,7 @@ package org.apache.airavata.gfac.bes.provider.impl;
 import java.util.Calendar;
 import java.util.Map;
 
+import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.bes.security.UNICORESecurityContext;
@@ -40,6 +41,9 @@ import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.schemas.gfac.UnicoreHostType;
@@ -101,209 +105,165 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
 
 	public void execute(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException, GFacException {
-		UnicoreHostType host = (UnicoreHostType) jobExecutionContext
-				.getApplicationContext().getHostDescription().getType();
-
-		String factoryUrl = host.getUnicoreBESEndPointArray()[0];
-
-		EndpointReferenceType eprt = EndpointReferenceType.Factory
-				.newInstance();
-		eprt.addNewAddress().setStringValue(factoryUrl);
-
-		// WSUtilities.addServerIdentity(eprt, serverDN);
-
-		String userDN = getUserName(jobExecutionContext);
-
-		// TODO: to be removed
-		if (userDN == null || userDN.equalsIgnoreCase("admin")) {
-			userDN = "CN=zdv575, O=Ultrascan Gateway, C=DE";
-		}
-
-		StorageClient sc = null;
-
-		try {
-
-			CreateActivityDocument cad = CreateActivityDocument.Factory
-					.newInstance();
-			JobDefinitionDocument jobDefDoc = JobDefinitionDocument.Factory
-					.newInstance();
-
-//			String xlogin = getCNFromUserDN(userDN);
-
-			// create storage
-			StorageCreator storageCreator = new StorageCreator(secProperties,
-					factoryUrl, 5, null);
-
-			try {
-				sc = storageCreator.createStorage();
-			} catch (Exception e2) {
-				log.error("Cannot create storage..");
-				throw new GFacProviderException("Cannot create storage..", e2);
-			}
-
-			JobDefinitionType jobDefinition = jobDefDoc.addNewJobDefinition();
-			try {
-				jobDefinition = JSDLGenerator.buildJSDLInstance(
-						jobExecutionContext, sc.getUrl()).getJobDefinition();
-				cad.addNewCreateActivity().addNewActivityDocument()
-						.setJobDefinition(jobDefinition);
-				log.info("JSDL" + jobDefDoc.toString());
-			} catch (Exception e1) {
-				throw new GFacProviderException(
-						"Cannot generate JSDL instance from the JobExecutionContext.",
-						e1);
-			}
-
-			// upload files if any
-			DataTransferrer dt = new DataTransferrer(jobExecutionContext, sc);
-			dt.uploadLocalFiles();
-
-			FactoryClient factory = null;
-			JobDetails jobDetails = new JobDetails();
-
-			try {
-				factory = new FactoryClient(eprt, secProperties);
-			} catch (Exception e) {
-				throw new GFacProviderException(e.getLocalizedMessage(), e);
-			}
-			CreateActivityResponseDocument response = null;
-			try {
-				log.info(String.format("Activity Submitting to %s ... \n",
-						factoryUrl));
-				jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-				response = factory.createActivity(cad);
-				log.info(String.format("Activity Submitted to %s \n", factoryUrl));
-			} catch (Exception e) {
-				throw new GFacProviderException("Cannot create activity.", e);
-			}
-			EndpointReferenceType activityEpr = response.getCreateActivityResponse().getActivityIdentifier();
-
-			log.info("Activity : " + activityEpr.getAddress().getStringValue()	+ " Submitted.");
-
-			// factory.waitWhileActivityIsDone(activityEpr, 1000);
-			jobId = WSUtilities.extractResourceID(activityEpr);
-			if (jobId == null) {
-				jobId = new Long(Calendar.getInstance().getTimeInMillis())
-						.toString();
-			}
-			log.info("JobID: " + jobId);
-			jobDetails.setJobID(activityEpr.toString());
-			jobDetails.setJobDescription(activityEpr.toString());
-
-			jobExecutionContext.setJobDetails(jobDetails);
-			try {
-			log.info(formatStatusMessage(activityEpr.getAddress()
-					.getStringValue(), factory.getActivityStatus(activityEpr)
-					.toString()));
-
-			jobExecutionContext.getNotifier().publish(new UnicoreJobIDEvent(jobId));
-			GFacUtils.saveJobStatus(jobExecutionContext, details,JobState.SUBMITTED);
-
-			factory.getActivityStatus(activityEpr);
-			log.info(formatStatusMessage(activityEpr.getAddress()
-					.getStringValue(), factory.getActivityStatus(activityEpr)
-					.toString()));
-
-			// TODO publish the status messages to the message bus
-			while ((factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FINISHED)
-					&& (factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FAILED)
-					&& (factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.CANCELLED)) {
-
-				ActivityStatusType activityStatus = null;
-				try {
-					activityStatus = getStatus(factory, activityEpr);
-					JobState applicationJobStatus = getApplicationJobStatus(activityStatus);
-					String jobStatusMessage = "Status of job " + jobId + "is "
-							+ applicationJobStatus;
-					GFacUtils.updateJobStatus(jobExecutionContext, jobDetails,
-							applicationJobStatus);
-
-					jobExecutionContext.getNotifier().publish(
-							new StatusChangeEvent(jobStatusMessage));
-
-					// GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId,
-					// applicationJobStatus);
-				} catch (UnknownActivityIdentifierFault e) {
-					throw new GFacProviderException(e.getMessage(),
-							e.getCause());
-				}
-
-				try {
-					Thread.sleep(5000);
-				} catch (InterruptedException e) {
-				}
-				continue;
-			}
-			}catch(Exception e) {
-				throw new GFacProviderException(e.getMessage(),
-						e.getCause());
-				
-			}
-			
-			ActivityStatusType activityStatus = null;
-			try {
-				activityStatus = getStatus(factory, activityEpr);
-				log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(), activityStatus.getState().toString()));
-				ActivityClient activityClient;
-				activityClient = new ActivityClient(activityEpr,secProperties);
-				dt.setStorageClient(activityClient.getUspaceClient());
-			} catch (Exception e1) {
-				throw new GFacProviderException(e1.getMessage(),
-						e1.getCause());
-			}
-
-			
-
-			if ((activityStatus.getState() == ActivityStateEnumeration.FAILED)) {
-				String error = activityStatus.getFault().getFaultcode()
-						.getLocalPart()
-						+ "\n"
-						+ activityStatus.getFault().getFaultstring()
-						+ "\n EXITCODE: " + activityStatus.getExitCode();
-				log.info(error);
-				try {
-					Thread.sleep(5000);
-				} catch (InterruptedException e) {
-				}
-				dt.downloadStdOuts();
-			} else if (activityStatus.getState() == ActivityStateEnumeration.CANCELLED) {
-				JobState applicationJobStatus = JobState.CANCELED;
-				String jobStatusMessage = "Status of job " + jobId + "is "
-						+ applicationJobStatus;
-				jobExecutionContext.getNotifier().publish(
-						new StatusChangeEvent(jobStatusMessage));
-				GFacUtils.updateJobStatus(jobExecutionContext, jobDetails,
-						applicationJobStatus);
-				throw new GFacProviderException(
-						jobExecutionContext.getExperimentID() + "Job Canceled");
-			}
-
-			else if (activityStatus.getState() == ActivityStateEnumeration.FINISHED) {
-				try {
-					Thread.sleep(5000);
-				} catch (InterruptedException e) {
-				}
-				if (activityStatus.getExitCode() == 0) {
-					dt.downloadRemoteFiles();
-				} else {
-					dt.downloadStdOuts();
-				}
-			}
-
-		} finally {
-			// destroy sms instance
-			try {
-				if (sc != null) {
-					sc.destroy();
-				}
-			} catch (Exception e) {
-				log.warn(
-						"Cannot destroy temporary SMS instance:" + sc.getUrl(),
-						e);
-			}
-		}
-
-	}
+        StorageClient sc = null;
+        try {
+            JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            JobSubmissionProtocol protocol = preferredJobSubmissionInterface.getJobSubmissionProtocol();
+            String interfaceId = preferredJobSubmissionInterface.getJobSubmissionInterfaceId();
+            String factoryUrl = null;
+            if (protocol.equals(JobSubmissionProtocol.UNICORE)) {
+                UnicoreJobSubmission unicoreJobSubmission = GFacUtils.getUnicoreJobSubmission(interfaceId);
+                factoryUrl = unicoreJobSubmission.getUnicoreEndPointURL();
+            }
+            EndpointReferenceType eprt = EndpointReferenceType.Factory
+                    .newInstance();
+            eprt.addNewAddress().setStringValue(factoryUrl);
+            String userDN = getUserName(jobExecutionContext);
+
+            // TODO: to be removed
+            if (userDN == null || userDN.equalsIgnoreCase("admin")) {
+                userDN = "CN=zdv575, O=Ultrascan Gateway, C=DE";
+            }
+            CreateActivityDocument cad = CreateActivityDocument.Factory
+                    .newInstance();
+            JobDefinitionDocument jobDefDoc = JobDefinitionDocument.Factory
+                    .newInstance();
+
+            // create storage
+            StorageCreator storageCreator = new StorageCreator(secProperties,
+                    factoryUrl, 5, null);
+            sc = storageCreator.createStorage();
+
+            JobDefinitionType jobDefinition = JSDLGenerator.buildJSDLInstance(
+                    jobExecutionContext, sc.getUrl()).getJobDefinition();
+            cad.addNewCreateActivity().addNewActivityDocument()
+                    .setJobDefinition(jobDefinition);
+            log.info("JSDL" + jobDefDoc.toString());
+
+            // upload files if any
+            DataTransferrer dt = new DataTransferrer(jobExecutionContext, sc);
+            dt.uploadLocalFiles();
+
+            JobDetails jobDetails = new JobDetails();
+            FactoryClient factory = new FactoryClient(eprt, secProperties);
+
+            log.info(String.format("Activity Submitting to %s ... \n",
+                    factoryUrl));
+            jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
+            CreateActivityResponseDocument response = factory.createActivity(cad);
+            log.info(String.format("Activity Submitted to %s \n", factoryUrl));
+
+            EndpointReferenceType activityEpr = response.getCreateActivityResponse().getActivityIdentifier();
+
+            log.info("Activity : " + activityEpr.getAddress().getStringValue() + " Submitted.");
+
+            // factory.waitWhileActivityIsDone(activityEpr, 1000);
+            jobId = WSUtilities.extractResourceID(activityEpr);
+            if (jobId == null) {
+                jobId = new Long(Calendar.getInstance().getTimeInMillis())
+                        .toString();
+            }
+            log.info("JobID: " + jobId);
+            jobDetails.setJobID(activityEpr.toString());
+            jobDetails.setJobDescription(activityEpr.toString());
+
+            jobExecutionContext.setJobDetails(jobDetails);
+            log.info(formatStatusMessage(activityEpr.getAddress()
+                    .getStringValue(), factory.getActivityStatus(activityEpr)
+                    .toString()));
+
+            jobExecutionContext.getNotifier().publish(new UnicoreJobIDEvent(jobId));
+            GFacUtils.saveJobStatus(jobExecutionContext, details, JobState.SUBMITTED);
+
+            factory.getActivityStatus(activityEpr);
+            log.info(formatStatusMessage(activityEpr.getAddress()
+                    .getStringValue(), factory.getActivityStatus(activityEpr)
+                    .toString()));
+
+            // TODO publish the status messages to the message bus
+            while ((factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FINISHED)
+                    && (factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FAILED)
+                    && (factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.CANCELLED)) {
+
+                ActivityStatusType activityStatus = getStatus(factory, activityEpr);
+                JobState applicationJobStatus = getApplicationJobStatus(activityStatus);
+                String jobStatusMessage = "Status of job " + jobId + "is "
+                        + applicationJobStatus;
+                GFacUtils.updateJobStatus(jobExecutionContext, jobDetails,
+                        applicationJobStatus);
+
+                jobExecutionContext.getNotifier().publish(
+                        new StatusChangeEvent(jobStatusMessage));
+
+                // GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId,
+                // applicationJobStatus);
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e) {
+                }
+                continue;
+            }
+
+            ActivityStatusType activityStatus = null;
+            activityStatus = getStatus(factory, activityEpr);
+            log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(), activityStatus.getState().toString()));
+            ActivityClient activityClient;
+            activityClient = new ActivityClient(activityEpr, secProperties);
+            dt.setStorageClient(activityClient.getUspaceClient());
+
+            if ((activityStatus.getState() == ActivityStateEnumeration.FAILED)) {
+                String error = activityStatus.getFault().getFaultcode()
+                        .getLocalPart()
+                        + "\n"
+                        + activityStatus.getFault().getFaultstring()
+                        + "\n EXITCODE: " + activityStatus.getExitCode();
+                log.info(error);
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e) {
+                }
+                dt.downloadStdOuts();
+            } else if (activityStatus.getState() == ActivityStateEnumeration.CANCELLED) {
+                JobState applicationJobStatus = JobState.CANCELED;
+                String jobStatusMessage = "Status of job " + jobId + "is "
+                        + applicationJobStatus;
+                jobExecutionContext.getNotifier().publish(
+                        new StatusChangeEvent(jobStatusMessage));
+                GFacUtils.updateJobStatus(jobExecutionContext, jobDetails,
+                        applicationJobStatus);
+                throw new GFacProviderException(
+                        jobExecutionContext.getExperimentID() + "Job Canceled");
+            } else if (activityStatus.getState() == ActivityStateEnumeration.FINISHED) {
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e) {
+                }
+                if (activityStatus.getExitCode() == 0) {
+                    dt.downloadRemoteFiles();
+                } else {
+                    dt.downloadStdOuts();
+                }
+            }
+        } catch (AppCatalogException e) {
+            log.error("Error while retrieving UNICORE job submission..");
+            throw new GFacProviderException("Error while retrieving UNICORE job submission..", e);
+        } catch (Exception e) {
+            log.error("Cannot create storage..");
+            throw new GFacProviderException("Cannot create storage..", e);
+        } finally {
+            // destroy sms instance
+            try {
+                if (sc != null) {
+                    sc.destroy();
+                }
+            } catch (Exception e) {
+                log.warn(
+                        "Cannot destroy temporary SMS instance:" + sc.getUrl(),
+                        e);
+            }
+        }
+
+    }
 
 	private JobState getApplicationJobStatus(ActivityStatusType activityStatus) {
 		if (activityStatus == null) {
@@ -368,10 +328,14 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
 			// initSecurityProperties(jobExecutionContext);
 			EndpointReferenceType eprt = EndpointReferenceType.Factory
 					.parse(activityEpr);
-			UnicoreHostType host = (UnicoreHostType) jobExecutionContext
-					.getApplicationContext().getHostDescription().getType();
-
-			String factoryUrl = host.getUnicoreBESEndPointArray()[0];
+            JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            JobSubmissionProtocol protocol = preferredJobSubmissionInterface.getJobSubmissionProtocol();
+            String interfaceId = preferredJobSubmissionInterface.getJobSubmissionInterfaceId();
+            String factoryUrl = null;
+            if (protocol.equals(JobSubmissionProtocol.UNICORE)) {
+                UnicoreJobSubmission unicoreJobSubmission = GFacUtils.getUnicoreJobSubmission(interfaceId);
+                factoryUrl = unicoreJobSubmission.getUnicoreEndPointURL();
+            }
 			EndpointReferenceType epr = EndpointReferenceType.Factory
 					.newInstance();
 			epr.addNewAddress().setStringValue(factoryUrl);

http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
index 7285c2c..855335f 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
@@ -38,7 +38,7 @@ public class UNICORESecurityContext extends X509SecurityContext {
 	 * @return an instance of the default client configuration
 	 * @throws GFacException
 	 * @throws ApplicationSettingsException 
-	 * @throws GFacProviderException
+	 * @throws GFacException, ApplicationSettingsException
 	 */
 	public DefaultClientConfiguration getDefaultConfiguration() throws GFacException, ApplicationSettingsException {
 		try{
@@ -69,7 +69,7 @@ public class UNICORESecurityContext extends X509SecurityContext {
 	 * @param caKeyPath
 	 * @param caKeyPwd
 	 * @return
-	 * @throws GFacProviderException
+	 * @throws GFacException
 	 */
 	public DefaultClientConfiguration getServerSignedConfiguration(String userID, String userDN, String caCertPath, String caKeyPath, String caKeyPwd) throws GFacException {
 		try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ApplicationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ApplicationProcessor.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ApplicationProcessor.java
index d624340..ee58565 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ApplicationProcessor.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ApplicationProcessor.java
@@ -22,21 +22,18 @@
 package org.apache.airavata.gfac.bes.utils;
 
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.schemas.gfac.ExtendedKeyValueType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
-import org.apache.airavata.schemas.gfac.JobTypeType;
-import org.apache.airavata.schemas.gfac.NameValuePairType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.EnvironmentType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.FileNameType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.UserNameType;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.NumberOfProcessesType;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.ProcessesPerHostType;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.ThreadsPerProcessType;
 
-import java.io.File;
-
 
 public class ApplicationProcessor {
 	
@@ -47,40 +44,50 @@ public class ApplicationProcessor {
 			userName = "CN=zdv575, O=Ultrascan Gateway, C=DE";
 		}
 		
-		HpcApplicationDeploymentType appDepType = (HpcApplicationDeploymentType) context
-				.getApplicationContext().getApplicationDeploymentDescription()
-				.getType();
-		
-		createGenericApplication(value, appDepType);
-		
-		if (appDepType.getApplicationEnvironmentArray().length > 0) {
-			createApplicationEnvironment(value,
-					appDepType.getApplicationEnvironmentArray(), appDepType);
-		}
+		ApplicationDeploymentDescription appDep= context.getApplicationContext().getApplicationDeploymentDescription();
+        String appname = context.getApplicationContext().getApplicationInterfaceDescription().getApplicationName();
+        ApplicationParallelismType parallelism = appDep.getParallelism();
 
-		
-		if (appDepType.getExecutableLocation() != null) {
+        ApplicationType appType = JSDLUtils.getOrCreateApplication(value);
+        appType.setApplicationName(appname);
+        JSDLUtils.getOrCreateJobIdentification(value).setJobName(appname);
+
+//		if (appDep.getSetEnvironment().size() > 0) {
+//            createApplicationEnvironment(value, appDep.getSetEnvironment(), parallelism);
+//		}
+//
+        String stdout = context.getStandardOutput();
+        String stderr = context.getStandardError();
+        if (appDep.getExecutablePath() != null) {
 			FileNameType fNameType = FileNameType.Factory.newInstance();
-			fNameType.setStringValue(appDepType.getExecutableLocation());
-			if(isParallelJob(appDepType)) {
+			fNameType.setStringValue(appDep.getExecutablePath());
+			if(parallelism.equals(ApplicationParallelismType.MPI) || parallelism.equals(ApplicationParallelismType.OPENMP_MPI)) {
 				JSDLUtils.getOrCreateSPMDApplication(value).setExecutable(fNameType);
-				JSDLUtils.getSPMDApplication(value).setSPMDVariation(getSPMDVariation(appDepType));
-				
-				if(getValueFromMap(appDepType, JSDLUtils.NUMBEROFPROCESSES)!=null){
+                if (parallelism.equals(ApplicationParallelismType.OPENMP_MPI)){
+                    JSDLUtils.getSPMDApplication(value).setSPMDVariation(SPMDVariations.OpenMPI.value());
+                }else if (parallelism.equals(ApplicationParallelismType.MPI)){
+                    JSDLUtils.getSPMDApplication(value).setSPMDVariation(SPMDVariations.MPI.value());
+                }
+
+                int totalCPUCount = context.getTaskData().getTaskScheduling().getTotalCPUCount();
+                if(totalCPUCount > 0){
 					NumberOfProcessesType num = NumberOfProcessesType.Factory.newInstance();
-					num.setStringValue(getValueFromMap(appDepType, JSDLUtils.NUMBEROFPROCESSES));
+                    num.setStringValue(String.valueOf(totalCPUCount));
 					JSDLUtils.getSPMDApplication(value).setNumberOfProcesses(num);
 				}
-							
-				if(getValueFromMap(appDepType, JSDLUtils.PROCESSESPERHOST)!=null){
-					ProcessesPerHostType pph = ProcessesPerHostType.Factory.newInstance();
-					pph.setStringValue(getValueFromMap(appDepType, JSDLUtils.PROCESSESPERHOST));
-					JSDLUtils.getSPMDApplication(value).setProcessesPerHost(pph);
-				}
-				
-				if(getValueFromMap(appDepType, JSDLUtils.THREADSPERHOST)!=null){
+
+                int totalNodeCount = context.getTaskData().getTaskScheduling().getNodeCount();
+                if(totalNodeCount > 0){
+                    int ppn = totalCPUCount / totalNodeCount;
+                    ProcessesPerHostType pph = ProcessesPerHostType.Factory.newInstance();
+                    pph.setStringValue(String.valueOf(ppn));
+                    JSDLUtils.getSPMDApplication(value).setProcessesPerHost(pph);
+                }
+
+                int totalThreadCount = context.getTaskData().getTaskScheduling().getNumberOfThreads();
+                if(totalThreadCount > 0){
 					ThreadsPerProcessType tpp = ThreadsPerProcessType.Factory.newInstance();
-					tpp.setStringValue(getValueFromMap(appDepType, JSDLUtils.THREADSPERHOST));
+					tpp.setStringValue(String.valueOf(totalThreadCount));
 					JSDLUtils.getSPMDApplication(value).setThreadsPerProcess(tpp);
 					
 				}
@@ -90,6 +97,18 @@ public class ApplicationProcessor {
 					userNameType.setStringValue(userName);
 					JSDLUtils.getSPMDApplication(value).setUserName(userNameType);
 				}
+                if (stdout != null){
+                    FileNameType fName = FileNameType.Factory.newInstance();
+                    fName.setStringValue(stdout);
+                    JSDLUtils.getOrCreateSPMDApplication(value).setOutput(fName);
+                }
+                if (stderr != null){
+                    FileNameType fName = FileNameType.Factory.newInstance();
+                    fName.setStringValue(stderr);
+                    JSDLUtils.getOrCreateSPMDApplication(value).setError(fName);
+                }
+
+
 			}
 			else {
 				JSDLUtils.getOrCreatePOSIXApplication(value).setExecutable(fNameType);
@@ -98,17 +117,18 @@ public class ApplicationProcessor {
 					userNameType.setStringValue(userName);
 					JSDLUtils.getOrCreatePOSIXApplication(value).setUserName(userNameType);
 				}
+                if (stdout != null){
+                    FileNameType fName = FileNameType.Factory.newInstance();
+                    fName.setStringValue(stdout);
+                    JSDLUtils.getOrCreatePOSIXApplication(value).setOutput(fName);
+                }
+                if (stderr != null){
+                    FileNameType fName = FileNameType.Factory.newInstance();
+                    fName.setStringValue(stderr);
+                    JSDLUtils.getOrCreatePOSIXApplication(value).setError(fName);
+                }
 			}
 		}
-		
-
-		String stdout = (appDepType.getStandardOutput() != null) ? new File(appDepType.getStandardOutput()).getName(): "stdout"; 
-		ApplicationProcessor.setApplicationStdOut(value, appDepType, stdout);
-		
-	
-		String stderr = (appDepType.getStandardError() != null) ? new File(appDepType.getStandardError()).getName() : "stderr"; 
-		ApplicationProcessor.setApplicationStdErr(value, appDepType, stderr);
-	
 	}
 	
 	public static String getUserNameFromContext(JobExecutionContext jobContext) {
@@ -117,79 +137,7 @@ public class ApplicationProcessor {
 		//FIXME: Discuss to get user and change this
 		return "admin";
 	}
-	public static boolean isParallelJob(HpcApplicationDeploymentType appDepType) {
-		
-		boolean isParallel = false;
-		
-		if (appDepType.getJobType() != null) {
-			// TODO set data output directory
-			int status = appDepType.getJobType().intValue();
-
-			switch (status) {
-			// TODO: this check should be done outside this class
-			case JobTypeType.INT_MPI:
-			case JobTypeType.INT_OPEN_MP:
-				isParallel = true;
-				break;
-				
-			case JobTypeType.INT_SERIAL:
-			case JobTypeType.INT_SINGLE:
-				isParallel = false;
-				break;
 
-			default:
-				isParallel = false;
-				break;
-			}
-		}
-		return isParallel;
-	}
-
-	
-	public static void createApplicationEnvironment(JobDefinitionType value, NameValuePairType[] nameValuePairs, HpcApplicationDeploymentType appDepType) {
-		
-		if(isParallelJob(appDepType)) {
-			for (NameValuePairType nv : nameValuePairs) {
-				EnvironmentType envType = JSDLUtils.getOrCreateSPMDApplication(value).addNewEnvironment();
-				envType.setName(nv.getName());
-				envType.setStringValue(nv.getValue());
-			}
-		}
-		else {
-			for (NameValuePairType nv : nameValuePairs) {
-				EnvironmentType envType = JSDLUtils.getOrCreatePOSIXApplication(value).addNewEnvironment();
-				envType.setName(nv.getName());
-				envType.setStringValue(nv.getValue());
-			}
-		}
-
-	}
-	
-	
-	public static String getSPMDVariation (HpcApplicationDeploymentType appDepType) {
-		
-		String variation = null;
-		
-		if (appDepType.getJobType() != null) {
-			// TODO set data output directory
-			int status = appDepType.getJobType().intValue();
-
-			switch (status) {
-			// TODO: this check should be done outside this class
-			case JobTypeType.INT_MPI:
-				variation = SPMDVariations.MPI.value();				
-				break;
-				
-			case JobTypeType.INT_OPEN_MP:
-				variation = SPMDVariations.OpenMPI.value();
-				break;
-				
-			}
-		}
-		return variation;
-	}
-	
-	
 	public static void addApplicationArgument(JobDefinitionType value, HpcApplicationDeploymentType appDepType, String stringPrm) {
 		if(isParallelJob(appDepType)) 		
 			JSDLUtils.getOrCreateSPMDApplication(value)
@@ -200,24 +148,6 @@ public class ApplicationProcessor {
 
 	}
 	
-	public static void setApplicationStdErr(JobDefinitionType value, HpcApplicationDeploymentType appDepType, String stderr) {
-		FileNameType fName = FileNameType.Factory.newInstance();
-		fName.setStringValue(stderr);
-		if (isParallelJob(appDepType)) 
-			JSDLUtils.getOrCreateSPMDApplication(value).setError(fName);
-		else 
-			JSDLUtils.getOrCreatePOSIXApplication(value).setError(fName);
-	}
-	
-	public static void setApplicationStdOut(JobDefinitionType value, HpcApplicationDeploymentType appDepType, String stderr) {
-		FileNameType fName = FileNameType.Factory.newInstance();
-		fName.setStringValue(stderr);
-		if (isParallelJob(appDepType)) 
-			JSDLUtils.getOrCreateSPMDApplication(value).setOutput(fName);
-		else 
-			JSDLUtils.getOrCreatePOSIXApplication(value).setOutput(fName);
-	}
-	
 	public static String getApplicationStdOut(JobDefinitionType value, HpcApplicationDeploymentType appDepType) throws RuntimeException {
 		if (isParallelJob(appDepType)) return JSDLUtils.getOrCreateSPMDApplication(value).getOutput().getStringValue();
 		else return JSDLUtils.getOrCreatePOSIXApplication(value).getOutput().getStringValue();
@@ -228,18 +158,14 @@ public class ApplicationProcessor {
 		else return JSDLUtils.getOrCreatePOSIXApplication(value).getError().getStringValue();
 	}
 	
-	public static void createGenericApplication(JobDefinitionType value, HpcApplicationDeploymentType appDepType) {
-		if (appDepType.getApplicationName() != null) {
-			ApplicationType appType = JSDLUtils.getOrCreateApplication(value);
-			String appName = appDepType.getApplicationName()
-					.getStringValue();
-			appType.setApplicationName(appName);
-			JSDLUtils.getOrCreateJobIdentification(value).setJobName(appName);
-		}
-	}
-	
-	
-	public static String getValueFromMap(HpcApplicationDeploymentType appDepType, String name) {
+	public static void createGenericApplication(JobDefinitionType value, String appName) {
+        ApplicationType appType = JSDLUtils.getOrCreateApplication(value);
+        appType.setApplicationName(appName);
+        JSDLUtils.getOrCreateJobIdentification(value).setJobName(appName);
+    }
+
+
+    public static String getValueFromMap(HpcApplicationDeploymentType appDepType, String name) {
 		ExtendedKeyValueType[] extended = appDepType.getKeyValuePairsArray();
 		for(ExtendedKeyValueType e: extended) {
 			if(e.getName().equalsIgnoreCase(name)) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index ff6f2c2..b38808b 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -39,7 +39,9 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
+import org.apache.airavata.model.appcatalog.computeresource.GlobusJobSubmission;
 import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.model.workspace.experiment.DataType;
@@ -1258,21 +1260,34 @@ public class GFacUtils {
             AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
             return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
         }catch (Exception e){
-            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            String errorMsg = "Error while retrieving UNICORE job submission with submission id : " + submissionId;
             log.error(errorMsg, e);
             throw new AppCatalogException(errorMsg, e);
         }
     }
 
-    public static UnicoreJobSubmission getJobSubmission (String submissionId) throws AppCatalogException{
+    public static GlobusJobSubmission getGlobusJobSubmission (String submissionId) throws AppCatalogException{
+        return null;
+//        try {
+//            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+//            return appCatalog.getComputeResource().getGlobus(submissionId);
+//        }catch (Exception e){
+//            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+//            log.error(errorMsg, e);
+//            throw new AppCatalogException(errorMsg, e);
+//        }
+    }
+
+    public static SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException{
         try {
             AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-            return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
+            return appCatalog.getComputeResource().getSSHJobSubmission(submissionId);
         }catch (Exception e){
-            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            String errorMsg = "Error while retrieving SSH job submission with submission id : " + submissionId;
             log.error(errorMsg, e);
             throw new AppCatalogException(errorMsg, e);
         }
     }
 
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3f953e02/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
index 940fff3..5c5af53 100644
--- a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
+++ b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
@@ -38,6 +38,7 @@ import org.apache.airavata.gfac.core.provider.utils.ProviderUtils;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.ec2.util.AmazonEC2Util;
 import org.apache.airavata.gfac.ec2.util.EC2ProviderUtil;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.Ec2ApplicationDeploymentType;
@@ -90,7 +91,7 @@ public class EC2Provider extends AbstractProvider {
 
     public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException{
         if (jobExecutionContext != null) {
-    		jobId="EC2_"+jobExecutionContext.getApplicationContext().getHostDescription().getType().getHostAddress()+"_"+Calendar.getInstance().getTimeInMillis();
+    		jobId="EC2_"+jobExecutionContext.getHostName()+"_"+Calendar.getInstance().getTimeInMillis();
             if (jobExecutionContext.getSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT)
                     instanceof AmazonSecurityContext) {
                 this.amazonSecurityContext = (AmazonSecurityContext) jobExecutionContext.
@@ -156,10 +157,9 @@ public class EC2Provider extends AbstractProvider {
         try
         {
             String outParamName;
-            OutputParameterType[] outputParametersArray = jobExecutionContext.getApplicationContext().
-                    getServiceDescription().getType().getOutputParametersArray();
-            if(outputParametersArray != null) {
-                outParamName = outputParametersArray[0].getParameterName();
+            List<OutputDataObjectType> outputs = jobExecutionContext.getApplicationContext().getApplicationInterfaceDescription().getApplicationOutputs();
+            if(outputs != null && !outputs.isEmpty()) {
+                outParamName = outputs.get(0).getName();
             } else {
                 throw new GFacProviderException("Output parameter name is not set. Therefore, not being able " +
                         "to filter the job result from standard out ");
@@ -217,11 +217,10 @@ public class EC2Provider extends AbstractProvider {
             executionResult = executionResult.replace("\r","").replace("\n","");
             log.info("Result of the job : " + executionResult);
 
-            for(OutputParameterType outparamType : outputParametersArray){
+            for(OutputDataObjectType outparamType : outputs){
                 /* Assuming that there is just a single result. If you want to add more results, update the necessary
                    logic below */
-                String paramName = outparamType.getParameterName();
-                ActualParameter outParam = new ActualParameter();
+                String paramName = outparamType.getName();
                 outParam.getType().changeType(StringParameterType.type);
                 ((StringParameterType) outParam.getType()).setValue(executionResult);
                 jobExecutionContext.getOutMessageContext().addParameter(paramName, outParam);


[20/44] git commit: fixing issue with job submission commands

Posted by ch...@apache.org.
fixing issue with job submission commands


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/3fbf952f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/3fbf952f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/3fbf952f

Branch: refs/heads/gfac_appcatalog_int
Commit: 3fbf952f049ece58457ba6ecdb351e7f1dba84a9
Parents: 9cf6d0d
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 14:21:09 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 14:21:09 2014 -0500

----------------------------------------------------------------------
 .../application/catalog/data/impl/ComputeResourceImpl.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3fbf952f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 7917b23..3282fc2 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -776,7 +776,12 @@ public class ComputeResourceImpl implements ComputeResource {
                     Map<String, String> ids = new HashMap<String, String>();
                     ids.put(AbstractResource.JobManagerCommandConstants.RESOURCE_JOB_MANAGER_ID, resourceJobManagerId);
                     ids.put(AbstractResource.JobManagerCommandConstants.COMMAND_TYPE, commandType.toString());
-                    JobManagerCommandResource existingCommand = (JobManagerCommandResource)r.get(ids);
+                    JobManagerCommandResource existingCommand;
+                    if (r.isExists(ids)){
+                        existingCommand = (JobManagerCommandResource)r.get(ids);
+                    }else {
+                        existingCommand = new JobManagerCommandResource();
+                    }
                     existingCommand.setCommandType(commandType.toString());
                     existingCommand.setCommand(jobManagerCommands.get(commandType));
                     existingCommand.setResourceJobManagerId(resource.getResourceJobManagerId());


[11/44] fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
new file mode 100644
index 0000000..af96aa8
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
@@ -0,0 +1,8191 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.api;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class Workflow {
+
+  public interface Iface {
+
+    public List<String> getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public void deleteWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String getWorkflowTemplateId(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean isWorkflowExistWithName(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void getAllWorkflows(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void deleteWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void registerWorkflow(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getWorkflowTemplateId(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void isWorkflowExistWithName(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public List<String> getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getAllWorkflows();
+      return recv_getAllWorkflows();
+    }
+
+    public void send_getAllWorkflows() throws org.apache.thrift.TException
+    {
+      getAllWorkflows_args args = new getAllWorkflows_args();
+      sendBase("getAllWorkflows", args);
+    }
+
+    public List<String> recv_getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getAllWorkflows_result result = new getAllWorkflows_result();
+      receiveBase(result, "getAllWorkflows");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllWorkflows failed: unknown result");
+    }
+
+    public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getWorkflow(workflowTemplateId);
+      return recv_getWorkflow();
+    }
+
+    public void send_getWorkflow(String workflowTemplateId) throws org.apache.thrift.TException
+    {
+      getWorkflow_args args = new getWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      sendBase("getWorkflow", args);
+    }
+
+    public org.apache.airavata.model.Workflow recv_getWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getWorkflow_result result = new getWorkflow_result();
+      receiveBase(result, "getWorkflow");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkflow failed: unknown result");
+    }
+
+    public void deleteWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_deleteWorkflow(workflowTemplateId);
+      recv_deleteWorkflow();
+    }
+
+    public void send_deleteWorkflow(String workflowTemplateId) throws org.apache.thrift.TException
+    {
+      deleteWorkflow_args args = new deleteWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      sendBase("deleteWorkflow", args);
+    }
+
+    public void recv_deleteWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      deleteWorkflow_result result = new deleteWorkflow_result();
+      receiveBase(result, "deleteWorkflow");
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      return;
+    }
+
+    public String registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_registerWorkflow(workflow);
+      return recv_registerWorkflow();
+    }
+
+    public void send_registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.thrift.TException
+    {
+      registerWorkflow_args args = new registerWorkflow_args();
+      args.setWorkflow(workflow);
+      sendBase("registerWorkflow", args);
+    }
+
+    public String recv_registerWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      registerWorkflow_result result = new registerWorkflow_result();
+      receiveBase(result, "registerWorkflow");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerWorkflow failed: unknown result");
+    }
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_updateWorkflow(workflowTemplateId, workflow);
+      recv_updateWorkflow();
+    }
+
+    public void send_updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.thrift.TException
+    {
+      updateWorkflow_args args = new updateWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      args.setWorkflow(workflow);
+      sendBase("updateWorkflow", args);
+    }
+
+    public void recv_updateWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      updateWorkflow_result result = new updateWorkflow_result();
+      receiveBase(result, "updateWorkflow");
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      return;
+    }
+
+    public String getWorkflowTemplateId(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getWorkflowTemplateId(workflowName);
+      return recv_getWorkflowTemplateId();
+    }
+
+    public void send_getWorkflowTemplateId(String workflowName) throws org.apache.thrift.TException
+    {
+      getWorkflowTemplateId_args args = new getWorkflowTemplateId_args();
+      args.setWorkflowName(workflowName);
+      sendBase("getWorkflowTemplateId", args);
+    }
+
+    public String recv_getWorkflowTemplateId() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+      receiveBase(result, "getWorkflowTemplateId");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkflowTemplateId failed: unknown result");
+    }
+
+    public boolean isWorkflowExistWithName(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_isWorkflowExistWithName(workflowName);
+      return recv_isWorkflowExistWithName();
+    }
+
+    public void send_isWorkflowExistWithName(String workflowName) throws org.apache.thrift.TException
+    {
+      isWorkflowExistWithName_args args = new isWorkflowExistWithName_args();
+      args.setWorkflowName(workflowName);
+      sendBase("isWorkflowExistWithName", args);
+    }
+
+    public boolean recv_isWorkflowExistWithName() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+      receiveBase(result, "isWorkflowExistWithName");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isWorkflowExistWithName failed: unknown result");
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      super(protocolFactory, clientManager, transport);
+    }
+
+    public void getAllWorkflows(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllWorkflows_call method_call = new getAllWorkflows_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllWorkflows_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public getAllWorkflows_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllWorkflows", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllWorkflows_args args = new getAllWorkflows_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<String> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getAllWorkflows();
+      }
+    }
+
+    public void getWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getWorkflow_call method_call = new getWorkflow_call(workflowTemplateId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      public getWorkflow_call(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getWorkflow_args args = new getWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.Workflow getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getWorkflow();
+      }
+    }
+
+    public void deleteWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deleteWorkflow_call method_call = new deleteWorkflow_call(workflowTemplateId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deleteWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      public deleteWorkflow_call(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteWorkflow_args args = new deleteWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        (new Client(prot)).recv_deleteWorkflow();
+      }
+    }
+
+    public void registerWorkflow(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      registerWorkflow_call method_call = new registerWorkflow_call(workflow, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class registerWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.Workflow workflow;
+      public registerWorkflow_call(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflow = workflow;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerWorkflow_args args = new registerWorkflow_args();
+        args.setWorkflow(workflow);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_registerWorkflow();
+      }
+    }
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      updateWorkflow_call method_call = new updateWorkflow_call(workflowTemplateId, workflow, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class updateWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      private org.apache.airavata.model.Workflow workflow;
+      public updateWorkflow_call(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+        this.workflow = workflow;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        updateWorkflow_args args = new updateWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.setWorkflow(workflow);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        (new Client(prot)).recv_updateWorkflow();
+      }
+    }
+
+    public void getWorkflowTemplateId(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getWorkflowTemplateId_call method_call = new getWorkflowTemplateId_call(workflowName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getWorkflowTemplateId_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowName;
+      public getWorkflowTemplateId_call(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowName = workflowName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkflowTemplateId", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getWorkflowTemplateId_args args = new getWorkflowTemplateId_args();
+        args.setWorkflowName(workflowName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getWorkflowTemplateId();
+      }
+    }
+
+    public void isWorkflowExistWithName(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      isWorkflowExistWithName_call method_call = new isWorkflowExistWithName_call(workflowName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class isWorkflowExistWithName_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowName;
+      public isWorkflowExistWithName_call(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowName = workflowName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isWorkflowExistWithName", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        isWorkflowExistWithName_args args = new isWorkflowExistWithName_args();
+        args.setWorkflowName(workflowName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_isWorkflowExistWithName();
+      }
+    }
+
+  }
+
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("getAllWorkflows", new getAllWorkflows());
+      processMap.put("getWorkflow", new getWorkflow());
+      processMap.put("deleteWorkflow", new deleteWorkflow());
+      processMap.put("registerWorkflow", new registerWorkflow());
+      processMap.put("updateWorkflow", new updateWorkflow());
+      processMap.put("getWorkflowTemplateId", new getWorkflowTemplateId());
+      processMap.put("isWorkflowExistWithName", new isWorkflowExistWithName());
+      return processMap;
+    }
+
+    public static class getAllWorkflows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllWorkflows_args> {
+      public getAllWorkflows() {
+        super("getAllWorkflows");
+      }
+
+      public getAllWorkflows_args getEmptyArgsInstance() {
+        return new getAllWorkflows_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllWorkflows_result getResult(I iface, getAllWorkflows_args args) throws org.apache.thrift.TException {
+        getAllWorkflows_result result = new getAllWorkflows_result();
+        try {
+          result.success = iface.getAllWorkflows();
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class getWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWorkflow_args> {
+      public getWorkflow() {
+        super("getWorkflow");
+      }
+
+      public getWorkflow_args getEmptyArgsInstance() {
+        return new getWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getWorkflow_result getResult(I iface, getWorkflow_args args) throws org.apache.thrift.TException {
+        getWorkflow_result result = new getWorkflow_result();
+        try {
+          result.success = iface.getWorkflow(args.workflowTemplateId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class deleteWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteWorkflow_args> {
+      public deleteWorkflow() {
+        super("deleteWorkflow");
+      }
+
+      public deleteWorkflow_args getEmptyArgsInstance() {
+        return new deleteWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteWorkflow_result getResult(I iface, deleteWorkflow_args args) throws org.apache.thrift.TException {
+        deleteWorkflow_result result = new deleteWorkflow_result();
+        try {
+          iface.deleteWorkflow(args.workflowTemplateId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class registerWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerWorkflow_args> {
+      public registerWorkflow() {
+        super("registerWorkflow");
+      }
+
+      public registerWorkflow_args getEmptyArgsInstance() {
+        return new registerWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public registerWorkflow_result getResult(I iface, registerWorkflow_args args) throws org.apache.thrift.TException {
+        registerWorkflow_result result = new registerWorkflow_result();
+        try {
+          result.success = iface.registerWorkflow(args.workflow);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class updateWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateWorkflow_args> {
+      public updateWorkflow() {
+        super("updateWorkflow");
+      }
+
+      public updateWorkflow_args getEmptyArgsInstance() {
+        return new updateWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public updateWorkflow_result getResult(I iface, updateWorkflow_args args) throws org.apache.thrift.TException {
+        updateWorkflow_result result = new updateWorkflow_result();
+        try {
+          iface.updateWorkflow(args.workflowTemplateId, args.workflow);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class getWorkflowTemplateId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWorkflowTemplateId_args> {
+      public getWorkflowTemplateId() {
+        super("getWorkflowTemplateId");
+      }
+
+      public getWorkflowTemplateId_args getEmptyArgsInstance() {
+        return new getWorkflowTemplateId_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getWorkflowTemplateId_result getResult(I iface, getWorkflowTemplateId_args args) throws org.apache.thrift.TException {
+        getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+        try {
+          result.success = iface.getWorkflowTemplateId(args.workflowName);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class isWorkflowExistWithName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isWorkflowExistWithName_args> {
+      public isWorkflowExistWithName() {
+        super("isWorkflowExistWithName");
+      }
+
+      public isWorkflowExistWithName_args getEmptyArgsInstance() {
+        return new isWorkflowExistWithName_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public isWorkflowExistWithName_result getResult(I iface, isWorkflowExistWithName_args args) throws org.apache.thrift.TException {
+        isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+        try {
+          result.success = iface.isWorkflowExistWithName(args.workflowName);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+  }
+
+  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+    public AsyncProcessor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+    }
+
+    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      processMap.put("getAllWorkflows", new getAllWorkflows());
+      processMap.put("getWorkflow", new getWorkflow());
+      processMap.put("deleteWorkflow", new deleteWorkflow());
+      processMap.put("registerWorkflow", new registerWorkflow());
+      processMap.put("updateWorkflow", new updateWorkflow());
+      processMap.put("getWorkflowTemplateId", new getWorkflowTemplateId());
+      processMap.put("isWorkflowExistWithName", new isWorkflowExistWithName());
+      return processMap;
+    }
+
+    public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
+      public getAllWorkflows() {
+        super("getAllWorkflows");
+      }
+
+      public getAllWorkflows_args getEmptyArgsInstance() {
+        return new getAllWorkflows_args();
+      }
+
+      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<String>>() { 
+          public void onComplete(List<String> o) {
+            getAllWorkflows_result result = new getAllWorkflows_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllWorkflows_result result = new getAllWorkflows_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllWorkflows_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+        iface.getAllWorkflows(resultHandler);
+      }
+    }
+
+    public static class getWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflow_args, org.apache.airavata.model.Workflow> {
+      public getWorkflow() {
+        super("getWorkflow");
+      }
+
+      public getWorkflow_args getEmptyArgsInstance() {
+        return new getWorkflow_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.Workflow> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.Workflow>() { 
+          public void onComplete(org.apache.airavata.model.Workflow o) {
+            getWorkflow_result result = new getWorkflow_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getWorkflow_result result = new getWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.Workflow> resultHandler) throws TException {
+        iface.getWorkflow(args.workflowTemplateId,resultHandler);
+      }
+    }
+
+    public static class deleteWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteWorkflow_args, Void> {
+      public deleteWorkflow() {
+        super("deleteWorkflow");
+      }
+
+      public deleteWorkflow_args getEmptyArgsInstance() {
+        return new deleteWorkflow_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            deleteWorkflow_result result = new deleteWorkflow_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            deleteWorkflow_result result = new deleteWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, deleteWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.deleteWorkflow(args.workflowTemplateId,resultHandler);
+      }
+    }
+
+    public static class registerWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerWorkflow_args, String> {
+      public registerWorkflow() {
+        super("registerWorkflow");
+      }
+
+      public registerWorkflow_args getEmptyArgsInstance() {
+        return new registerWorkflow_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerWorkflow_result result = new registerWorkflow_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            registerWorkflow_result result = new registerWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, registerWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerWorkflow(args.workflow,resultHandler);
+      }
+    }
+
+    public static class updateWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateWorkflow_args, Void> {
+      public updateWorkflow() {
+        super("updateWorkflow");
+      }
+
+      public updateWorkflow_args getEmptyArgsInstance() {
+        return new updateWorkflow_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            updateWorkflow_result result = new updateWorkflow_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            updateWorkflow_result result = new updateWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, updateWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.updateWorkflow(args.workflowTemplateId, args.workflow,resultHandler);
+      }
+    }
+
+    public static class getWorkflowTemplateId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflowTemplateId_args, String> {
+      public getWorkflowTemplateId() {
+        super("getWorkflowTemplateId");
+      }
+
+      public getWorkflowTemplateId_args getEmptyArgsInstance() {
+        return new getWorkflowTemplateId_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getWorkflowTemplateId_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.getWorkflowTemplateId(args.workflowName,resultHandler);
+      }
+    }
+
+    public static class isWorkflowExistWithName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isWorkflowExistWithName_args, Boolean> {
+      public isWorkflowExistWithName() {
+        super("isWorkflowExistWithName");
+      }
+
+      public isWorkflowExistWithName_args getEmptyArgsInstance() {
+        return new isWorkflowExistWithName_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, isWorkflowExistWithName_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.isWorkflowExistWithName(args.workflowName,resultHandler);
+      }
+    }
+
+  }
+
+  public static class getAllWorkflows_args implements org.apache.thrift.TBase<getAllWorkflows_args, getAllWorkflows_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllWorkflows_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllWorkflows_args");
+
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getAllWorkflows_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllWorkflows_argsTupleSchemeFactory());
+    }
+
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllWorkflows_args.class, metaDataMap);
+    }
+
+    public getAllWorkflows_args() {
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllWorkflows_args(getAllWorkflows_args other) {
+    }
+
+    public getAllWorkflows_args deepCopy() {
+      return new getAllWorkflows_args(this);
+    }
+
+    @Override
+    public void clear() {
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllWorkflows_args)
+        return this.equals((getAllWorkflows_args)that);
+      return false;
+    }
+
+    public boolean equals(getAllWorkflows_args that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getAllWorkflows_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getAllWorkflows_args(");
+      boolean first = true;
+
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getAllWorkflows_argsStandardSchemeFactory implements SchemeFactory {
+      public getAllWorkflows_argsStandardScheme getScheme() {
+        return new getAllWorkflows_argsStandardScheme();
+      }
+    }
+
+    private static class getAllWorkflows_argsStandardScheme extends StandardScheme<getAllWorkflows_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllWorkflows_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllWorkflows_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getAllWorkflows_argsTupleSchemeFactory implements SchemeFactory {
+      public getAllWorkflows_argsTupleScheme getScheme() {
+        return new getAllWorkflows_argsTupleScheme();
+      }
+    }
+
+    private static class getAllWorkflows_argsTupleScheme extends TupleScheme<getAllWorkflows_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllWorkflows_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllWorkflows_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
+  }
+
+  public static class getAllWorkflows_result implements org.apache.thrift.TBase<getAllWorkflows_result, getAllWorkflows_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllWorkflows_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllWorkflows_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+    private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getAllWorkflows_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllWorkflows_resultTupleSchemeFactory());
+    }
+
+    public List<String> success; // required
+    public org.apache.airavata.model.error.InvalidRequestException ire; // required
+    public org.apache.airavata.model.error.AiravataClientException ace; // required
+    public org.apache.airavata.model.error.AiravataSystemException ase; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      IRE((short)1, "ire"),
+      ACE((short)2, "ace"),
+      ASE((short)3, "ase");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // IRE
+            return IRE;
+          case 2: // ACE
+            return ACE;
+          case 3: // ASE
+            return ASE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+      tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllWorkflows_result.class, metaDataMap);
+    }
+
+    public getAllWorkflows_result() {
+    }
+
+    public getAllWorkflows_result(
+      List<String> success,
+      org.apache.airavata.model.error.InvalidRequestException ire,
+      org.apache.airavata.model.error.AiravataClientException ace,
+      org.apache.airavata.model.error.AiravataSystemException ase)
+    {
+      this();
+      this.success = success;
+      this.ire = ire;
+      this.ace = ace;
+      this.ase = ase;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllWorkflows_result(getAllWorkflows_result other) {
+      if (other.isSetSuccess()) {
+        List<String> __this__success = new ArrayList<String>(other.success);
+        this.success = __this__success;
+      }
+      if (other.isSetIre()) {
+        this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+      }
+      if (other.isSetAce()) {
+        this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+      }
+      if (other.isSetAse()) {
+        this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+      }
+    }
+
+    public getAllWorkflows_result deepCopy() {
+      return new getAllWorkflows_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.ire = null;
+      this.ace = null;
+      this.ase = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<String> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(String elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<String>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<String> getSuccess() {
+      return this.success;
+    }
+
+    public getAllWorkflows_result setSuccess(List<String> success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.InvalidRequestException getIre() {
+      return this.ire;
+    }
+
+    public getAllWorkflows_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+      this.ire = ire;
+      return this;
+    }
+
+    public void unsetIre() {
+      this.ire = null;
+    }
+
+    /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+    public boolean isSetIre() {
+      return this.ire != null;
+    }
+
+    public void setIreIsSet(boolean value) {
+      if (!value) {
+        this.ire = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataClientException getAce() {
+      return this.ace;
+    }
+
+    public getAllWorkflows_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+      this.ace = ace;
+      return this;
+    }
+
+    public void unsetAce() {
+      this.ace = null;
+    }
+
+    /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+    public boolean isSetAce() {
+      return this.ace != null;
+    }
+
+    public void setAceIsSet(boolean value) {
+      if (!value) {
+        this.ace = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataSystemException getAse() {
+      return this.ase;
+    }
+
+    public getAllWorkflows_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+      this.ase = ase;
+      return this;
+    }
+
+    public void unsetAse() {
+      this.ase = null;
+    }
+
+    /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+    public boolean isSetAse() {
+      return this.ase != null;
+    }
+
+    public void setAseIsSet(boolean value) {
+      if (!value) {
+        this.ase = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((List<String>)value);
+        }
+        break;
+
+      case IRE:
+        if (value == null) {
+          unsetIre();
+        } else {
+          setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+        }
+        break;
+
+      case ACE:
+        if (value == null) {
+          unsetAce();
+        } else {
+          setAce((org.apache.airavata.model.error.AiravataClientException)value);
+        }
+        break;
+
+      case ASE:
+        if (value == null) {
+          unsetAse();
+        } else {
+          setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      case IRE:
+        return getIre();
+
+      case ACE:
+        return getAce();
+
+      case ASE:
+        return getAse();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case IRE:
+        return isSetIre();
+      case ACE:
+        return isSetAce();
+      case ASE:
+        return isSetAse();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllWorkflows_result)
+        return this.equals((getAllWorkflows_result)that);
+      return false;
+    }
+
+    public boolean equals(getAllWorkflows_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ire = true && this.isSetIre();
+      boolean that_present_ire = true && that.isSetIre();
+      if (this_present_ire || that_present_ire) {
+        if (!(this_present_ire && that_present_ire))
+          return false;
+        if (!this.ire.equals(that.ire))
+          return false;
+      }
+
+      boolean this_present_ace = true && this.isSetAce();
+      boolean that_present_ace = true && that.isSetAce();
+      if (this_present_ace || that_present_ace) {
+        if (!(this_present_ace && that_present_ace))
+          return false;
+        if (!this.ace.equals(that.ace))
+          return false;
+      }
+
+      boolean this_present_ase = true && this.isSetAse();
+      boolean that_present_ase = true && that.isSetAse();
+      if (this_present_ase || that_present_ase) {
+        if (!(this_present_ase && that_present_ase))
+          return false;
+        if (!this.ase.equals(that.ase))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getAllWorkflows_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIre()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAce()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAse()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getAllWorkflows_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ire:");
+      if (this.ire == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ire);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ace:");
+      if (this.ace == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ace);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ase:");
+      if (this.ase == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ase);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private

<TRUNCATED>

[14/44] git commit: missing generate code for AIRAVATA-1471

Posted by ch...@apache.org.
missing generate code for AIRAVATA-1471


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/306464c3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/306464c3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/306464c3

Branch: refs/heads/gfac_appcatalog_int
Commit: 306464c376fb14465bbf2566e81eea422dfb906b
Parents: a3cef49
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Oct 30 15:12:32 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Oct 30 15:12:32 2014 -0400

----------------------------------------------------------------------
 .../resources/lib/Airavata/API/Workflow.php     | 1927 ++++++++++++++++++
 1 file changed, 1927 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/306464c3/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
new file mode 100644
index 0000000..720286c
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
@@ -0,0 +1,1927 @@
+<?php
+namespace Airavata\API;
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+interface WorkflowIf {
+  public function getAllWorkflows();
+  public function getWorkflow($workflowTemplateId);
+  public function deleteWorkflow($workflowTemplateId);
+  public function registerWorkflow(\Airavata\Model\Workflow $workflow);
+  public function updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow);
+  public function getWorkflowTemplateId($workflowName);
+  public function isWorkflowExistWithName($workflowName);
+}
+
+class WorkflowClient implements \Airavata\API\WorkflowIf {
+  protected $input_ = null;
+  protected $output_ = null;
+
+  protected $seqid_ = 0;
+
+  public function __construct($input, $output=null) {
+    $this->input_ = $input;
+    $this->output_ = $output ? $output : $input;
+  }
+
+  public function getAllWorkflows()
+  {
+    $this->send_getAllWorkflows();
+    return $this->recv_getAllWorkflows();
+  }
+
+  public function send_getAllWorkflows()
+  {
+    $args = new \Airavata\API\Workflow_getAllWorkflows_args();
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllWorkflows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllWorkflows', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getAllWorkflows()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_getAllWorkflows_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_getAllWorkflows_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getAllWorkflows failed: unknown result");
+  }
+
+  public function getWorkflow($workflowTemplateId)
+  {
+    $this->send_getWorkflow($workflowTemplateId);
+    return $this->recv_getWorkflow();
+  }
+
+  public function send_getWorkflow($workflowTemplateId)
+  {
+    $args = new \Airavata\API\Workflow_getWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_getWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_getWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getWorkflow failed: unknown result");
+  }
+
+  public function deleteWorkflow($workflowTemplateId)
+  {
+    $this->send_deleteWorkflow($workflowTemplateId);
+    $this->recv_deleteWorkflow();
+  }
+
+  public function send_deleteWorkflow($workflowTemplateId)
+  {
+    $args = new \Airavata\API\Workflow_deleteWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'deleteWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('deleteWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_deleteWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_deleteWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_deleteWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    return;
+  }
+
+  public function registerWorkflow(\Airavata\Model\Workflow $workflow)
+  {
+    $this->send_registerWorkflow($workflow);
+    return $this->recv_registerWorkflow();
+  }
+
+  public function send_registerWorkflow(\Airavata\Model\Workflow $workflow)
+  {
+    $args = new \Airavata\API\Workflow_registerWorkflow_args();
+    $args->workflow = $workflow;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'registerWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('registerWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_registerWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_registerWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_registerWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("registerWorkflow failed: unknown result");
+  }
+
+  public function updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow)
+  {
+    $this->send_updateWorkflow($workflowTemplateId, $workflow);
+    $this->recv_updateWorkflow();
+  }
+
+  public function send_updateWorkflow($workflowTemplateId, \Airavata\Model\Workflow $workflow)
+  {
+    $args = new \Airavata\API\Workflow_updateWorkflow_args();
+    $args->workflowTemplateId = $workflowTemplateId;
+    $args->workflow = $workflow;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'updateWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('updateWorkflow', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_updateWorkflow()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_updateWorkflow_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_updateWorkflow_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    return;
+  }
+
+  public function getWorkflowTemplateId($workflowName)
+  {
+    $this->send_getWorkflowTemplateId($workflowName);
+    return $this->recv_getWorkflowTemplateId();
+  }
+
+  public function send_getWorkflowTemplateId($workflowName)
+  {
+    $args = new \Airavata\API\Workflow_getWorkflowTemplateId_args();
+    $args->workflowName = $workflowName;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getWorkflowTemplateId', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getWorkflowTemplateId', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getWorkflowTemplateId()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_getWorkflowTemplateId_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_getWorkflowTemplateId_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getWorkflowTemplateId failed: unknown result");
+  }
+
+  public function isWorkflowExistWithName($workflowName)
+  {
+    $this->send_isWorkflowExistWithName($workflowName);
+    return $this->recv_isWorkflowExistWithName();
+  }
+
+  public function send_isWorkflowExistWithName($workflowName)
+  {
+    $args = new \Airavata\API\Workflow_isWorkflowExistWithName_args();
+    $args->workflowName = $workflowName;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'isWorkflowExistWithName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('isWorkflowExistWithName', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_isWorkflowExistWithName()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Workflow_isWorkflowExistWithName_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Workflow_isWorkflowExistWithName_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("isWorkflowExistWithName failed: unknown result");
+  }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class Workflow_getAllWorkflows_args {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getAllWorkflows_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getAllWorkflows_args');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_getAllWorkflows_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getAllWorkflows_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size180 = 0;
+            $_etype183 = 0;
+            $xfer += $input->readListBegin($_etype183, $_size180);
+            for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
+            {
+              $elem185 = null;
+              $xfer += $input->readString($elem185);
+              $this->success []= $elem185;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getAllWorkflows_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRING, count($this->success));
+        {
+          foreach ($this->success as $iter186)
+          {
+            $xfer += $output->writeString($iter186);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_getWorkflow_args {
+  static $_TSPEC;
+
+  public $workflowTemplateId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflowTemplateId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflowTemplateId'])) {
+        $this->workflowTemplateId = $vals['workflowTemplateId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getWorkflow_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workflowTemplateId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getWorkflow_args');
+    if ($this->workflowTemplateId !== null) {
+      $xfer += $output->writeFieldBegin('workflowTemplateId', TType::STRING, 1);
+      $xfer += $output->writeString($this->workflowTemplateId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_getWorkflow_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workflow',
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getWorkflow_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Workflow();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getWorkflow_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_deleteWorkflow_args {
+  static $_TSPEC;
+
+  public $workflowTemplateId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflowTemplateId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflowTemplateId'])) {
+        $this->workflowTemplateId = $vals['workflowTemplateId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_deleteWorkflow_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workflowTemplateId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_deleteWorkflow_args');
+    if ($this->workflowTemplateId !== null) {
+      $xfer += $output->writeFieldBegin('workflowTemplateId', TType::STRING, 1);
+      $xfer += $output->writeString($this->workflowTemplateId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_deleteWorkflow_result {
+  static $_TSPEC;
+
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_deleteWorkflow_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_deleteWorkflow_result');
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_registerWorkflow_args {
+  static $_TSPEC;
+
+  public $workflow = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflow',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workflow',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflow'])) {
+        $this->workflow = $vals['workflow'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_registerWorkflow_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->workflow = new \Airavata\Model\Workflow();
+            $xfer += $this->workflow->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_registerWorkflow_args');
+    if ($this->workflow !== null) {
+      if (!is_object($this->workflow)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('workflow', TType::STRUCT, 1);
+      $xfer += $this->workflow->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_registerWorkflow_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_registerWorkflow_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_registerWorkflow_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_updateWorkflow_args {
+  static $_TSPEC;
+
+  public $workflowTemplateId = null;
+  public $workflow = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflowTemplateId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'workflow',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workflow',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflowTemplateId'])) {
+        $this->workflowTemplateId = $vals['workflowTemplateId'];
+      }
+      if (isset($vals['workflow'])) {
+        $this->workflow = $vals['workflow'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_updateWorkflow_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workflowTemplateId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->workflow = new \Airavata\Model\Workflow();
+            $xfer += $this->workflow->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_updateWorkflow_args');
+    if ($this->workflowTemplateId !== null) {
+      $xfer += $output->writeFieldBegin('workflowTemplateId', TType::STRING, 1);
+      $xfer += $output->writeString($this->workflowTemplateId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->workflow !== null) {
+      if (!is_object($this->workflow)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('workflow', TType::STRUCT, 2);
+      $xfer += $this->workflow->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_updateWorkflow_result {
+  static $_TSPEC;
+
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_updateWorkflow_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_updateWorkflow_result');
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_getWorkflowTemplateId_args {
+  static $_TSPEC;
+
+  public $workflowName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflowName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflowName'])) {
+        $this->workflowName = $vals['workflowName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getWorkflowTemplateId_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workflowName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getWorkflowTemplateId_args');
+    if ($this->workflowName !== null) {
+      $xfer += $output->writeFieldBegin('workflowName', TType::STRING, 1);
+      $xfer += $output->writeString($this->workflowName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_getWorkflowTemplateId_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_getWorkflowTemplateId_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_getWorkflowTemplateId_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_isWorkflowExistWithName_args {
+  static $_TSPEC;
+
+  public $workflowName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'workflowName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['workflowName'])) {
+        $this->workflowName = $vals['workflowName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_isWorkflowExistWithName_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workflowName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_isWorkflowExistWithName_args');
+    if ($this->workflowName !== null) {
+      $xfer += $output->writeFieldBegin('workflowName', TType::STRING, 1);
+      $xfer += $output->writeString($this->workflowName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Workflow_isWorkflowExistWithName_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Workflow_isWorkflowExistWithName_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Workflow_isWorkflowExistWithName_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+


[27/44] git commit: adding workflow related changes back to airavata api

Posted by ch...@apache.org.
adding workflow related changes back to airavata api


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/ede66edf
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/ede66edf
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/ede66edf

Branch: refs/heads/gfac_appcatalog_int
Commit: ede66edf03b21fa0071bbb222f5febc5bfc4d57a
Parents: 3fbf952
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 16:16:26 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 16:16:26 2014 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    41 +
 .../java/org/apache/airavata/api/Airavata.java  | 29214 +++++++++++------
 .../java/org/apache/airavata/api/Workflow.java  |    32 +-
 .../main/resources/lib/airavata/Airavata.cpp    |  8508 +++--
 .../src/main/resources/lib/airavata/Airavata.h  |  1398 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |    40 +
 .../main/resources/lib/airavata/Workflow.cpp    |    34 +-
 .../resources/lib/Airavata/API/Airavata.php     |  9852 +++---
 .../resources/lib/Airavata/API/Workflow.php     |    18 +-
 .../airavataAPI.thrift                          |    51 +-
 10 files changed, 32308 insertions(+), 16880 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 6f23d6c..e72bfbb 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -38,6 +38,7 @@ import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.PublisherFactory;
+import org.apache.airavata.model.Workflow;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
@@ -1450,6 +1451,11 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public List<ApplicationModule> getAllModules() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
     /**
      * Delete a Application Module.
      *
@@ -2781,4 +2787,39 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public List<String> getAllWorkflows() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    @Override
+    public Workflow getWorkflow(String workflowTemplateId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    @Override
+    public void deleteWorkflow(String workflowTemplateId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+
+    }
+
+    @Override
+    public String registerWorkflow(Workflow workflow) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    @Override
+    public void updateWorkflow(String workflowTemplateId, Workflow workflow) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+
+    }
+
+    @Override
+    public String getWorkflowTemplateId(String workflowName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return null;
+    }
+
+    @Override
+    public boolean isWorkflowExistWithName(String workflowName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        return false;
+    }
+
 }


[06/44] git commit: fixing AIRAVATA-1488

Posted by ch...@apache.org.
fixing AIRAVATA-1488


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/99e47f16
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/99e47f16
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/99e47f16

Branch: refs/heads/gfac_appcatalog_int
Commit: 99e47f16b20c80f5338eabde53cf9a0c9f46e5d4
Parents: b376951
Author: lahiru <la...@apache.org>
Authored: Thu Oct 30 14:19:11 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Thu Oct 30 14:19:11 2014 -0400

----------------------------------------------------------------------
 .../ssh/handler/AdvancedSCPInputHandler.java    | 24 +++----------
 .../ssh/handler/AdvancedSCPOutputHandler.java   | 38 +++++++-------------
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    | 34 ++++++++++++++++++
 3 files changed, 51 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/99e47f16/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
index de4dd41..a8c3ad0 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -131,23 +131,7 @@ public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
                 authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
                         this.passPhrase);
             }
-            ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-            String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
-            SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
-            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key) == null) {
-                try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    try {
-                        GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                    } catch (GFacException e1) {
-                        log.error(e1.getLocalizedMessage());
-                    }
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
+
             // Server info
             String parentPath = inputPath + File.separator + jobExecutionContext.getExperimentID() + File.separator + jobExecutionContext.getTaskData().getTaskID();
             if (index < oldIndex) {
@@ -172,10 +156,12 @@ public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
                 if ("URI".equals(actualParameter.getType().getType().toString())) {
                     try {
                         URL file = new URL(paramValue);
-                        this.userName = file.getUserInfo();
-                        this.hostName = file.getHost();
+                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, file.getUserInfo(), file.getHost(), DEFAULT_SSH_PORT);
+                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
                         paramValue = file.getPath();
                     } catch (MalformedURLException e) {
+                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
+                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
                         log.error(e.getLocalizedMessage(), e);
                     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/99e47f16/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index aed6e9f..dfd84de 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -35,7 +35,6 @@ import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
@@ -110,24 +109,7 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
             authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
                     this.passPhrase);
         }
-        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
-        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
         try {
-            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key) == null) {
-                try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    try {
-         				GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-         			} catch (GFacException e1) {
-         				 log.error(e1.getLocalizedMessage());
-         			}
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
             ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext()
                     .getApplicationDeploymentDescription().getType();
             String standardError = app.getStandardError();
@@ -135,15 +117,17 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
             super.invoke(jobExecutionContext);
             // Server info
             if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir() != null){
-            	try{
-            	URL outputPathURL = new URL(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir());
-            	this.userName = outputPathURL.getUserInfo();
-            	this.hostName = outputPathURL.getHost();
-            	outputPath = outputPathURL.getPath();
-            	} catch (MalformedURLException e) {
-					log.error(e.getLocalizedMessage(),e);
-				}
+                try{
+                    URL outputPathURL = new URL(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir());
+                    this.userName = outputPathURL.getUserInfo();
+                    this.hostName = outputPathURL.getHost();
+                    outputPath = outputPathURL.getPath();
+                } catch (MalformedURLException e) {
+                    log.error(e.getLocalizedMessage(),e);
+                }
             }
+            String key = GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
+            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)).getPbsCluster();
             if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && !jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().isPersistOutputData()){
             outputPath = outputPath + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID()
                     + File.separator;
@@ -190,4 +174,6 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
         	throw new GFacHandlerException(e);
         }
     }
+
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/99e47f16/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 94f07b1..ad2731a 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -32,6 +32,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.RequestData;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
@@ -48,6 +49,8 @@ import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthentica
 import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.*;
 import org.slf4j.Logger;
@@ -294,4 +297,35 @@ public class GFACSSHUtils {
         return jobDescriptor;
     }
 
+    /**
+     * This method can be used to set the Security Context if its not set and later use it in other places
+     * @param jobExecutionContext
+     * @param authenticationInfo
+     * @param userName
+     * @param hostName
+     * @param port
+     * @return
+     * @throws GFacException
+     */
+    public static String prepareSecurityContext(JobExecutionContext jobExecutionContext, AuthenticationInfo authenticationInfo
+            , String userName, String hostName, int port) throws GFacException {
+        ServerInfo serverInfo = new ServerInfo(userName, hostName);
+        String key = userName+hostName+port;
+        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
+        if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key) == null) {
+            try {
+                GFACSSHUtils.addSecurityContext(jobExecutionContext, sshAuthWrapper);
+            } catch (ApplicationSettingsException e) {
+                logger.error(e.getMessage());
+                try {
+                    GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    logger.error(e1.getLocalizedMessage());
+                }
+                throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+            }
+        }
+        return key;
+    }
+
 }


Re: [01/44] git commit: fixing input/outhandler - AIRAVATA-1488

Posted by Chathuri Wimalasena <ka...@gmail.com>.
Hi Lahiru,

This is in a separate branch. Not in master. I do not think that should
effect the error I'm getting in master.

On Tue, Nov 11, 2014 at 9:30 AM, Lahiru Gunathilake <gl...@gmail.com>
wrote:

> This commit broke the monitor.
>
> On Wed, Nov 5, 2014 at 1:29 PM, <ch...@apache.org> wrote:
>
>> Repository: airavata
>> Updated Branches:
>>   refs/heads/gfac_appcatalog_int e9ee22b97 -> 755273e1a
>>
>>
>> fixing input/outhandler - AIRAVATA-1488
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b3769516
>> Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b3769516
>> Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b3769516
>>
>> Branch: refs/heads/gfac_appcatalog_int
>> Commit: b3769516eec7d7127e17d2e24e4001718763c1ec
>> Parents: 3b330c0
>> Author: lahiru <la...@apache.org>
>> Authored: Thu Oct 30 11:27:12 2014 -0400
>> Committer: lahiru <la...@apache.org>
>> Committed: Thu Oct 30 11:27:12 2014 -0400
>>
>> ----------------------------------------------------------------------
>>  .../impl/password/PasswordCredential.java       |   3 +-
>>  .../gfac/core/context/JobExecutionContext.java  |   2 +-
>>  .../airavata/gfac/core/utils/GFacUtils.java     |   3 +-
>>  .../gfac/gsissh/util/GFACGSISSHUtils.java       |   2 +-
>>  .../monitor/impl/pull/qstat/HPCPullMonitor.java | 114 ++++++++++---------
>>  .../ssh/handler/AdvancedSCPInputHandler.java    |   9 +-
>>  .../ssh/handler/AdvancedSCPOutputHandler.java   |  12 +-
>>  .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  86 +++++++++++---
>>  8 files changed, 146 insertions(+), 85 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
>> b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
>> index ee32ef4..a31c98b 100644
>> ---
>> a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
>> +++
>> b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
>> @@ -22,13 +22,14 @@
>>  package org.apache.airavata.credential.store.credential.impl.password;
>>
>>  import org.apache.airavata.credential.store.credential.Credential;
>> +import
>> org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
>>
>>  import java.util.Date;
>>
>>  /**
>>   * User name password credentials.
>>   */
>> -public class PasswordCredential extends Credential {
>> +public class PasswordCredential extends SSHCredential {
>>
>>      private String userName;
>>      private String password;
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
>> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
>> index 9abab8d..2f94ec5 100644
>> ---
>> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
>> +++
>> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
>> @@ -234,7 +234,7 @@ public class JobExecutionContext extends
>> AbstractContext implements Serializable
>>
>>
>>         public SecurityContext getSecurityContext(String name) throws
>> GFacException{
>> -               SecurityContext secContext = securityContext.get(name);
>> +               SecurityContext secContext =
>> securityContext.get(name+"-"+this.getApplicationContext().getHostDescription().getType().getHostAddress());
>>                 return secContext;
>>         }
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
>> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
>> index 729c1ee..eef44a4 100644
>> ---
>> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
>> +++
>> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
>> @@ -1092,7 +1092,8 @@ public class GFacUtils {
>>                 }else if(experimentEntry != null &&
>> GFacUtils.isCancelled(experimentID,taskID,zk) ){
>>              // this happens when a cancel request comes to a differnt
>> gfac node, in this case we do not move gfac experiment
>>              // node to gfac node specific location, because original
>> request execution will fail with errors
>> -            return true;
>> +            log.error("This experiment is already cancelled and its
>> already executing the cancel operation so cannot submit again !");
>> +            return false;
>>          } else {
>>              log.error("ExperimentID: " + experimentID + " taskID: " +
>> taskID
>>                      + " is already running by this Gfac instance");
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
>> b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
>> index 4d338e3..2f9dbc3 100644
>> ---
>> a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
>> +++
>> b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
>> @@ -163,7 +163,7 @@ public class GFACGSISSHUtils {
>>              } catch (Exception e) {
>>                  throw new GFacException("An error occurred while
>> creating GSI security context", e);
>>              }
>> -
>> jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT,
>> context);
>> +
>> jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(),
>> context);
>>          }
>>      }
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
>> b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
>> index d3c3df8..952b30e 100644
>> ---
>> a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
>> +++
>> b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
>> @@ -157,12 +157,10 @@ public class HPCPullMonitor extends PullMonitor {
>>          HostDescription currentHostDescription = null;
>>          try {
>>              take = this.queue.take();
>> -            Map<String,MonitorID> completedJobs = new
>> HashMap<String,MonitorID>();
>>              List<HostMonitorData> hostMonitorData =
>> take.getHostMonitorData();
>>              for (HostMonitorData iHostMonitorData : hostMonitorData) {
>>                  if (iHostMonitorData.getHost().getType() instanceof
>> GsisshHostType
>>                          || iHostMonitorData.getHost().getType()
>> instanceof SSHHostType) {
>> -                    currentHostDescription = iHostMonitorData.getHost();
>>                      String hostName =
>> iHostMonitorData.getHost().getType().getHostAddress();
>>                      ResourceConnection connection = null;
>>                      if (connections.containsKey(hostName)) {
>> @@ -181,17 +179,22 @@ public class HPCPullMonitor extends PullMonitor {
>>                      // before we get the statuses, we check the cancel
>> job list and remove them permanently
>>                      List<MonitorID> monitorID =
>> iHostMonitorData.getMonitorIDs();
>>                      Iterator<String> iterator1 =
>> cancelJobList.iterator();
>> -
>> -                    for(MonitorID iMonitorID:monitorID){
>> +                    ListIterator<MonitorID> monitorIDListIterator =
>> monitorID.listIterator();
>> +                    while (monitorIDListIterator.hasNext()){
>> +                        MonitorID iMonitorID =
>> monitorIDListIterator.next();
>>                          while(iterator1.hasNext()) {
>>                              String cancelMId = iterator1.next();
>>                              if
>> (cancelMId.equals(iMonitorID.getExperimentID() + "+" +
>> iMonitorID.getTaskID())) {
>>                                  iMonitorID.setStatus(JobState.CANCELED);
>> -
>> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
>>                                  iterator1.remove();
>>                                  logger.debugId(cancelMId, "Found a match
>> in cancel monitor queue, hence moved to the " +
>>                                                  "completed job queue,
>> experiment {}, task {} , job {}",
>>                                          iMonitorID.getExperimentID(),
>> iMonitorID.getTaskID(), iMonitorID.getJobID());
>> +                                logger.info("Job cancelled: marking the
>> Job as ************CANCELLED************ experiment {}, task {}, job name
>> {} .",
>> +
>> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
>> +                                sendNotification(iMonitorID);
>> +                                monitorIDListIterator.remove();
>> +
>> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
>> OutHandlerWorker(gfac, iMonitorID, publisher));
>>                                  break;
>>                              }
>>                          }
>> @@ -199,26 +202,36 @@ public class HPCPullMonitor extends PullMonitor {
>>                      }
>>                      synchronized (completedJobsFromPush) {
>>                          ListIterator<String> iterator =
>> completedJobsFromPush.listIterator();
>> -                        for (MonitorID iMonitorID : monitorID) {
>> +                        monitorIDListIterator = monitorID.listIterator();
>> +                        while (monitorIDListIterator.hasNext()) {
>> +                            MonitorID iMonitorID =
>> monitorIDListIterator.next();
>>                              String completeId = null;
>>                              while (iterator.hasNext()) {
>>                                   completeId = iterator.next();
>>                                  if
>> (completeId.equals(iMonitorID.getUserName() + "," +
>> iMonitorID.getJobName())) {
>>                                      logger.info("This job is finished
>> because push notification came with <username,jobName> " + completeId);
>> -
>> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
>>
>>  iMonitorID.setStatus(JobState.COMPLETE);
>>                                      iterator.remove();//we have to make
>> this empty everytime we iterate, otherwise this list will accumulate and
>> will lead to a memory leak
>>                                      logger.debugId(completeId, "Push
>> notification updated job {} status to {}. " +
>>                                                      "experiment {} ,
>> task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
>>
>>  iMonitorID.getExperimentID(), iMonitorID.getTaskID());
>> +                                    logger.info("AMQP message recieved:
>> marking the Job as ************COMPLETE************ experiment {}, task {},
>> job name {} .",
>> +
>> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
>> +
>> +                                    monitorIDListIterator.remove();
>> +                                    sendNotification(iMonitorID);
>> +
>> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
>> OutHandlerWorker(gfac, iMonitorID, publisher));
>>                                      break;
>>                                  }
>>                              }
>>                              iterator =
>> completedJobsFromPush.listIterator();
>>                          }
>>                      }
>> +
>> +                    // we have to get this again because we removed the
>> already completed jobs with amqp messages
>> +                    monitorID = iHostMonitorData.getMonitorIDs();
>>                      Map<String, JobState> jobStatuses =
>> connection.getJobStatuses(monitorID);
>> -                    Iterator<MonitorID> iterator = monitorID.iterator();
>> +                    Iterator<MonitorID> iterator =
>> monitorID.listIterator();
>>                      while (iterator.hasNext()) {
>>                          MonitorID iMonitorID = iterator.next();
>>                          currentMonitorID = iMonitorID;
>> @@ -226,13 +239,25 @@ public class HPCPullMonitor extends PullMonitor {
>>
>>  !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
>>
>>  iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," +
>> iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we
>> have a logic
>>                          }else
>> if(JobState.COMPLETE.equals(iMonitorID.getStatus())){
>> -                            completedJobs.put(iMonitorID.getJobName(),
>> iMonitorID);
>>                              logger.debugId(iMonitorID.getJobID(), "Moved
>> job {} to completed jobs map, experiment {}, " +
>>                                      "task {}", iMonitorID.getJobID(),
>> iMonitorID.getExperimentID(), iMonitorID.getTaskID());
>> +                            iterator.remove();
>> +                            logger.info("PULL Notification is complete:
>> marking the Job as ************COMPLETE************ experiment {}, task {},
>> job name {} .",
>> +
>> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
>> +
>> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
>> OutHandlerWorker(gfac, iMonitorID, publisher));
>>                          }
>> -                        jobStatus = new JobStatusChangeRequestEvent();
>>
>>  iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID()+","+iMonitorID.getJobName()));
>>   //IMPORTANT this is not a simple setter we have a logic
>> -
>> +                        iMonitorID.setLastMonitored(new Timestamp((new
>> Date()).getTime()));
>> +                        sendNotification(iMonitorID);
>> +
>> logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status
>> change request, " +
>> +                                        "experiment {} , task {}",
>> jobStatus.getJobIdentity().getExperimentId(),
>> +                                jobStatus.getJobIdentity().getTaskId());
>> +                        // if the job is completed we do not have to put
>> the job to the queue again
>> +                        iMonitorID.setLastMonitored(new Timestamp((new
>> Date()).getTime()));
>> +                    }
>> +                    iterator = monitorID.listIterator();
>> +                    while(iterator.hasNext()){
>> +                        MonitorID iMonitorID = iterator.next();
>>                          if (iMonitorID.getFailedCount() > FAILED_COUNT) {
>>                              iMonitorID.setLastMonitored(new
>> Timestamp((new Date()).getTime()));
>>                              String outputDir =
>> iMonitorID.getJobExecutionContext().getApplicationContext()
>> @@ -245,15 +270,19 @@ public class HPCPullMonitor extends PullMonitor {
>>                                      // this is because while we run
>> output handler something failed and during exception
>>                                      // we store all the jobs in the
>> monitor queue again
>>                                      logger.error("We know this  job is
>> already attempted to run out-handlers");
>> -
>> CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
>> +//
>> CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
>>                                  }
>>                              }
>>                              if (stdOut != null && stdOut.size() > 0 &&
>> !stdOut.get(0).isEmpty()) { // have to be careful with this
>>                                  iMonitorID.setStatus(JobState.COMPLETE);
>> -
>> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
>> -                                logger.errorId(iMonitorID.getJobID(),
>> "Job monitoring failed {} times, removed job {} from " +
>> -                                                "monitor queue.
>> Experiment {} , task {}", iMonitorID.getFailedCount(),
>> +                                logger.errorId(iMonitorID.getJobID(),
>> "Job monitoring failed {} times, " +
>> +                                                " Experiment {} , task
>> {}", iMonitorID.getFailedCount(),
>>                                          iMonitorID.getExperimentID(),
>> iMonitorID.getTaskID());
>> +                                logger.info("Listing directory came as
>> complete: marking the Job as ************COMPLETE************ experiment
>> {}, task {}, job name {} .",
>> +
>> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
>> +                                sendNotification(iMonitorID);
>> +                                iterator.remove();
>> +
>> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
>> OutHandlerWorker(gfac, iMonitorID, publisher));
>>                              } else {
>>                                  iMonitorID.setFailedCount(0);
>>                              }
>> @@ -263,22 +292,9 @@ public class HPCPullMonitor extends PullMonitor {
>>                              // if the job is complete we remove it from
>> the Map, if any of these maps
>>                              // get empty this userMonitorData will get
>> delete from the queue
>>                          }
>> -                        JobIdentifier jobIdentity = new
>> JobIdentifier(iMonitorID.getJobID(),
>> -                                iMonitorID.getTaskID(),
>> -                                iMonitorID.getWorkflowNodeID(),
>> -                                iMonitorID.getExperimentID(),
>> -
>> iMonitorID.getJobExecutionContext().getGatewayID());
>> -                        jobStatus.setJobIdentity(jobIdentity);
>> -                        jobStatus.setState(iMonitorID.getStatus());
>> -                        // we have this JobStatus class to handle amqp
>> monitoring
>> -
>> -                        publisher.publish(jobStatus);
>> -
>> logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status
>> change request, " +
>> -                                        "experiment {} , task {}",
>> jobStatus.getJobIdentity().getExperimentId(),
>> -                                jobStatus.getJobIdentity().getTaskId());
>> -                        // if the job is completed we do not have to put
>> the job to the queue again
>> -                        iMonitorID.setLastMonitored(new Timestamp((new
>> Date()).getTime()));
>>                      }
>> +
>> +
>>                  } else {
>>                      logger.debug("Qstat Monitor doesn't handle
>> non-gsissh hosts , host {}", iHostMonitorData.getHost()
>>                              .getType().getHostAddress());
>> @@ -287,30 +303,6 @@ public class HPCPullMonitor extends PullMonitor {
>>              // We have finished all the HostMonitorData object in
>> userMonitorData, now we need to put it back
>>              // now the userMonitorData goes back to the tail of the queue
>>              queue.put(take);
>> -            // cleaning up the completed jobs, this method will remove
>> some of the userMonitorData from the queue if
>> -            // they become empty
>> -            Map<String, Integer> jobRemoveCountMap = new HashMap<String,
>> Integer>();
>> -            ZooKeeper zk = null;
>> -            Set<String> keys = completedJobs.keySet();
>> -            for (String jobName: keys) {
>> -                MonitorID completedJob = completedJobs.get(jobName);
>> -                CommonUtils.removeMonitorFromQueue(queue, completedJob);
>> -//
>> gfac.invokeOutFlowHandlers(completedJob.getJobExecutionContext());
>> -                  GFacThreadPoolExecutor.getFixedThreadPool().submit(new
>> OutHandlerWorker(gfac, completedJob, publisher));
>> -                if (zk == null) {
>> -                    zk = completedJob.getJobExecutionContext().getZk();
>> -                }
>> -                String key =
>> CommonUtils.getJobCountUpdatePath(completedJob);
>> -                int i = 0;
>> -                if (jobRemoveCountMap.containsKey(key)) {
>> -                    i = Integer.valueOf(jobRemoveCountMap.get(key));
>> -                }
>> -                jobRemoveCountMap.put(key, ++i);
>> -            }
>> -            if (completedJobs.size() > 0) {
>> -                // reduce completed job count from zookeeper
>> -                CommonUtils.updateZkWithJobCount(zk, jobRemoveCountMap,
>> false);
>> -            }
>>          } catch (InterruptedException e) {
>>              if (!this.queue.contains(take)) {
>>                  try {
>> @@ -357,6 +349,20 @@ public class HPCPullMonitor extends PullMonitor {
>>          return true;
>>      }
>>
>> +    private void sendNotification(MonitorID iMonitorID) {
>> +        JobStatusChangeRequestEvent jobStatus = new
>> JobStatusChangeRequestEvent();
>> +        JobIdentifier jobIdentity = new
>> JobIdentifier(iMonitorID.getJobID(),
>> +                iMonitorID.getTaskID(),
>> +                iMonitorID.getWorkflowNodeID(),
>> +                iMonitorID.getExperimentID(),
>> +                iMonitorID.getJobExecutionContext().getGatewayID());
>> +        jobStatus.setJobIdentity(jobIdentity);
>> +        jobStatus.setState(iMonitorID.getStatus());
>> +        // we have this JobStatus class to handle amqp monitoring
>> +
>> +        publisher.publish(jobStatus);
>> +    }
>> +
>>      /**
>>       * This is the method to stop the polling process
>>       *
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
>> index ce296da..de4dd41 100644
>> ---
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
>> +++
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
>> @@ -72,6 +72,7 @@ import java.util.*;
>>  public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
>>      private static final Logger log =
>> LoggerFactory.getLogger(AdvancedSCPInputHandler.class);
>>      public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
>> +    public static final int DEFAULT_SSH_PORT = 22;
>>
>>      private String password = null;
>>
>> @@ -131,11 +132,11 @@ public class AdvancedSCPInputHandler extends
>> AbstractRecoverableHandler {
>>                          this.passPhrase);
>>              }
>>              ServerInfo serverInfo = new ServerInfo(this.userName,
>> this.hostName);
>> -            String key = this.userName + this.hostName;
>> -            jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new
>> SSHAuthWrapper(serverInfo,authenticationInfo,key));
>> -            if
>> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)
>> == null) {
>> +            String key = this.userName + this.hostName +
>> DEFAULT_SSH_PORT;
>> +            SSHAuthWrapper sshAuthWrapper = new
>> SSHAuthWrapper(serverInfo, authenticationInfo, key);
>> +            if
>> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)
>> == null) {
>>                  try {
>> -                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
>> +
>> GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
>>                  } catch (ApplicationSettingsException e) {
>>                      log.error(e.getMessage());
>>                      try {
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
>> index ad2131e..aed6e9f 100644
>> ---
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
>> +++
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
>> @@ -73,6 +73,8 @@ import java.util.Set;
>>  public class AdvancedSCPOutputHandler extends AbstractHandler {
>>      private static final Logger log =
>> LoggerFactory.getLogger(AdvancedSCPOutputHandler.class);
>>
>> +    public static final int DEFAULT_SSH_PORT = 22;
>> +
>>      private String password = null;
>>
>>      private String publicKeyPath;
>> @@ -87,8 +89,6 @@ public class AdvancedSCPOutputHandler extends
>> AbstractHandler {
>>
>>      private String outputPath;
>>
>> -    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
>> -
>>
>>      public void initProperties(Properties properties) throws
>> GFacHandlerException {
>>          password = (String)properties.get("password");
>> @@ -111,12 +111,12 @@ public class AdvancedSCPOutputHandler extends
>> AbstractHandler {
>>                      this.passPhrase);
>>          }
>>          ServerInfo serverInfo = new ServerInfo(this.userName,
>> this.hostName);
>> -        String key = this.userName + this.hostName;
>> -        jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new
>> SSHAuthWrapper(serverInfo,authenticationInfo,key));
>> +        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
>> +        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo,
>> authenticationInfo, key);
>>          try {
>> -            if
>> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)
>> == null) {
>> +            if
>> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)
>> == null) {
>>                  try {
>> -                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
>> +
>> GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
>>                  } catch (ApplicationSettingsException e) {
>>                      log.error(e.getMessage());
>>                      try {
>>
>>
>> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
>> index 7ee5d6a..94f07b1 100644
>> ---
>> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
>> +++
>> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
>> @@ -62,9 +62,12 @@ public class GFACSSHUtils {
>>
>>      public static int maxClusterCount = 5;
>>
>> -    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
>> -
>> -
>> +    /**
>> +     * This method is to add computing resource specific authentication,
>> if its a third party machine, use the other addSecurityContext
>> +     * @param jobExecutionContext
>> +     * @throws GFacException
>> +     * @throws ApplicationSettingsException
>> +     */
>>      public static void addSecurityContext(JobExecutionContext
>> jobExecutionContext) throws GFacException, ApplicationSettingsException {
>>          HostDescription registeredHost =
>> jobExecutionContext.getApplicationContext().getHostDescription();
>>          if (registeredHost.getType() instanceof GlobusHostType ||
>> registeredHost.getType() instanceof UnicoreHostType) {
>> @@ -77,8 +80,6 @@ public class GFACSSHUtils {
>>              requestData.setTokenId(credentialStoreToken);
>>
>>              ServerInfo serverInfo = new ServerInfo(null,
>> registeredHost.getType().getHostAddress());
>> -            SSHAuthWrapper sshAuth = (SSHAuthWrapper)
>> jobExecutionContext.getProperty(ADVANCED_SSH_AUTH);
>> -
>>              Cluster pbsCluster = null;
>>              try {
>>                  TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new
>> TokenizedSSHAuthInfo(requestData);
>> @@ -95,9 +96,6 @@ public class GFACSSHUtils {
>>
>>                  String key = credentials.getPortalUserName() +
>> registeredHost.getType().getHostAddress() +
>>                          serverInfo.getPort();
>> -                if(sshAuth!=null){
>> -                    key=sshAuth.getKey();
>> -                }
>>                  boolean recreate = false;
>>                  synchronized (clusters) {
>>                      if (clusters.containsKey(key) &&
>> clusters.get(key).size() < maxClusterCount) {
>> @@ -125,15 +123,8 @@ public class GFACSSHUtils {
>>                          recreate = true;
>>                      }
>>                      if (recreate) {
>> -                        if (sshAuth != null) {
>> -                            pbsCluster = new
>> PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),
>> +                        pbsCluster = new PBSCluster(serverInfo,
>> tokenizedSSHAuthInfo,
>>
>>  CommonUtils.getPBSJobManager(installedParentPath));
>> -
>> jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,null); // some other
>> provider might fail
>> -                            key = sshAuth.getKey();
>> -                        } else {
>> -                            pbsCluster = new PBSCluster(serverInfo,
>> tokenizedSSHAuthInfo,
>> -
>> CommonUtils.getPBSJobManager(installedParentPath));
>> -                        }
>>                          List<Cluster> pbsClusters = null;
>>                          if (!(clusters.containsKey(key))) {
>>                              pbsClusters = new ArrayList<Cluster>();
>> @@ -148,10 +139,71 @@ public class GFACSSHUtils {
>>                  e.printStackTrace();  //To change body of catch
>> statement use File | Settings | File Templates.
>>              }
>>              sshSecurityContext.setPbsCluster(pbsCluster);
>> -
>> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT,
>> sshSecurityContext);
>> +
>> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(),
>> sshSecurityContext);
>>          }
>>      }
>>
>> +    /**
>> +     * This method can be used to add third party resource security
>> contexts
>> +     * @param jobExecutionContext
>> +     * @param sshAuth
>> +     * @throws GFacException
>> +     * @throws ApplicationSettingsException
>> +     */
>> +    public static void addSecurityContext(JobExecutionContext
>> jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException,
>> ApplicationSettingsException {
>> +            try {
>> +                if(sshAuth== null) {
>> +                    throw new GFacException("Error adding security
>> Context, because sshAuthWrapper is null");
>> +                }
>> +                SSHSecurityContext sshSecurityContext = new
>> SSHSecurityContext();
>> +                Cluster pbsCluster = null;
>> +                String key=sshAuth.getKey();
>> +                boolean recreate = false;
>> +                synchronized (clusters) {
>> +                    if (clusters.containsKey(key) &&
>> clusters.get(key).size() < maxClusterCount) {
>> +                        recreate = true;
>> +                    } else if (clusters.containsKey(key)) {
>> +                        int i = new Random().nextInt(Integer.MAX_VALUE)
>> % maxClusterCount;
>> +                        if
>> (clusters.get(key).get(i).getSession().isConnected()) {
>> +                            pbsCluster = clusters.get(key).get(i);
>> +                        } else {
>> +                            clusters.get(key).remove(i);
>> +                            recreate = true;
>> +                        }
>> +                        if (!recreate) {
>> +                            try {
>> +                                pbsCluster.listDirectory("~/"); // its
>> hard to trust isConnected method, so we try to connect if it works we are
>> good,else we recreate
>> +                            } catch (Exception e) {
>> +                                clusters.get(key).remove(i);
>> +                                logger.info("Connection found the
>> connection map is expired, so we create from the scratch");
>> +                                maxClusterCount++;
>> +                                recreate = true; // we make the
>> pbsCluster to create again if there is any exception druing connection
>> +                            }
>> +                        }
>> +                        logger.info("Re-using the same connection used
>> with the connection string:" + key);
>> +                    } else {
>> +                        recreate = true;
>> +                    }
>> +                    if (recreate) {
>> +                        pbsCluster = new
>> PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null);
>> +                        key = sshAuth.getKey();
>> +                        List<Cluster> pbsClusters = null;
>> +                        if (!(clusters.containsKey(key))) {
>> +                            pbsClusters = new ArrayList<Cluster>();
>> +                        } else {
>> +                            pbsClusters = clusters.get(key);
>> +                        }
>> +                        pbsClusters.add(pbsCluster);
>> +                        clusters.put(key, pbsClusters);
>> +                    }
>> +                }
>> +                sshSecurityContext.setPbsCluster(pbsCluster);
>> +
>> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+key,
>> sshSecurityContext);
>> +            } catch (Exception e) {
>> +                e.printStackTrace();  //To change body of catch
>> statement use File | Settings | File Templates.
>> +            }
>> +    }
>> +
>>      public static JobDescriptor createJobDescriptor(JobExecutionContext
>> jobExecutionContext,
>>
>>  ApplicationDeploymentDescriptionType app, Cluster cluster) {
>>          JobDescriptor jobDescriptor = new JobDescriptor();
>>
>>
>
>
> --
> Research Assistant
> Science Gateways Group
> Indiana University
>

Re: [01/44] git commit: fixing input/outhandler - AIRAVATA-1488

Posted by Lahiru Gunathilake <gl...@gmail.com>.
This commit broke the monitor.

On Wed, Nov 5, 2014 at 1:29 PM, <ch...@apache.org> wrote:

> Repository: airavata
> Updated Branches:
>   refs/heads/gfac_appcatalog_int e9ee22b97 -> 755273e1a
>
>
> fixing input/outhandler - AIRAVATA-1488
>
>
> Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
> Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b3769516
> Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b3769516
> Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b3769516
>
> Branch: refs/heads/gfac_appcatalog_int
> Commit: b3769516eec7d7127e17d2e24e4001718763c1ec
> Parents: 3b330c0
> Author: lahiru <la...@apache.org>
> Authored: Thu Oct 30 11:27:12 2014 -0400
> Committer: lahiru <la...@apache.org>
> Committed: Thu Oct 30 11:27:12 2014 -0400
>
> ----------------------------------------------------------------------
>  .../impl/password/PasswordCredential.java       |   3 +-
>  .../gfac/core/context/JobExecutionContext.java  |   2 +-
>  .../airavata/gfac/core/utils/GFacUtils.java     |   3 +-
>  .../gfac/gsissh/util/GFACGSISSHUtils.java       |   2 +-
>  .../monitor/impl/pull/qstat/HPCPullMonitor.java | 114 ++++++++++---------
>  .../ssh/handler/AdvancedSCPInputHandler.java    |   9 +-
>  .../ssh/handler/AdvancedSCPOutputHandler.java   |  12 +-
>  .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  86 +++++++++++---
>  8 files changed, 146 insertions(+), 85 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
> b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
> index ee32ef4..a31c98b 100644
> ---
> a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
> +++
> b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/credential/impl/password/PasswordCredential.java
> @@ -22,13 +22,14 @@
>  package org.apache.airavata.credential.store.credential.impl.password;
>
>  import org.apache.airavata.credential.store.credential.Credential;
> +import
> org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
>
>  import java.util.Date;
>
>  /**
>   * User name password credentials.
>   */
> -public class PasswordCredential extends Credential {
> +public class PasswordCredential extends SSHCredential {
>
>      private String userName;
>      private String password;
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
> index 9abab8d..2f94ec5 100644
> ---
> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
> +++
> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
> @@ -234,7 +234,7 @@ public class JobExecutionContext extends
> AbstractContext implements Serializable
>
>
>         public SecurityContext getSecurityContext(String name) throws
> GFacException{
> -               SecurityContext secContext = securityContext.get(name);
> +               SecurityContext secContext =
> securityContext.get(name+"-"+this.getApplicationContext().getHostDescription().getType().getHostAddress());
>                 return secContext;
>         }
>
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
> index 729c1ee..eef44a4 100644
> ---
> a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
> +++
> b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
> @@ -1092,7 +1092,8 @@ public class GFacUtils {
>                 }else if(experimentEntry != null &&
> GFacUtils.isCancelled(experimentID,taskID,zk) ){
>              // this happens when a cancel request comes to a differnt
> gfac node, in this case we do not move gfac experiment
>              // node to gfac node specific location, because original
> request execution will fail with errors
> -            return true;
> +            log.error("This experiment is already cancelled and its
> already executing the cancel operation so cannot submit again !");
> +            return false;
>          } else {
>              log.error("ExperimentID: " + experimentID + " taskID: " +
> taskID
>                      + " is already running by this Gfac instance");
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
> b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
> index 4d338e3..2f9dbc3 100644
> ---
> a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
> +++
> b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
> @@ -163,7 +163,7 @@ public class GFACGSISSHUtils {
>              } catch (Exception e) {
>                  throw new GFacException("An error occurred while creating
> GSI security context", e);
>              }
> -
> jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT,
> context);
> +
> jobExecutionContext.addSecurityContext(Constants.GSI_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(),
> context);
>          }
>      }
>
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
> b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
> index d3c3df8..952b30e 100644
> ---
> a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
> +++
> b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
> @@ -157,12 +157,10 @@ public class HPCPullMonitor extends PullMonitor {
>          HostDescription currentHostDescription = null;
>          try {
>              take = this.queue.take();
> -            Map<String,MonitorID> completedJobs = new
> HashMap<String,MonitorID>();
>              List<HostMonitorData> hostMonitorData =
> take.getHostMonitorData();
>              for (HostMonitorData iHostMonitorData : hostMonitorData) {
>                  if (iHostMonitorData.getHost().getType() instanceof
> GsisshHostType
>                          || iHostMonitorData.getHost().getType()
> instanceof SSHHostType) {
> -                    currentHostDescription = iHostMonitorData.getHost();
>                      String hostName =
> iHostMonitorData.getHost().getType().getHostAddress();
>                      ResourceConnection connection = null;
>                      if (connections.containsKey(hostName)) {
> @@ -181,17 +179,22 @@ public class HPCPullMonitor extends PullMonitor {
>                      // before we get the statuses, we check the cancel
> job list and remove them permanently
>                      List<MonitorID> monitorID =
> iHostMonitorData.getMonitorIDs();
>                      Iterator<String> iterator1 = cancelJobList.iterator();
> -
> -                    for(MonitorID iMonitorID:monitorID){
> +                    ListIterator<MonitorID> monitorIDListIterator =
> monitorID.listIterator();
> +                    while (monitorIDListIterator.hasNext()){
> +                        MonitorID iMonitorID =
> monitorIDListIterator.next();
>                          while(iterator1.hasNext()) {
>                              String cancelMId = iterator1.next();
>                              if
> (cancelMId.equals(iMonitorID.getExperimentID() + "+" +
> iMonitorID.getTaskID())) {
>                                  iMonitorID.setStatus(JobState.CANCELED);
> -
> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
>                                  iterator1.remove();
>                                  logger.debugId(cancelMId, "Found a match
> in cancel monitor queue, hence moved to the " +
>                                                  "completed job queue,
> experiment {}, task {} , job {}",
>                                          iMonitorID.getExperimentID(),
> iMonitorID.getTaskID(), iMonitorID.getJobID());
> +                                logger.info("Job cancelled: marking the
> Job as ************CANCELLED************ experiment {}, task {}, job name
> {} .",
> +
> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
> +                                sendNotification(iMonitorID);
> +                                monitorIDListIterator.remove();
> +
> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
> OutHandlerWorker(gfac, iMonitorID, publisher));
>                                  break;
>                              }
>                          }
> @@ -199,26 +202,36 @@ public class HPCPullMonitor extends PullMonitor {
>                      }
>                      synchronized (completedJobsFromPush) {
>                          ListIterator<String> iterator =
> completedJobsFromPush.listIterator();
> -                        for (MonitorID iMonitorID : monitorID) {
> +                        monitorIDListIterator = monitorID.listIterator();
> +                        while (monitorIDListIterator.hasNext()) {
> +                            MonitorID iMonitorID =
> monitorIDListIterator.next();
>                              String completeId = null;
>                              while (iterator.hasNext()) {
>                                   completeId = iterator.next();
>                                  if
> (completeId.equals(iMonitorID.getUserName() + "," +
> iMonitorID.getJobName())) {
>                                      logger.info("This job is finished
> because push notification came with <username,jobName> " + completeId);
> -
> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
>
>  iMonitorID.setStatus(JobState.COMPLETE);
>                                      iterator.remove();//we have to make
> this empty everytime we iterate, otherwise this list will accumulate and
> will lead to a memory leak
>                                      logger.debugId(completeId, "Push
> notification updated job {} status to {}. " +
>                                                      "experiment {} , task
> {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
>                                              iMonitorID.getExperimentID(),
> iMonitorID.getTaskID());
> +                                    logger.info("AMQP message recieved:
> marking the Job as ************COMPLETE************ experiment {}, task {},
> job name {} .",
> +
> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
> +
> +                                    monitorIDListIterator.remove();
> +                                    sendNotification(iMonitorID);
> +
> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
> OutHandlerWorker(gfac, iMonitorID, publisher));
>                                      break;
>                                  }
>                              }
>                              iterator =
> completedJobsFromPush.listIterator();
>                          }
>                      }
> +
> +                    // we have to get this again because we removed the
> already completed jobs with amqp messages
> +                    monitorID = iHostMonitorData.getMonitorIDs();
>                      Map<String, JobState> jobStatuses =
> connection.getJobStatuses(monitorID);
> -                    Iterator<MonitorID> iterator = monitorID.iterator();
> +                    Iterator<MonitorID> iterator =
> monitorID.listIterator();
>                      while (iterator.hasNext()) {
>                          MonitorID iMonitorID = iterator.next();
>                          currentMonitorID = iMonitorID;
> @@ -226,13 +239,25 @@ public class HPCPullMonitor extends PullMonitor {
>
>  !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
>
>  iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," +
> iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we
> have a logic
>                          }else
> if(JobState.COMPLETE.equals(iMonitorID.getStatus())){
> -                            completedJobs.put(iMonitorID.getJobName(),
> iMonitorID);
>                              logger.debugId(iMonitorID.getJobID(), "Moved
> job {} to completed jobs map, experiment {}, " +
>                                      "task {}", iMonitorID.getJobID(),
> iMonitorID.getExperimentID(), iMonitorID.getTaskID());
> +                            iterator.remove();
> +                            logger.info("PULL Notification is complete:
> marking the Job as ************COMPLETE************ experiment {}, task {},
> job name {} .",
> +
> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
> +
> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
> OutHandlerWorker(gfac, iMonitorID, publisher));
>                          }
> -                        jobStatus = new JobStatusChangeRequestEvent();
>
>  iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID()+","+iMonitorID.getJobName()));
>   //IMPORTANT this is not a simple setter we have a logic
> -
> +                        iMonitorID.setLastMonitored(new Timestamp((new
> Date()).getTime()));
> +                        sendNotification(iMonitorID);
> +
> logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status
> change request, " +
> +                                        "experiment {} , task {}",
> jobStatus.getJobIdentity().getExperimentId(),
> +                                jobStatus.getJobIdentity().getTaskId());
> +                        // if the job is completed we do not have to put
> the job to the queue again
> +                        iMonitorID.setLastMonitored(new Timestamp((new
> Date()).getTime()));
> +                    }
> +                    iterator = monitorID.listIterator();
> +                    while(iterator.hasNext()){
> +                        MonitorID iMonitorID = iterator.next();
>                          if (iMonitorID.getFailedCount() > FAILED_COUNT) {
>                              iMonitorID.setLastMonitored(new
> Timestamp((new Date()).getTime()));
>                              String outputDir =
> iMonitorID.getJobExecutionContext().getApplicationContext()
> @@ -245,15 +270,19 @@ public class HPCPullMonitor extends PullMonitor {
>                                      // this is because while we run
> output handler something failed and during exception
>                                      // we store all the jobs in the
> monitor queue again
>                                      logger.error("We know this  job is
> already attempted to run out-handlers");
> -
> CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
> +//
> CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
>                                  }
>                              }
>                              if (stdOut != null && stdOut.size() > 0 &&
> !stdOut.get(0).isEmpty()) { // have to be careful with this
>                                  iMonitorID.setStatus(JobState.COMPLETE);
> -
> completedJobs.put(iMonitorID.getJobName(), iMonitorID);
> -                                logger.errorId(iMonitorID.getJobID(),
> "Job monitoring failed {} times, removed job {} from " +
> -                                                "monitor queue.
> Experiment {} , task {}", iMonitorID.getFailedCount(),
> +                                logger.errorId(iMonitorID.getJobID(),
> "Job monitoring failed {} times, " +
> +                                                " Experiment {} , task
> {}", iMonitorID.getFailedCount(),
>                                          iMonitorID.getExperimentID(),
> iMonitorID.getTaskID());
> +                                logger.info("Listing directory came as
> complete: marking the Job as ************COMPLETE************ experiment
> {}, task {}, job name {} .",
> +
> iMonitorID.getExperimentID(),iMonitorID.getTaskID(),iMonitorID.getJobName());
> +                                sendNotification(iMonitorID);
> +                                iterator.remove();
> +
> GFacThreadPoolExecutor.getFixedThreadPool().submit(new
> OutHandlerWorker(gfac, iMonitorID, publisher));
>                              } else {
>                                  iMonitorID.setFailedCount(0);
>                              }
> @@ -263,22 +292,9 @@ public class HPCPullMonitor extends PullMonitor {
>                              // if the job is complete we remove it from
> the Map, if any of these maps
>                              // get empty this userMonitorData will get
> delete from the queue
>                          }
> -                        JobIdentifier jobIdentity = new
> JobIdentifier(iMonitorID.getJobID(),
> -                                iMonitorID.getTaskID(),
> -                                iMonitorID.getWorkflowNodeID(),
> -                                iMonitorID.getExperimentID(),
> -
> iMonitorID.getJobExecutionContext().getGatewayID());
> -                        jobStatus.setJobIdentity(jobIdentity);
> -                        jobStatus.setState(iMonitorID.getStatus());
> -                        // we have this JobStatus class to handle amqp
> monitoring
> -
> -                        publisher.publish(jobStatus);
> -
> logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status
> change request, " +
> -                                        "experiment {} , task {}",
> jobStatus.getJobIdentity().getExperimentId(),
> -                                jobStatus.getJobIdentity().getTaskId());
> -                        // if the job is completed we do not have to put
> the job to the queue again
> -                        iMonitorID.setLastMonitored(new Timestamp((new
> Date()).getTime()));
>                      }
> +
> +
>                  } else {
>                      logger.debug("Qstat Monitor doesn't handle non-gsissh
> hosts , host {}", iHostMonitorData.getHost()
>                              .getType().getHostAddress());
> @@ -287,30 +303,6 @@ public class HPCPullMonitor extends PullMonitor {
>              // We have finished all the HostMonitorData object in
> userMonitorData, now we need to put it back
>              // now the userMonitorData goes back to the tail of the queue
>              queue.put(take);
> -            // cleaning up the completed jobs, this method will remove
> some of the userMonitorData from the queue if
> -            // they become empty
> -            Map<String, Integer> jobRemoveCountMap = new HashMap<String,
> Integer>();
> -            ZooKeeper zk = null;
> -            Set<String> keys = completedJobs.keySet();
> -            for (String jobName: keys) {
> -                MonitorID completedJob = completedJobs.get(jobName);
> -                CommonUtils.removeMonitorFromQueue(queue, completedJob);
> -//
> gfac.invokeOutFlowHandlers(completedJob.getJobExecutionContext());
> -                  GFacThreadPoolExecutor.getFixedThreadPool().submit(new
> OutHandlerWorker(gfac, completedJob, publisher));
> -                if (zk == null) {
> -                    zk = completedJob.getJobExecutionContext().getZk();
> -                }
> -                String key =
> CommonUtils.getJobCountUpdatePath(completedJob);
> -                int i = 0;
> -                if (jobRemoveCountMap.containsKey(key)) {
> -                    i = Integer.valueOf(jobRemoveCountMap.get(key));
> -                }
> -                jobRemoveCountMap.put(key, ++i);
> -            }
> -            if (completedJobs.size() > 0) {
> -                // reduce completed job count from zookeeper
> -                CommonUtils.updateZkWithJobCount(zk, jobRemoveCountMap,
> false);
> -            }
>          } catch (InterruptedException e) {
>              if (!this.queue.contains(take)) {
>                  try {
> @@ -357,6 +349,20 @@ public class HPCPullMonitor extends PullMonitor {
>          return true;
>      }
>
> +    private void sendNotification(MonitorID iMonitorID) {
> +        JobStatusChangeRequestEvent jobStatus = new
> JobStatusChangeRequestEvent();
> +        JobIdentifier jobIdentity = new
> JobIdentifier(iMonitorID.getJobID(),
> +                iMonitorID.getTaskID(),
> +                iMonitorID.getWorkflowNodeID(),
> +                iMonitorID.getExperimentID(),
> +                iMonitorID.getJobExecutionContext().getGatewayID());
> +        jobStatus.setJobIdentity(jobIdentity);
> +        jobStatus.setState(iMonitorID.getStatus());
> +        // we have this JobStatus class to handle amqp monitoring
> +
> +        publisher.publish(jobStatus);
> +    }
> +
>      /**
>       * This is the method to stop the polling process
>       *
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
> index ce296da..de4dd41 100644
> ---
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
> +++
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
> @@ -72,6 +72,7 @@ import java.util.*;
>  public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
>      private static final Logger log =
> LoggerFactory.getLogger(AdvancedSCPInputHandler.class);
>      public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
> +    public static final int DEFAULT_SSH_PORT = 22;
>
>      private String password = null;
>
> @@ -131,11 +132,11 @@ public class AdvancedSCPInputHandler extends
> AbstractRecoverableHandler {
>                          this.passPhrase);
>              }
>              ServerInfo serverInfo = new ServerInfo(this.userName,
> this.hostName);
> -            String key = this.userName + this.hostName;
> -            jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new
> SSHAuthWrapper(serverInfo,authenticationInfo,key));
> -            if
> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)
> == null) {
> +            String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
> +            SSHAuthWrapper sshAuthWrapper = new
> SSHAuthWrapper(serverInfo, authenticationInfo, key);
> +            if
> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)
> == null) {
>                  try {
> -                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
> +
> GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
>                  } catch (ApplicationSettingsException e) {
>                      log.error(e.getMessage());
>                      try {
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
> index ad2131e..aed6e9f 100644
> ---
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
> +++
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
> @@ -73,6 +73,8 @@ import java.util.Set;
>  public class AdvancedSCPOutputHandler extends AbstractHandler {
>      private static final Logger log =
> LoggerFactory.getLogger(AdvancedSCPOutputHandler.class);
>
> +    public static final int DEFAULT_SSH_PORT = 22;
> +
>      private String password = null;
>
>      private String publicKeyPath;
> @@ -87,8 +89,6 @@ public class AdvancedSCPOutputHandler extends
> AbstractHandler {
>
>      private String outputPath;
>
> -    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
> -
>
>      public void initProperties(Properties properties) throws
> GFacHandlerException {
>          password = (String)properties.get("password");
> @@ -111,12 +111,12 @@ public class AdvancedSCPOutputHandler extends
> AbstractHandler {
>                      this.passPhrase);
>          }
>          ServerInfo serverInfo = new ServerInfo(this.userName,
> this.hostName);
> -        String key = this.userName + this.hostName;
> -        jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,new
> SSHAuthWrapper(serverInfo,authenticationInfo,key));
> +        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
> +        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo,
> authenticationInfo, key);
>          try {
> -            if
> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)
> == null) {
> +            if
> (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)
> == null) {
>                  try {
> -                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
> +
> GFACSSHUtils.addSecurityContext(jobExecutionContext,sshAuthWrapper);
>                  } catch (ApplicationSettingsException e) {
>                      log.error(e.getMessage());
>                      try {
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/b3769516/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
> ----------------------------------------------------------------------
> diff --git
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
> index 7ee5d6a..94f07b1 100644
> ---
> a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
> +++
> b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
> @@ -62,9 +62,12 @@ public class GFACSSHUtils {
>
>      public static int maxClusterCount = 5;
>
> -    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
> -
> -
> +    /**
> +     * This method is to add computing resource specific authentication,
> if its a third party machine, use the other addSecurityContext
> +     * @param jobExecutionContext
> +     * @throws GFacException
> +     * @throws ApplicationSettingsException
> +     */
>      public static void addSecurityContext(JobExecutionContext
> jobExecutionContext) throws GFacException, ApplicationSettingsException {
>          HostDescription registeredHost =
> jobExecutionContext.getApplicationContext().getHostDescription();
>          if (registeredHost.getType() instanceof GlobusHostType ||
> registeredHost.getType() instanceof UnicoreHostType) {
> @@ -77,8 +80,6 @@ public class GFACSSHUtils {
>              requestData.setTokenId(credentialStoreToken);
>
>              ServerInfo serverInfo = new ServerInfo(null,
> registeredHost.getType().getHostAddress());
> -            SSHAuthWrapper sshAuth = (SSHAuthWrapper)
> jobExecutionContext.getProperty(ADVANCED_SSH_AUTH);
> -
>              Cluster pbsCluster = null;
>              try {
>                  TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new
> TokenizedSSHAuthInfo(requestData);
> @@ -95,9 +96,6 @@ public class GFACSSHUtils {
>
>                  String key = credentials.getPortalUserName() +
> registeredHost.getType().getHostAddress() +
>                          serverInfo.getPort();
> -                if(sshAuth!=null){
> -                    key=sshAuth.getKey();
> -                }
>                  boolean recreate = false;
>                  synchronized (clusters) {
>                      if (clusters.containsKey(key) &&
> clusters.get(key).size() < maxClusterCount) {
> @@ -125,15 +123,8 @@ public class GFACSSHUtils {
>                          recreate = true;
>                      }
>                      if (recreate) {
> -                        if (sshAuth != null) {
> -                            pbsCluster = new
> PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),
> +                        pbsCluster = new PBSCluster(serverInfo,
> tokenizedSSHAuthInfo,
>
>  CommonUtils.getPBSJobManager(installedParentPath));
> -
> jobExecutionContext.setProperty(ADVANCED_SSH_AUTH,null); // some other
> provider might fail
> -                            key = sshAuth.getKey();
> -                        } else {
> -                            pbsCluster = new PBSCluster(serverInfo,
> tokenizedSSHAuthInfo,
> -
> CommonUtils.getPBSJobManager(installedParentPath));
> -                        }
>                          List<Cluster> pbsClusters = null;
>                          if (!(clusters.containsKey(key))) {
>                              pbsClusters = new ArrayList<Cluster>();
> @@ -148,10 +139,71 @@ public class GFACSSHUtils {
>                  e.printStackTrace();  //To change body of catch statement
> use File | Settings | File Templates.
>              }
>              sshSecurityContext.setPbsCluster(pbsCluster);
> -
> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT,
> sshSecurityContext);
> +
> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(),
> sshSecurityContext);
>          }
>      }
>
> +    /**
> +     * This method can be used to add third party resource security
> contexts
> +     * @param jobExecutionContext
> +     * @param sshAuth
> +     * @throws GFacException
> +     * @throws ApplicationSettingsException
> +     */
> +    public static void addSecurityContext(JobExecutionContext
> jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException,
> ApplicationSettingsException {
> +            try {
> +                if(sshAuth== null) {
> +                    throw new GFacException("Error adding security
> Context, because sshAuthWrapper is null");
> +                }
> +                SSHSecurityContext sshSecurityContext = new
> SSHSecurityContext();
> +                Cluster pbsCluster = null;
> +                String key=sshAuth.getKey();
> +                boolean recreate = false;
> +                synchronized (clusters) {
> +                    if (clusters.containsKey(key) &&
> clusters.get(key).size() < maxClusterCount) {
> +                        recreate = true;
> +                    } else if (clusters.containsKey(key)) {
> +                        int i = new Random().nextInt(Integer.MAX_VALUE) %
> maxClusterCount;
> +                        if
> (clusters.get(key).get(i).getSession().isConnected()) {
> +                            pbsCluster = clusters.get(key).get(i);
> +                        } else {
> +                            clusters.get(key).remove(i);
> +                            recreate = true;
> +                        }
> +                        if (!recreate) {
> +                            try {
> +                                pbsCluster.listDirectory("~/"); // its
> hard to trust isConnected method, so we try to connect if it works we are
> good,else we recreate
> +                            } catch (Exception e) {
> +                                clusters.get(key).remove(i);
> +                                logger.info("Connection found the
> connection map is expired, so we create from the scratch");
> +                                maxClusterCount++;
> +                                recreate = true; // we make the
> pbsCluster to create again if there is any exception druing connection
> +                            }
> +                        }
> +                        logger.info("Re-using the same connection used
> with the connection string:" + key);
> +                    } else {
> +                        recreate = true;
> +                    }
> +                    if (recreate) {
> +                        pbsCluster = new
> PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null);
> +                        key = sshAuth.getKey();
> +                        List<Cluster> pbsClusters = null;
> +                        if (!(clusters.containsKey(key))) {
> +                            pbsClusters = new ArrayList<Cluster>();
> +                        } else {
> +                            pbsClusters = clusters.get(key);
> +                        }
> +                        pbsClusters.add(pbsCluster);
> +                        clusters.put(key, pbsClusters);
> +                    }
> +                }
> +                sshSecurityContext.setPbsCluster(pbsCluster);
> +
> jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+key,
> sshSecurityContext);
> +            } catch (Exception e) {
> +                e.printStackTrace();  //To change body of catch statement
> use File | Settings | File Templates.
> +            }
> +    }
> +
>      public static JobDescriptor createJobDescriptor(JobExecutionContext
> jobExecutionContext,
>
>  ApplicationDeploymentDescriptionType app, Cluster cluster) {
>          JobDescriptor jobDescriptor = new JobDescriptor();
>
>


-- 
Research Assistant
Science Gateways Group
Indiana University

[13/44] git commit: fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
fixing typos in Airavata API and generate code for AIRAVATA-1471


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a3cef493
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a3cef493
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a3cef493

Branch: refs/heads/gfac_appcatalog_int
Commit: a3cef493bd4384309f471255d09a589c941f1730
Parents: a728bf2
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Oct 30 15:11:18 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Oct 30 15:11:18 2014 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    8 +-
 .../AiravataExperimentStatusUpdator.java        |    2 +-
 .../java/org/apache/airavata/api/Airavata.java  |  666 +-
 .../java/org/apache/airavata/api/Workflow.java  | 8191 ++++++++++++++++++
 .../main/resources/lib/airavata/Airavata.cpp    |  142 +-
 .../src/main/resources/lib/airavata/Airavata.h  |  126 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |   10 +-
 .../main/resources/lib/airavata/Workflow.cpp    |   36 +-
 .../src/main/resources/lib/airavata/Workflow.h  |    4 +-
 .../lib/airavata/Workflow_server.skeleton.cpp   |    2 +-
 .../resources/lib/airavata/airavataAPI_types.h  |    1 +
 .../resources/lib/Airavata/API/Airavata.php     |  140 +-
 airavata-api/generate-thrift-files.sh           |    6 +-
 .../airavataAPI.thrift                          | 3169 +++----
 .../appcatalog/cpi/ComputeResource.java         |    4 +-
 .../catalog/data/impl/ComputeResourceImpl.java  |   14 +-
 16 files changed, 10529 insertions(+), 1992 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 693ff14..9eb9c23 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -2411,10 +2411,10 @@ public class AiravataServerHandler implements Airavata.Iface {
      * Returns a success/failure of the deletion.
      */
     @Override
-    public boolean deleteJobSubmissionInterface(String jobSubmissionInterfaceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+    public boolean deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
         try {
             appCatalog = AppCatalogFactory.getAppCatalog();
-            appCatalog.getComputeResource().removeJobSubmissionInterface(jobSubmissionInterfaceId);
+            appCatalog.getComputeResource().removeJobSubmissionInterface(computeResourceId, jobSubmissionInterfaceId);
             return true;
         } catch (AppCatalogException e) {
             logger.errorId(jobSubmissionInterfaceId, "Error while deleting job submission interface...", e);
@@ -2433,10 +2433,10 @@ public class AiravataServerHandler implements Airavata.Iface {
      * Returns a success/failure of the deletion.
      */
     @Override
-    public boolean deleteDataMovementInterface(String dataMovementInterfaceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+    public boolean deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
         try {
             appCatalog = AppCatalogFactory.getAppCatalog();
-            appCatalog.getComputeResource().removeDataMovementInterface(dataMovementInterfaceId);
+            appCatalog.getComputeResource().removeDataMovementInterface(computeResourceId, dataMovementInterfaceId);
             return true;
         } catch (AppCatalogException e) {
             logger.errorId(dataMovementInterfaceId, "Error while deleting data movement interface...", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
index 05f5ddb..31dfb3a 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
@@ -66,7 +66,7 @@ public class AiravataExperimentStatusUpdator implements AbstractActivityListener
 	                state = ExperimentState.CANCELED; updateExperimentStatus = true;
 	                break;
 	            case COMPLETED:
-	                state = ExperimentState.EXECUTING; updateExperimentStatus = false;
+	                state = ExperimentState.EXECUTING; updateExperimentStatus = true;
 	                break;
 	            case INVOKED:
 	                state = ExperimentState.LAUNCHED; updateExperimentStatus = false;


[18/44] adding delete queue method

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index acd303a..8d1f9a8 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -1226,6 +1226,8 @@ import org.slf4j.LoggerFactory;
 
     public boolean deleteResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
+    public boolean deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
     /**
      * Register a Gateway Resource Profile.
      * 
@@ -1549,6 +1551,8 @@ import org.slf4j.LoggerFactory;
 
     public void deleteResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void deleteBatchQueue(String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getGatewayResourceProfile(String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -4229,6 +4233,39 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteResourceJobManager failed: unknown result");
     }
 
+    public boolean deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_deleteBatchQueue(computeResourceId, queueName);
+      return recv_deleteBatchQueue();
+    }
+
+    public void send_deleteBatchQueue(String computeResourceId, String queueName) throws org.apache.thrift.TException
+    {
+      deleteBatchQueue_args args = new deleteBatchQueue_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setQueueName(queueName);
+      sendBase("deleteBatchQueue", args);
+    }
+
+    public boolean recv_deleteBatchQueue() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      deleteBatchQueue_result result = new deleteBatchQueue_result();
+      receiveBase(result, "deleteBatchQueue");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteBatchQueue failed: unknown result");
+    }
+
     public String registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
       send_registerGatewayResourceProfile(gatewayResourceProfile);
@@ -7251,6 +7288,41 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void deleteBatchQueue(String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deleteBatchQueue_call method_call = new deleteBatchQueue_call(computeResourceId, queueName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deleteBatchQueue_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private String queueName;
+      public deleteBatchQueue_call(String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.queueName = queueName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteBatchQueue", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteBatchQueue_args args = new deleteBatchQueue_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setQueueName(queueName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_deleteBatchQueue();
+      }
+    }
+
     public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       registerGatewayResourceProfile_call method_call = new registerGatewayResourceProfile_call(gatewayResourceProfile, resultHandler, this, ___protocolFactory, ___transport);
@@ -7654,6 +7726,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("updateResourceJobManager", new updateResourceJobManager());
       processMap.put("getResourceJobManager", new getResourceJobManager());
       processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
+      processMap.put("deleteBatchQueue", new deleteBatchQueue());
       processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
       processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
       processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -9971,6 +10044,35 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public static class deleteBatchQueue<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteBatchQueue_args> {
+      public deleteBatchQueue() {
+        super("deleteBatchQueue");
+      }
+
+      public deleteBatchQueue_args getEmptyArgsInstance() {
+        return new deleteBatchQueue_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteBatchQueue_result getResult(I iface, deleteBatchQueue_args args) throws org.apache.thrift.TException {
+        deleteBatchQueue_result result = new deleteBatchQueue_result();
+        try {
+          result.success = iface.deleteBatchQueue(args.computeResourceId, args.queueName);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
     public static class registerGatewayResourceProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerGatewayResourceProfile_args> {
       public registerGatewayResourceProfile() {
         super("registerGatewayResourceProfile");
@@ -10322,6 +10424,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("updateResourceJobManager", new updateResourceJobManager());
       processMap.put("getResourceJobManager", new getResourceJobManager());
       processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
+      processMap.put("deleteBatchQueue", new deleteBatchQueue());
       processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
       processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
       processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -15821,21 +15924,22 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
-      public registerGatewayResourceProfile() {
-        super("registerGatewayResourceProfile");
+    public static class deleteBatchQueue<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteBatchQueue_args, Boolean> {
+      public deleteBatchQueue() {
+        super("deleteBatchQueue");
       }
 
-      public registerGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new registerGatewayResourceProfile_args();
+      public deleteBatchQueue_args getEmptyArgsInstance() {
+        return new deleteBatchQueue_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteBatchQueue_result result = new deleteBatchQueue_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15847,7 +15951,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+            deleteBatchQueue_result result = new deleteBatchQueue_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15883,25 +15987,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
+      public void start(I iface, deleteBatchQueue_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteBatchQueue(args.computeResourceId, args.queueName,resultHandler);
       }
     }
 
-    public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
-      public getGatewayResourceProfile() {
-        super("getGatewayResourceProfile");
+    public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
+      public registerGatewayResourceProfile() {
+        super("registerGatewayResourceProfile");
       }
 
-      public getGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new getGatewayResourceProfile_args();
+      public registerGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new registerGatewayResourceProfile_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
-            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -15914,7 +16018,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15950,27 +16054,26 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
-        iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
+      public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
       }
     }
 
-    public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
-      public updateGatewayResourceProfile() {
-        super("updateGatewayResourceProfile");
+    public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
+      public getGatewayResourceProfile() {
+        super("getGatewayResourceProfile");
       }
 
-      public updateGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new updateGatewayResourceProfile_args();
+      public getGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new getGatewayResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
+            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15982,7 +16085,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -16018,25 +16121,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
+      public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
+        iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
       }
     }
 
-    public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
-      public deleteGatewayResourceProfile() {
-        super("deleteGatewayResourceProfile");
+    public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
+      public updateGatewayResourceProfile() {
+        super("updateGatewayResourceProfile");
       }
 
-      public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new deleteGatewayResourceProfile_args();
+      public updateGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new updateGatewayResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -16050,7 +16153,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -16086,25 +16189,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
+      public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
       }
     }
 
-    public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
-      public addGatewayComputeResourcePreference() {
-        super("addGatewayComputeResourcePreference");
+    public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
+      public deleteGatewayResourceProfile() {
+        super("deleteGatewayResourceProfile");
       }
 
-      public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new addGatewayComputeResourcePreference_args();
+      public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new deleteGatewayResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -16118,74 +16221,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
-            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
-                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
-                        result.setIreIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
-                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
-                        result.setAceIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
-                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
-                        result.setAseIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
-      }
-    }
-
-    public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
-      public getGatewayComputeResourcePreference() {
-        super("getGatewayComputeResourcePreference");
-      }
-
-      public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new getGatewayComputeResourcePreference_args();
-      }
-
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
-            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -16221,26 +16257,27 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
-        iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+      public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
       }
     }
 
-    public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
-      public getAllGatewayComputeResourcePreferences() {
-        super("getAllGatewayComputeResourcePreferences");
+    public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
+      public addGatewayComputeResourcePreference() {
+        super("addGatewayComputeResourcePreference");
       }
 
-      public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
-        return new getAllGatewayComputeResourcePreferences_args();
+      public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new addGatewayComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
-            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -16252,7 +16289,141 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+      }
+    }
+
+    public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
+      public getGatewayComputeResourcePreference() {
+        super("getGatewayComputeResourcePreference");
+      }
+
+      public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new getGatewayComputeResourcePreference_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
+            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
+        iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+      }
+    }
+
+    public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
+      public getAllGatewayComputeResourcePreferences() {
+        super("getAllGatewayComputeResourcePreferences");
+      }
+
+      public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
+        return new getAllGatewayComputeResourcePreferences_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
+            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -36765,42 +36936,1164 @@ import org.slf4j.LoggerFactory;
       tmpMap.put(_Fields.AIRAVATA_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_args.class, metaDataMap);
+    }
+
+    public validateExperiment_args() {
+    }
+
+    public validateExperiment_args(
+      String airavataExperimentId)
+    {
+      this();
+      this.airavataExperimentId = airavataExperimentId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public validateExperiment_args(validateExperiment_args other) {
+      if (other.isSetAiravataExperimentId()) {
+        this.airavataExperimentId = other.airavataExperimentId;
+      }
+    }
+
+    public validateExperiment_args deepCopy() {
+      return new validateExperiment_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.airavataExperimentId = null;
+    }
+
+    public String getAiravataExperimentId() {
+      return this.airavataExperimentId;
+    }
+
+    public validateExperiment_args setAiravataExperimentId(String airavataExperimentId) {
+      this.airavataExperimentId = airavataExperimentId;
+      return this;
+    }
+
+    public void unsetAiravataExperimentId() {
+      this.airavataExperimentId = null;
+    }
+
+    /** Returns true if field airavataExperimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetAiravataExperimentId() {
+      return this.airavataExperimentId != null;
+    }
+
+    public void setAiravataExperimentIdIsSet(boolean value) {
+      if (!value) {
+        this.airavataExperimentId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case AIRAVATA_EXPERIMENT_ID:
+        if (value == null) {
+          unsetAiravataExperimentId();
+        } else {
+          setAiravataExperimentId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case AIRAVATA_EXPERIMENT_ID:
+        return getAiravataExperimentId();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case AIRAVATA_EXPERIMENT_ID:
+        return isSetAiravataExperimentId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof validateExperiment_args)
+        return this.equals((validateExperiment_args)that);
+      return false;
+    }
+
+    public boolean equals(validateExperiment_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_airavataExperimentId = true && this.isSetAiravataExperimentId();
+      boolean that_present_airavataExperimentId = true && that.isSetAiravataExperimentId();
+      if (this_present_airavataExperimentId || that_present_airavataExperimentId) {
+        if (!(this_present_airavataExperimentId && that_present_airavataExperimentId))
+          return false;
+        if (!this.airavataExperimentId.equals(that.airavataExperimentId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(validateExperiment_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetAiravataExperimentId()).compareTo(other.isSetAiravataExperimentId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAiravataExperimentId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataExperimentId, other.airavataExperimentId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("validateExperiment_args(");
+      boolean first = true;
+
+      sb.append("airavataExperimentId:");
+      if (this.airavataExperimentId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.airavataExperimentId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (airavataExperimentId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataExperimentId' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class validateExperiment_argsStandardSchemeFactory implements SchemeFactory {
+      public validateExperiment_argsStandardScheme getScheme() {
+        return new validateExperiment_argsStandardScheme();
+      }
+    }
+
+    private static class validateExperiment_argsStandardScheme extends StandardScheme<validateExperiment_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // AIRAVATA_EXPERIMENT_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.airavataExperimentId = iprot.readString();
+                struct.setAiravataExperimentIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.airavataExperimentId != null) {
+          oprot.writeFieldBegin(AIRAVATA_EXPERIMENT_ID_FIELD_DESC);
+          oprot.writeString(struct.airavataExperimentId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class validateExperiment_argsTupleSchemeFactory implements SchemeFactory {
+      public validateExperiment_argsTupleScheme getScheme() {
+        return new validateExperiment_argsTupleScheme();
+      }
+    }
+
+    private static class validateExperiment_argsTupleScheme extends TupleScheme<validateExperiment_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.airavataExperimentId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.airavataExperimentId = iprot.readString();
+        struct.setAiravataExperimentIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class validateExperiment_result implements org.apache.thrift.TBase<validateExperiment_result, validateExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateExperiment_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateExperiment_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+    private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField ENF_FIELD_DESC = new org.apache.thrift.protocol.TField("enf", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+    private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new validateExperiment_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new validateExperiment_resultTupleSchemeFactory());
+    }
+
+    public boolean success; // required
+    public org.apache.airavata.model.error.InvalidRequestException ire; // required
+    public org.apache.airavata.model.error.ExperimentNotFoundException enf; // required
+    public org.apache.airavata.model.error.AiravataClientException ace; // required
+    public org.apache.airavata.model.error.AiravataSystemException ase; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      IRE((short)1, "ire"),
+      ENF((short)2, "enf"),
+      ACE((short)3, "ace"),
+      ASE((short)4, "ase");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // IRE
+            return IRE;
+          case 2: // ENF
+            return ENF;
+          case 3: // ACE
+            return ACE;
+          case 4: // ASE
+            return ASE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+      tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ENF, new org.apache.thrift.meta_data.FieldMetaData("enf", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_result.class, metaDataMap);
+    }
+
+    public validateExperiment_result() {
+    }
+
+    public validateExperiment_result(
+      boolean success,
+      org.apache.airavata.model.error.InvalidRequestException ire,
+      org.apache.airavata.model.error.ExperimentNotFoundException enf,
+      org.apache.airavata.model.error.AiravataClientException ace,
+      org.apache.airavata.model.error.AiravataSystemException ase)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+      this.ire = ire;
+      this.enf = enf;
+      this.ace = ace;
+      this.ase = ase;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public validateExperiment_result(validateExperiment_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+      if (other.isSetIre()) {
+        this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+      }
+      if (other.isSetEnf()) {
+        this.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(other.enf);
+      }
+      if (other.isSetAce()) {
+        this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+      }
+      if (other.isSetAse()) {
+        this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+      }
+    }
+
+    public validateExperiment_result deepCopy() {
+      return new validateExperiment_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = false;
+      this.ire = null;
+      this.enf = null;
+      this.ace = null;
+      this.ase = null;
+    }
+
+    public boolean isSuccess() {
+      return this.success;
+    }
+
+    public validateExperiment_result setSuccess(boolean success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public org.apache.airavata.model.error.InvalidRequestException getIre() {
+      return this.ire;
+    }
+
+    public validateExperiment_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+      this.ire = ire;
+      return this;
+    }
+
+    public void unsetIre() {
+      this.ire = null;
+    }
+
+    /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+    public boolean isSetIre() {
+      return this.ire != null;
+    }
+
+    public void setIreIsSet(boolean value) {
+      if (!value) {
+        this.ire = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.ExperimentNotFoundException getEnf() {
+      return this.enf;
+    }
+
+    public validateExperiment_result setEnf(org.apache.airavata.model.error.ExperimentNotFoundException enf) {
+      this.enf = enf;
+      return this;
+    }
+
+    public void unsetEnf() {
+      this.enf = null;
+    }
+
+    /** Returns true if field enf is set (has been assigned a value) and false otherwise */
+    public boolean isSetEnf() {
+      return this.enf != null;
+    }
+
+    public void setEnfIsSet(boolean value) {
+      if (!value) {
+        this.enf = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataClientException getAce() {
+      return this.ace;
+    }
+
+    public validateExperiment_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+      this.ace = ace;
+      return this;
+    }
+
+    public void unsetAce() {
+      this.ace = null;
+    }
+
+    /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+    public boolean isSetAce() {
+      return this.ace != null;
+    }
+
+    public void setAceIsSet(boolean value) {
+      if (!value) {
+        this.ace = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataSystemException getAse() {
+      return this.ase;
+    }
+
+    public validateExperiment_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+      this.ase = ase;
+      return this;
+    }
+
+    public void unsetAse() {
+      this.ase = null;
+    }
+
+    /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+    public boolean isSetAse() {
+      return this.ase != null;
+    }
+
+    public void setAseIsSet(boolean value) {
+      if (!value) {
+        this.ase = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Boolean)value);
+        }
+        break;
+
+      case IRE:
+        if (value == null) {
+          unsetIre();
+        } else {
+          setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+        }
+        break;
+
+      case ENF:
+        if (value == null) {
+          unsetEnf();
+        } else {
+          setEnf((org.apache.airavata.model.error.ExperimentNotFoundException)value);
+        }
+        break;
+
+      case ACE:
+        if (value == null) {
+          unsetAce();
+        } else {
+          setAce((org.apache.airavata.model.error.AiravataClientException)value);
+        }
+        break;
+
+      case ASE:
+        if (value == null) {
+          unsetAse();
+        } else {
+          setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Boolean.valueOf(isSuccess());
+
+      case IRE:
+        return getIre();
+
+      case ENF:
+        return getEnf();
+
+      case ACE:
+        return getAce();
+
+      case ASE:
+        return getAse();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case IRE:
+        return isSetIre();
+      case ENF:
+        return isSetEnf();
+      case ACE:
+        return isSetAce();
+      case ASE:
+        return isSetAse();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof validateExperiment_result)
+        return this.equals((validateExperiment_result)that);
+      return false;
+    }
+
+    public boolean equals(validateExperiment_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ire = true && this.isSetIre();
+      boolean that_present_ire = true && that.isSetIre();
+      if (this_present_ire || that_present_ire) {
+        if (!(this_present_ire && that_present_ire))
+          return false;
+        if (!this.ire.equals(that.ire))
+          return false;
+      }
+
+      boolean this_present_enf = true && this.isSetEnf();
+      boolean that_present_enf = true && that.isSetEnf();
+      if (this_present_enf || that_present_enf) {
+        if (!(this_present_enf && that_present_enf))
+          return false;
+        if (!this.enf.equals(that.enf))
+          return false;
+      }
+
+      boolean this_present_ace = true && this.isSetAce();
+      boolean that_present_ace = true && that.isSetAce();
+      if (this_present_ace || that_present_ace) {
+        if (!(this_present_ace && that_present_ace))
+          return false;
+        if (!this.ace.equals(that.ace))
+          return false;
+      }
+
+      boolean this_present_ase = true && this.isSetAse();
+      boolean that_present_ase = true && that.isSetAse();
+      if (this_present_ase || that_present_ase) {
+        if (!(this_present_ase && that_present_ase))
+          return false;
+        if (!this.ase.equals(that.ase))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(validateExperiment_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIre()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetEnf()).compareTo(other.isSetEnf());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEnf()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enf, other.enf);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAce()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAse()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("validateExperiment_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ire:");
+      if (this.ire == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ire);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("enf:");
+      if (this.enf == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.enf);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ace:");
+      if (this.ace == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ace);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ase:");
+      if (this.ase == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ase);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class validateExperiment_resultStandardSchemeFactory implements SchemeFactory {
+      public validateExperiment_resultStandardScheme getScheme() {
+        return new validateExperiment_resultStandardScheme();
+      }
+    }
+
+    private static class validateExperiment_resultStandardScheme extends StandardScheme<validateExperiment_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.success = iprot.readBool();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // IRE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+                struct.ire.read(iprot);
+                struct.setIreIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // ENF
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException();
+                struct.enf.read(iprot);
+                struct.setEnfIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // ACE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+                struct.ace.read(iprot);
+                struct.setAceIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // ASE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+                struct.ase.read(iprot);
+                struct.setAseIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeBool(struct.success);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ire != null) {
+          oprot.writeFieldBegin(IRE_FIELD_DESC);
+          struct.ire.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.enf != null) {
+          oprot.writeFieldBegin(ENF_FIELD_DESC);
+          struct.enf.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ace != null) {
+          oprot.writeFieldBegin(ACE_FIELD_DESC);
+          struct.ace.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ase != null) {
+          oprot.writeFieldBegin(ASE_FIELD_DESC);
+          struct.ase.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class validateExperiment_resultTupleSchemeFactory implements SchemeFactory {
+      public validateExperiment_resultTupleScheme getScheme() {
+        return new validateExperiment_resultTupleScheme();
+      }
+    }
+
+    private static class validateExperiment_resultTupleScheme extends TupleScheme<validateExperiment_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetIre()) {
+          optionals.set(1);
+        }
+        if (struct.isSetEnf()) {
+          optionals.set(2);
+        }
+        if (struct.isSetAce()) {
+          optionals.set(3);
+        }
+        if (struct.isSetAse()) {
+          optionals.set(4);
+        }
+        oprot.writeBitSet(optionals, 5);
+        if (struct.isSetSuccess()) {
+          oprot.writeBool(struct.success);
+        }
+        if (struct.isSetIre()) {
+          struct.ire.write(oprot);
+        }
+        if (struct.isSetEnf()) {
+          struct.enf.write(oprot);
+        }
+        if (struct.isSetAce()) {
+          struct.ace.write(oprot);
+        }
+        if (struct.isSetAse()) {
+          struct.ase.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(5);
+        if (incoming.get(0)) {
+          struct.success = iprot.readBool();
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+          struct.ire.read(iprot);
+          struct.setIreIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException();
+          struct.enf.read(iprot);
+          struct.setEnfIsSet(true);
+        }
+        if (incoming.get(3)) {
+          struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+          struct.ace.read(iprot);
+          struct.setAceIsSet(true);
+        }
+        if (incoming.get(4)) {
+          struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+          struct.ase.read(iprot);
+          struct.setAseIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class launchExperiment_args implements org.apache.thrift.TBase<launchExperiment_args, launchExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_args");
+
+    private static final org.apache.thrift.protocol.TField AIRAVATA_EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataExperimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new launchExperiment_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new launchExperiment_argsTupleSchemeFactory());
+    }
+
+    public String airavataExperimentId; // required
+    public String airavataCredStoreToken; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      AIRAVATA_EXPERIMENT_ID((short)1, "airavataExperimentId"),
+      AIRAVATA_CRED_STORE_TOKEN((short)2, "airavataCredStoreToken");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // AIRAVATA_EXPERIMENT_ID
+            return AIRAVATA_EXPERIMENT_ID;
+          case 2: // AIRAVATA_CRED_STORE_TOKEN
+            return AIRAVATA_CRED_STORE_TOKEN;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.AIRAVATA_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AIRAVATA_CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("airavataCredStoreToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchExperiment_args.class, metaDataMap);
     }
 
-    public validateExperiment_args() {
+    public launchExperiment_args() {
     }
 
-    public validateExperiment_args(
-      String airavataExperimentId)
+    public launchExperiment_args(
+      String airavataExperimentId,
+      String airavataCredStoreToken)
     {
       this();
       this.airavataExperimentId = airavataExperimentId;
+      this.airavataCredStoreToken = airavataCredStoreToken;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public validateExperiment_args(validateExperiment_args other) {
+    public launchExperiment_args(launchExperiment_args other) {
       if (other.isSetAiravataExperimentId()) {
         this.airavataExperimentId = other.airavataExperimentId;
       }
+      if (other.isSetAiravataCredStoreToken()) {
+        this.airavataCredStoreToken = other.airavataCredStoreToken;
+      }
     }
 
-    public validateExperiment_args deepCopy() {
-      return new validateExperiment_args(this);
+    public launchExperiment_args deepCopy() {
+      return new launchExperiment_args(this);
     }
 
     @Override
     public void clear() {
       this.airavataExperimentId = null;
+      this.airavataCredStoreToken = null;
     }
 
     public String getAiravataExperimentId() {
       return this.airavataExperimentId;
     }
 
-    public validateExperiment_args setAiravataExperimentId(String airavataExperimentId) {
+    public launchExperiment_args setAiravataExperimentId(String airavataExperimentId) {
       this.airavataExperimentId = airavataExperimentId;
       return this;
     }
@@ -36820,6 +38113,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public String getAiravataCredStoreToken() {
+      return this.airavataCredStoreToken;
+    }
+
+    public launchExperiment_args setAiravataCredStoreToken(String airavataCredStoreToken) {
+      this.airavataCredStoreToken = airavataCredStoreToken;
+      return this;
+    }
+
+    public void unsetAiravataCredStoreToken() {
+      this.airavataCredStoreToken = null;
+    }
+
+    /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */
+    public boolean isSetAiravataCredStoreToken() {
+      return this.airavataCredStoreToken != null;
+    }
+
+    public void setAiravataCredStoreTokenIsSet(boolean value) {
+      if (!value) {
+        this.airavataCredStoreToken = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case AIRAVATA_EXPERIMENT_ID:
@@ -36830,6 +38147,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case AIRAVATA_CRED_STORE_TOKEN:
+        if (value == null) {
+          unsetAiravataCredStoreToken();
+        } else {
+          setAiravataCredStoreToken((String)value);
+        }
+        break;
+
       }
     }
 
@@ -36838,6 +38163,9 @@ import org.slf4j.LoggerFactory;
       case AIRAVATA_EXPERIMENT_ID:
         return getAiravataExperimentId();
 
+      case AIRAVATA_CRED_STORE_TOKEN:
+        return getAiravataCredStoreToken();
+
       }
       throw new IllegalStateException();
     }
@@ -36851,6 +38179,8 @@ import org.slf4j.LoggerFactory;
       switch (field) {
       case AIRAVATA_EXPERIMENT_ID:
         return isSetAiravataExperimentId();
+      case AIRAVATA_CRED_STORE_TOKEN:
+        return isSetAiravataCredStoreToken();
       }
       throw new IllegalStateException();
     }
@@ -36859,12 +38189,12 @@ import org.slf4j.LoggerFactory;
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof validateExperiment_args)
-        return this.equals((validateExperiment_args)that);
+      if (that instanceof launchExperiment_args)
+        return this.equals((launchExperiment_args)that);
       return false;
     }
 
-    public boolean equals(validateExperiment_args that) {
+    public boolean equals(launchExperiment_args that) {
       if (that == null)
         return false;
 
@@ -36877,6 +38207,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken();
+      boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken();
+      if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) {
+        if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken))
+          return false;
+        if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken))
+          return false;
+      }
+
       return true;
     }
 
@@ -36886,7 +38225,7 @@ import org.slf4j.LoggerFactory;
     }
 
     @Override
-    public int compareTo(validateExperiment_args other) {
+    public int compareTo(launchExperiment_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -36903,6 +38242,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAiravataCredStoreToken()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -36920,7 +38269,7 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("validateExperiment_args(");
+      StringBuilder sb = new StringBuilder("launchExperiment_args(");
       boolean first = true;
 
       sb.append("airavataExperimentId:");
@@ -36930,6 +38279,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.airavataExperimentId);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("airavataCredStoreToken:");
+      if (this.airavataCredStoreToken == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.airavataCredStoreToken);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -36939,6 +38296,9 @@ import org.slf4j.LoggerFactory;
       if (airavataExperimentId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataExperimentId' was not present! Struct: " + toString());
       }
+      if (airavataCredStoreToken == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
     }
 
@@ -36958,15 +38318,15 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    private static class validateExperiment_argsStandardSchemeFactory implements SchemeFactory {
-      public validateExperiment_argsStandardScheme getScheme() {
-        return new validateExperiment_argsStandardScheme();
+    private static class launchExperiment_argsStandardSchemeFactory implements SchemeFactory {
+      public launchExperiment_argsStandardScheme getScheme() {
+        return new launchExperiment_argsStandardScheme();
       }
     }
 
-    private static class validateExperiment_argsStandardScheme extends StandardScheme<validateExperiment_args> {
+    private static class launchExperiment_argsStandardScheme extends StandardScheme<launchExperiment_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, launchExperiment_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -36984,6 +38344,14 @@ import org.slf4j.LoggerFactory;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 2: // AIRAVATA_CRED_STORE_TOKEN
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.airavataCredStoreToken = iprot.readString();
+                struct.setAiravataCredStoreTokenIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -36995,7 +38363,7 @@ import org.slf4j.LoggerFactory;
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, validateExperiment_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, launchExperiment_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -37004,64 +38372,72 @@ import org.slf4j.LoggerFactory;
           oprot.writeString(struct.airavataExperimentId);
           oprot.writeFieldEnd();
         }
+        if (struct.airavataCredStoreToken != null) {
+          oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
+          oprot.writeString(struct.airavataCredStoreToken);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class validateExperiment_argsTupleSchemeFactory implements SchemeFactory {
-      public validateExperiment_argsTupleScheme getScheme() {
-        return new validateExperiment_argsTupleScheme();
+    private static class launchExperiment_argsTupleSchemeFactory implements SchemeFactory {
+      public launchExperiment_argsTupleScheme getScheme() {
+        return new launchExperiment_argsTupleScheme();
       }
     }
 
-    private static class validateExperiment_argsTupleScheme extends TupleScheme<validateExperiment_args> {
+    private static class launchExperiment_argsTupleScheme extends T

<TRUNCATED>

[43/44] git commit: Merge remote-tracking branch 'origin/gfac_appcatalog_int' into gfac_appcatalog_int

Posted by ch...@apache.org.
Merge remote-tracking branch 'origin/gfac_appcatalog_int' into gfac_appcatalog_int

Conflicts:
	modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
	modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
	modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7b8d9844
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7b8d9844
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7b8d9844

Branch: refs/heads/gfac_appcatalog_int
Commit: 7b8d9844f72c81e2d16fb961a60876e9dbeea82d
Parents: fa666b3 e9ee22b
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Nov 5 13:27:45 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 13:27:45 2014 -0500

----------------------------------------------------------------------
 .../airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7b8d9844/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------


[10/44] fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index 7f5e807..ca5ead1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -15435,7 +15435,7 @@ uint32_t Airavata_updateLocalDataMovementDetails_args::read(::apache::thrift::pr
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_jobSubmissionInterfaceId = false;
+  bool isset_dataMovementInterfaceId = false;
   bool isset_localDataMovement = false;
 
   while (true)
@@ -15448,8 +15448,8 @@ uint32_t Airavata_updateLocalDataMovementDetails_args::read(::apache::thrift::pr
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->jobSubmissionInterfaceId);
-          isset_jobSubmissionInterfaceId = true;
+          xfer += iprot->readString(this->dataMovementInterfaceId);
+          isset_dataMovementInterfaceId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -15471,7 +15471,7 @@ uint32_t Airavata_updateLocalDataMovementDetails_args::read(::apache::thrift::pr
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_jobSubmissionInterfaceId)
+  if (!isset_dataMovementInterfaceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_localDataMovement)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -15482,8 +15482,8 @@ uint32_t Airavata_updateLocalDataMovementDetails_args::write(::apache::thrift::p
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateLocalDataMovementDetails_args");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->jobSubmissionInterfaceId);
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->dataMovementInterfaceId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("localDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -15499,8 +15499,8 @@ uint32_t Airavata_updateLocalDataMovementDetails_pargs::write(::apache::thrift::
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateLocalDataMovementDetails_pargs");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->jobSubmissionInterfaceId)));
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->dataMovementInterfaceId)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("localDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -16167,7 +16167,7 @@ uint32_t Airavata_updateSCPDataMovementDetails_args::read(::apache::thrift::prot
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_jobSubmissionInterfaceId = false;
+  bool isset_dataMovementInterfaceId = false;
   bool isset_scpDataMovement = false;
 
   while (true)
@@ -16180,8 +16180,8 @@ uint32_t Airavata_updateSCPDataMovementDetails_args::read(::apache::thrift::prot
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->jobSubmissionInterfaceId);
-          isset_jobSubmissionInterfaceId = true;
+          xfer += iprot->readString(this->dataMovementInterfaceId);
+          isset_dataMovementInterfaceId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -16203,7 +16203,7 @@ uint32_t Airavata_updateSCPDataMovementDetails_args::read(::apache::thrift::prot
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_jobSubmissionInterfaceId)
+  if (!isset_dataMovementInterfaceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_scpDataMovement)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -16214,8 +16214,8 @@ uint32_t Airavata_updateSCPDataMovementDetails_args::write(::apache::thrift::pro
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateSCPDataMovementDetails_args");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->jobSubmissionInterfaceId);
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->dataMovementInterfaceId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("scpDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -16231,8 +16231,8 @@ uint32_t Airavata_updateSCPDataMovementDetails_pargs::write(::apache::thrift::pr
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateSCPDataMovementDetails_pargs");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->jobSubmissionInterfaceId)));
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->dataMovementInterfaceId)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("scpDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -16899,7 +16899,7 @@ uint32_t Airavata_updateGridFTPDataMovementDetails_args::read(::apache::thrift::
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_jobSubmissionInterfaceId = false;
+  bool isset_dataMovementInterfaceId = false;
   bool isset_gridFTPDataMovement = false;
 
   while (true)
@@ -16912,8 +16912,8 @@ uint32_t Airavata_updateGridFTPDataMovementDetails_args::read(::apache::thrift::
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->jobSubmissionInterfaceId);
-          isset_jobSubmissionInterfaceId = true;
+          xfer += iprot->readString(this->dataMovementInterfaceId);
+          isset_dataMovementInterfaceId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -16935,7 +16935,7 @@ uint32_t Airavata_updateGridFTPDataMovementDetails_args::read(::apache::thrift::
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_jobSubmissionInterfaceId)
+  if (!isset_dataMovementInterfaceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_gridFTPDataMovement)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -16946,8 +16946,8 @@ uint32_t Airavata_updateGridFTPDataMovementDetails_args::write(::apache::thrift:
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateGridFTPDataMovementDetails_args");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->jobSubmissionInterfaceId);
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->dataMovementInterfaceId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("gridFTPDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -16963,8 +16963,8 @@ uint32_t Airavata_updateGridFTPDataMovementDetails_pargs::write(::apache::thrift
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_updateGridFTPDataMovementDetails_pargs");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->jobSubmissionInterfaceId)));
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->dataMovementInterfaceId)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("gridFTPDataMovement", ::apache::thrift::protocol::T_STRUCT, 2);
@@ -18372,6 +18372,7 @@ uint32_t Airavata_deleteJobSubmissionInterface_args::read(::apache::thrift::prot
 
   using ::apache::thrift::protocol::TProtocolException;
 
+  bool isset_computeResourceId = false;
   bool isset_jobSubmissionInterfaceId = false;
 
   while (true)
@@ -18384,6 +18385,14 @@ uint32_t Airavata_deleteJobSubmissionInterface_args::read(::apache::thrift::prot
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->jobSubmissionInterfaceId);
           isset_jobSubmissionInterfaceId = true;
         } else {
@@ -18399,6 +18408,8 @@ uint32_t Airavata_deleteJobSubmissionInterface_args::read(::apache::thrift::prot
 
   xfer += iprot->readStructEnd();
 
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_jobSubmissionInterfaceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
@@ -18408,7 +18419,11 @@ uint32_t Airavata_deleteJobSubmissionInterface_args::write(::apache::thrift::pro
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_deleteJobSubmissionInterface_args");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->jobSubmissionInterfaceId);
   xfer += oprot->writeFieldEnd();
 
@@ -18421,7 +18436,11 @@ uint32_t Airavata_deleteJobSubmissionInterface_pargs::write(::apache::thrift::pr
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_deleteJobSubmissionInterface_pargs");
 
-  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->jobSubmissionInterfaceId)));
   xfer += oprot->writeFieldEnd();
 
@@ -18597,6 +18616,7 @@ uint32_t Airavata_deleteDataMovementInterface_args::read(::apache::thrift::proto
 
   using ::apache::thrift::protocol::TProtocolException;
 
+  bool isset_computeResourceId = false;
   bool isset_dataMovementInterfaceId = false;
 
   while (true)
@@ -18609,6 +18629,14 @@ uint32_t Airavata_deleteDataMovementInterface_args::read(::apache::thrift::proto
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->dataMovementInterfaceId);
           isset_dataMovementInterfaceId = true;
         } else {
@@ -18624,6 +18652,8 @@ uint32_t Airavata_deleteDataMovementInterface_args::read(::apache::thrift::proto
 
   xfer += iprot->readStructEnd();
 
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_dataMovementInterfaceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
@@ -18633,7 +18663,11 @@ uint32_t Airavata_deleteDataMovementInterface_args::write(::apache::thrift::prot
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_deleteDataMovementInterface_args");
 
-  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->dataMovementInterfaceId);
   xfer += oprot->writeFieldEnd();
 
@@ -18646,7 +18680,11 @@ uint32_t Airavata_deleteDataMovementInterface_pargs::write(::apache::thrift::pro
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Airavata_deleteDataMovementInterface_pargs");
 
-  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->dataMovementInterfaceId)));
   xfer += oprot->writeFieldEnd();
 
@@ -26165,19 +26203,19 @@ void AiravataClient::recv_addLocalDataMovementDetails(std::string& _return)
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "addLocalDataMovementDetails failed: unknown result");
 }
 
-bool AiravataClient::updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement)
+bool AiravataClient::updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement)
 {
-  send_updateLocalDataMovementDetails(jobSubmissionInterfaceId, localDataMovement);
+  send_updateLocalDataMovementDetails(dataMovementInterfaceId, localDataMovement);
   return recv_updateLocalDataMovementDetails();
 }
 
-void AiravataClient::send_updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement)
+void AiravataClient::send_updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("updateLocalDataMovementDetails", ::apache::thrift::protocol::T_CALL, cseqid);
 
   Airavata_updateLocalDataMovementDetails_pargs args;
-  args.jobSubmissionInterfaceId = &jobSubmissionInterfaceId;
+  args.dataMovementInterfaceId = &dataMovementInterfaceId;
   args.localDataMovement = &localDataMovement;
   args.write(oprot_);
 
@@ -26369,19 +26407,19 @@ void AiravataClient::recv_addSCPDataMovementDetails(std::string& _return)
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "addSCPDataMovementDetails failed: unknown result");
 }
 
-bool AiravataClient::updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement)
+bool AiravataClient::updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement)
 {
-  send_updateSCPDataMovementDetails(jobSubmissionInterfaceId, scpDataMovement);
+  send_updateSCPDataMovementDetails(dataMovementInterfaceId, scpDataMovement);
   return recv_updateSCPDataMovementDetails();
 }
 
-void AiravataClient::send_updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement)
+void AiravataClient::send_updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("updateSCPDataMovementDetails", ::apache::thrift::protocol::T_CALL, cseqid);
 
   Airavata_updateSCPDataMovementDetails_pargs args;
-  args.jobSubmissionInterfaceId = &jobSubmissionInterfaceId;
+  args.dataMovementInterfaceId = &dataMovementInterfaceId;
   args.scpDataMovement = &scpDataMovement;
   args.write(oprot_);
 
@@ -26573,19 +26611,19 @@ void AiravataClient::recv_addGridFTPDataMovementDetails(std::string& _return)
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "addGridFTPDataMovementDetails failed: unknown result");
 }
 
-bool AiravataClient::updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement)
+bool AiravataClient::updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement)
 {
-  send_updateGridFTPDataMovementDetails(jobSubmissionInterfaceId, gridFTPDataMovement);
+  send_updateGridFTPDataMovementDetails(dataMovementInterfaceId, gridFTPDataMovement);
   return recv_updateGridFTPDataMovementDetails();
 }
 
-void AiravataClient::send_updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement)
+void AiravataClient::send_updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("updateGridFTPDataMovementDetails", ::apache::thrift::protocol::T_CALL, cseqid);
 
   Airavata_updateGridFTPDataMovementDetails_pargs args;
-  args.jobSubmissionInterfaceId = &jobSubmissionInterfaceId;
+  args.dataMovementInterfaceId = &dataMovementInterfaceId;
   args.gridFTPDataMovement = &gridFTPDataMovement;
   args.write(oprot_);
 
@@ -26978,18 +27016,19 @@ bool AiravataClient::recv_changeDataMovementPriorities()
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "changeDataMovementPriorities failed: unknown result");
 }
 
-bool AiravataClient::deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId)
+bool AiravataClient::deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId)
 {
-  send_deleteJobSubmissionInterface(jobSubmissionInterfaceId);
+  send_deleteJobSubmissionInterface(computeResourceId, jobSubmissionInterfaceId);
   return recv_deleteJobSubmissionInterface();
 }
 
-void AiravataClient::send_deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId)
+void AiravataClient::send_deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("deleteJobSubmissionInterface", ::apache::thrift::protocol::T_CALL, cseqid);
 
   Airavata_deleteJobSubmissionInterface_pargs args;
+  args.computeResourceId = &computeResourceId;
   args.jobSubmissionInterfaceId = &jobSubmissionInterfaceId;
   args.write(oprot_);
 
@@ -27045,18 +27084,19 @@ bool AiravataClient::recv_deleteJobSubmissionInterface()
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteJobSubmissionInterface failed: unknown result");
 }
 
-bool AiravataClient::deleteDataMovementInterface(const std::string& dataMovementInterfaceId)
+bool AiravataClient::deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId)
 {
-  send_deleteDataMovementInterface(dataMovementInterfaceId);
+  send_deleteDataMovementInterface(computeResourceId, dataMovementInterfaceId);
   return recv_deleteDataMovementInterface();
 }
 
-void AiravataClient::send_deleteDataMovementInterface(const std::string& dataMovementInterfaceId)
+void AiravataClient::send_deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("deleteDataMovementInterface", ::apache::thrift::protocol::T_CALL, cseqid);
 
   Airavata_deleteDataMovementInterface_pargs args;
+  args.computeResourceId = &computeResourceId;
   args.dataMovementInterfaceId = &dataMovementInterfaceId;
   args.write(oprot_);
 
@@ -32023,7 +32063,7 @@ void AiravataProcessor::process_updateLocalDataMovementDetails(int32_t seqid, ::
 
   Airavata_updateLocalDataMovementDetails_result result;
   try {
-    result.success = iface_->updateLocalDataMovementDetails(args.jobSubmissionInterfaceId, args.localDataMovement);
+    result.success = iface_->updateLocalDataMovementDetails(args.dataMovementInterfaceId, args.localDataMovement);
     result.__isset.success = true;
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;
@@ -32212,7 +32252,7 @@ void AiravataProcessor::process_updateSCPDataMovementDetails(int32_t seqid, ::ap
 
   Airavata_updateSCPDataMovementDetails_result result;
   try {
-    result.success = iface_->updateSCPDataMovementDetails(args.jobSubmissionInterfaceId, args.scpDataMovement);
+    result.success = iface_->updateSCPDataMovementDetails(args.dataMovementInterfaceId, args.scpDataMovement);
     result.__isset.success = true;
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;
@@ -32401,7 +32441,7 @@ void AiravataProcessor::process_updateGridFTPDataMovementDetails(int32_t seqid,
 
   Airavata_updateGridFTPDataMovementDetails_result result;
   try {
-    result.success = iface_->updateGridFTPDataMovementDetails(args.jobSubmissionInterfaceId, args.gridFTPDataMovement);
+    result.success = iface_->updateGridFTPDataMovementDetails(args.dataMovementInterfaceId, args.gridFTPDataMovement);
     result.__isset.success = true;
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;
@@ -32779,7 +32819,7 @@ void AiravataProcessor::process_deleteJobSubmissionInterface(int32_t seqid, ::ap
 
   Airavata_deleteJobSubmissionInterface_result result;
   try {
-    result.success = iface_->deleteJobSubmissionInterface(args.jobSubmissionInterfaceId);
+    result.success = iface_->deleteJobSubmissionInterface(args.computeResourceId, args.jobSubmissionInterfaceId);
     result.__isset.success = true;
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;
@@ -32842,7 +32882,7 @@ void AiravataProcessor::process_deleteDataMovementInterface(int32_t seqid, ::apa
 
   Airavata_deleteDataMovementInterface_result result;
   try {
-    result.success = iface_->deleteDataMovementInterface(args.dataMovementInterfaceId);
+    result.success = iface_->deleteDataMovementInterface(args.computeResourceId, args.dataMovementInterfaceId);
     result.__isset.success = true;
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index d5eb326..a6168dd 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -95,20 +95,20 @@ class AiravataIf {
   virtual bool updateSSHJobSubmissionDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SSHJobSubmission& sshJobSubmission) = 0;
   virtual bool updateCloudJobSubmissionDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::CloudJobSubmission& sshJobSubmission) = 0;
   virtual void addLocalDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) = 0;
-  virtual bool updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) = 0;
+  virtual bool updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) = 0;
   virtual void getLocalDataMovement( ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& _return, const std::string& dataMovementId) = 0;
   virtual void addSCPDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) = 0;
-  virtual bool updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) = 0;
+  virtual bool updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) = 0;
   virtual void getSCPDataMovement( ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& _return, const std::string& dataMovementId) = 0;
   virtual void addGridFTPDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) = 0;
-  virtual bool updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) = 0;
+  virtual bool updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) = 0;
   virtual void getGridFTPDataMovement( ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& _return, const std::string& dataMovementId) = 0;
   virtual bool changeJobSubmissionPriority(const std::string& jobSubmissionInterfaceId, const int32_t newPriorityOrder) = 0;
   virtual bool changeDataMovementPriority(const std::string& dataMovementInterfaceId, const int32_t newPriorityOrder) = 0;
   virtual bool changeJobSubmissionPriorities(const std::map<std::string, int32_t> & jobSubmissionPriorityMap) = 0;
   virtual bool changeDataMovementPriorities(const std::map<std::string, int32_t> & dataMovementPriorityMap) = 0;
-  virtual bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId) = 0;
-  virtual bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId) = 0;
+  virtual bool deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId) = 0;
+  virtual bool deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId) = 0;
   virtual void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) = 0;
   virtual bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) = 0;
   virtual void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) = 0;
@@ -352,7 +352,7 @@ class AiravataNull : virtual public AiravataIf {
   void addLocalDataMovementDetails(std::string& /* _return */, const std::string& /* computeResourceId */, const int32_t /* priorityOrder */, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& /* localDataMovement */) {
     return;
   }
-  bool updateLocalDataMovementDetails(const std::string& /* jobSubmissionInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& /* localDataMovement */) {
+  bool updateLocalDataMovementDetails(const std::string& /* dataMovementInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& /* localDataMovement */) {
     bool _return = false;
     return _return;
   }
@@ -362,7 +362,7 @@ class AiravataNull : virtual public AiravataIf {
   void addSCPDataMovementDetails(std::string& /* _return */, const std::string& /* computeResourceId */, const int32_t /* priorityOrder */, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& /* scpDataMovement */) {
     return;
   }
-  bool updateSCPDataMovementDetails(const std::string& /* jobSubmissionInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& /* scpDataMovement */) {
+  bool updateSCPDataMovementDetails(const std::string& /* dataMovementInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& /* scpDataMovement */) {
     bool _return = false;
     return _return;
   }
@@ -372,7 +372,7 @@ class AiravataNull : virtual public AiravataIf {
   void addGridFTPDataMovementDetails(std::string& /* _return */, const std::string& /* computeResourceId */, const int32_t /* priorityOrder */, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& /* gridFTPDataMovement */) {
     return;
   }
-  bool updateGridFTPDataMovementDetails(const std::string& /* jobSubmissionInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& /* gridFTPDataMovement */) {
+  bool updateGridFTPDataMovementDetails(const std::string& /* dataMovementInterfaceId */, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& /* gridFTPDataMovement */) {
     bool _return = false;
     return _return;
   }
@@ -395,11 +395,11 @@ class AiravataNull : virtual public AiravataIf {
     bool _return = false;
     return _return;
   }
-  bool deleteJobSubmissionInterface(const std::string& /* jobSubmissionInterfaceId */) {
+  bool deleteJobSubmissionInterface(const std::string& /* computeResourceId */, const std::string& /* jobSubmissionInterfaceId */) {
     bool _return = false;
     return _return;
   }
-  bool deleteDataMovementInterface(const std::string& /* dataMovementInterfaceId */) {
+  bool deleteDataMovementInterface(const std::string& /* computeResourceId */, const std::string& /* dataMovementInterfaceId */) {
     bool _return = false;
     return _return;
   }
@@ -9010,16 +9010,16 @@ class Airavata_addLocalDataMovementDetails_presult {
 class Airavata_updateLocalDataMovementDetails_args {
  public:
 
-  Airavata_updateLocalDataMovementDetails_args() : jobSubmissionInterfaceId() {
+  Airavata_updateLocalDataMovementDetails_args() : dataMovementInterfaceId() {
   }
 
   virtual ~Airavata_updateLocalDataMovementDetails_args() throw() {}
 
-  std::string jobSubmissionInterfaceId;
+  std::string dataMovementInterfaceId;
    ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement localDataMovement;
 
-  void __set_jobSubmissionInterfaceId(const std::string& val) {
-    jobSubmissionInterfaceId = val;
+  void __set_dataMovementInterfaceId(const std::string& val) {
+    dataMovementInterfaceId = val;
   }
 
   void __set_localDataMovement(const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& val) {
@@ -9028,7 +9028,7 @@ class Airavata_updateLocalDataMovementDetails_args {
 
   bool operator == (const Airavata_updateLocalDataMovementDetails_args & rhs) const
   {
-    if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+    if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
       return false;
     if (!(localDataMovement == rhs.localDataMovement))
       return false;
@@ -9052,7 +9052,7 @@ class Airavata_updateLocalDataMovementDetails_pargs {
 
   virtual ~Airavata_updateLocalDataMovementDetails_pargs() throw() {}
 
-  const std::string* jobSubmissionInterfaceId;
+  const std::string* dataMovementInterfaceId;
   const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement* localDataMovement;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -9430,16 +9430,16 @@ class Airavata_addSCPDataMovementDetails_presult {
 class Airavata_updateSCPDataMovementDetails_args {
  public:
 
-  Airavata_updateSCPDataMovementDetails_args() : jobSubmissionInterfaceId() {
+  Airavata_updateSCPDataMovementDetails_args() : dataMovementInterfaceId() {
   }
 
   virtual ~Airavata_updateSCPDataMovementDetails_args() throw() {}
 
-  std::string jobSubmissionInterfaceId;
+  std::string dataMovementInterfaceId;
    ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement scpDataMovement;
 
-  void __set_jobSubmissionInterfaceId(const std::string& val) {
-    jobSubmissionInterfaceId = val;
+  void __set_dataMovementInterfaceId(const std::string& val) {
+    dataMovementInterfaceId = val;
   }
 
   void __set_scpDataMovement(const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& val) {
@@ -9448,7 +9448,7 @@ class Airavata_updateSCPDataMovementDetails_args {
 
   bool operator == (const Airavata_updateSCPDataMovementDetails_args & rhs) const
   {
-    if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+    if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
       return false;
     if (!(scpDataMovement == rhs.scpDataMovement))
       return false;
@@ -9472,7 +9472,7 @@ class Airavata_updateSCPDataMovementDetails_pargs {
 
   virtual ~Airavata_updateSCPDataMovementDetails_pargs() throw() {}
 
-  const std::string* jobSubmissionInterfaceId;
+  const std::string* dataMovementInterfaceId;
   const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement* scpDataMovement;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -9850,16 +9850,16 @@ class Airavata_addGridFTPDataMovementDetails_presult {
 class Airavata_updateGridFTPDataMovementDetails_args {
  public:
 
-  Airavata_updateGridFTPDataMovementDetails_args() : jobSubmissionInterfaceId() {
+  Airavata_updateGridFTPDataMovementDetails_args() : dataMovementInterfaceId() {
   }
 
   virtual ~Airavata_updateGridFTPDataMovementDetails_args() throw() {}
 
-  std::string jobSubmissionInterfaceId;
+  std::string dataMovementInterfaceId;
    ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement gridFTPDataMovement;
 
-  void __set_jobSubmissionInterfaceId(const std::string& val) {
-    jobSubmissionInterfaceId = val;
+  void __set_dataMovementInterfaceId(const std::string& val) {
+    dataMovementInterfaceId = val;
   }
 
   void __set_gridFTPDataMovement(const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& val) {
@@ -9868,7 +9868,7 @@ class Airavata_updateGridFTPDataMovementDetails_args {
 
   bool operator == (const Airavata_updateGridFTPDataMovementDetails_args & rhs) const
   {
-    if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+    if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
       return false;
     if (!(gridFTPDataMovement == rhs.gridFTPDataMovement))
       return false;
@@ -9892,7 +9892,7 @@ class Airavata_updateGridFTPDataMovementDetails_pargs {
 
   virtual ~Airavata_updateGridFTPDataMovementDetails_pargs() throw() {}
 
-  const std::string* jobSubmissionInterfaceId;
+  const std::string* dataMovementInterfaceId;
   const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement* gridFTPDataMovement;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -10666,19 +10666,26 @@ class Airavata_changeDataMovementPriorities_presult {
 class Airavata_deleteJobSubmissionInterface_args {
  public:
 
-  Airavata_deleteJobSubmissionInterface_args() : jobSubmissionInterfaceId() {
+  Airavata_deleteJobSubmissionInterface_args() : computeResourceId(), jobSubmissionInterfaceId() {
   }
 
   virtual ~Airavata_deleteJobSubmissionInterface_args() throw() {}
 
+  std::string computeResourceId;
   std::string jobSubmissionInterfaceId;
 
+  void __set_computeResourceId(const std::string& val) {
+    computeResourceId = val;
+  }
+
   void __set_jobSubmissionInterfaceId(const std::string& val) {
     jobSubmissionInterfaceId = val;
   }
 
   bool operator == (const Airavata_deleteJobSubmissionInterface_args & rhs) const
   {
+    if (!(computeResourceId == rhs.computeResourceId))
+      return false;
     if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
       return false;
     return true;
@@ -10701,6 +10708,7 @@ class Airavata_deleteJobSubmissionInterface_pargs {
 
   virtual ~Airavata_deleteJobSubmissionInterface_pargs() throw() {}
 
+  const std::string* computeResourceId;
   const std::string* jobSubmissionInterfaceId;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -10798,19 +10806,26 @@ class Airavata_deleteJobSubmissionInterface_presult {
 class Airavata_deleteDataMovementInterface_args {
  public:
 
-  Airavata_deleteDataMovementInterface_args() : dataMovementInterfaceId() {
+  Airavata_deleteDataMovementInterface_args() : computeResourceId(), dataMovementInterfaceId() {
   }
 
   virtual ~Airavata_deleteDataMovementInterface_args() throw() {}
 
+  std::string computeResourceId;
   std::string dataMovementInterfaceId;
 
+  void __set_computeResourceId(const std::string& val) {
+    computeResourceId = val;
+  }
+
   void __set_dataMovementInterfaceId(const std::string& val) {
     dataMovementInterfaceId = val;
   }
 
   bool operator == (const Airavata_deleteDataMovementInterface_args & rhs) const
   {
+    if (!(computeResourceId == rhs.computeResourceId))
+      return false;
     if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
       return false;
     return true;
@@ -10833,6 +10848,7 @@ class Airavata_deleteDataMovementInterface_pargs {
 
   virtual ~Airavata_deleteDataMovementInterface_pargs() throw() {}
 
+  const std::string* computeResourceId;
   const std::string* dataMovementInterfaceId;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -12915,8 +12931,8 @@ class AiravataClient : virtual public AiravataIf {
   void addLocalDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
   void send_addLocalDataMovementDetails(const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
   void recv_addLocalDataMovementDetails(std::string& _return);
-  bool updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
-  void send_updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
+  bool updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
+  void send_updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement);
   bool recv_updateLocalDataMovementDetails();
   void getLocalDataMovement( ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& _return, const std::string& dataMovementId);
   void send_getLocalDataMovement(const std::string& dataMovementId);
@@ -12924,8 +12940,8 @@ class AiravataClient : virtual public AiravataIf {
   void addSCPDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
   void send_addSCPDataMovementDetails(const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
   void recv_addSCPDataMovementDetails(std::string& _return);
-  bool updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
-  void send_updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
+  bool updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
+  void send_updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement);
   bool recv_updateSCPDataMovementDetails();
   void getSCPDataMovement( ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& _return, const std::string& dataMovementId);
   void send_getSCPDataMovement(const std::string& dataMovementId);
@@ -12933,8 +12949,8 @@ class AiravataClient : virtual public AiravataIf {
   void addGridFTPDataMovementDetails(std::string& _return, const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
   void send_addGridFTPDataMovementDetails(const std::string& computeResourceId, const int32_t priorityOrder, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
   void recv_addGridFTPDataMovementDetails(std::string& _return);
-  bool updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
-  void send_updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
+  bool updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
+  void send_updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement);
   bool recv_updateGridFTPDataMovementDetails();
   void getGridFTPDataMovement( ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& _return, const std::string& dataMovementId);
   void send_getGridFTPDataMovement(const std::string& dataMovementId);
@@ -12951,11 +12967,11 @@ class AiravataClient : virtual public AiravataIf {
   bool changeDataMovementPriorities(const std::map<std::string, int32_t> & dataMovementPriorityMap);
   void send_changeDataMovementPriorities(const std::map<std::string, int32_t> & dataMovementPriorityMap);
   bool recv_changeDataMovementPriorities();
-  bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId);
-  void send_deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId);
+  bool deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId);
+  void send_deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId);
   bool recv_deleteJobSubmissionInterface();
-  bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId);
-  void send_deleteDataMovementInterface(const std::string& dataMovementInterfaceId);
+  bool deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId);
+  void send_deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId);
   bool recv_deleteDataMovementInterface();
   void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager);
   void send_registerResourceJobManager(const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager);
@@ -13834,13 +13850,13 @@ class AiravataMultiface : virtual public AiravataIf {
     return;
   }
 
-  bool updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) {
+  bool updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->updateLocalDataMovementDetails(jobSubmissionInterfaceId, localDataMovement);
+      ifaces_[i]->updateLocalDataMovementDetails(dataMovementInterfaceId, localDataMovement);
     }
-    return ifaces_[i]->updateLocalDataMovementDetails(jobSubmissionInterfaceId, localDataMovement);
+    return ifaces_[i]->updateLocalDataMovementDetails(dataMovementInterfaceId, localDataMovement);
   }
 
   void getLocalDataMovement( ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& _return, const std::string& dataMovementId) {
@@ -13863,13 +13879,13 @@ class AiravataMultiface : virtual public AiravataIf {
     return;
   }
 
-  bool updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) {
+  bool updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->updateSCPDataMovementDetails(jobSubmissionInterfaceId, scpDataMovement);
+      ifaces_[i]->updateSCPDataMovementDetails(dataMovementInterfaceId, scpDataMovement);
     }
-    return ifaces_[i]->updateSCPDataMovementDetails(jobSubmissionInterfaceId, scpDataMovement);
+    return ifaces_[i]->updateSCPDataMovementDetails(dataMovementInterfaceId, scpDataMovement);
   }
 
   void getSCPDataMovement( ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& _return, const std::string& dataMovementId) {
@@ -13892,13 +13908,13 @@ class AiravataMultiface : virtual public AiravataIf {
     return;
   }
 
-  bool updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) {
+  bool updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->updateGridFTPDataMovementDetails(jobSubmissionInterfaceId, gridFTPDataMovement);
+      ifaces_[i]->updateGridFTPDataMovementDetails(dataMovementInterfaceId, gridFTPDataMovement);
     }
-    return ifaces_[i]->updateGridFTPDataMovementDetails(jobSubmissionInterfaceId, gridFTPDataMovement);
+    return ifaces_[i]->updateGridFTPDataMovementDetails(dataMovementInterfaceId, gridFTPDataMovement);
   }
 
   void getGridFTPDataMovement( ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& _return, const std::string& dataMovementId) {
@@ -13947,22 +13963,22 @@ class AiravataMultiface : virtual public AiravataIf {
     return ifaces_[i]->changeDataMovementPriorities(dataMovementPriorityMap);
   }
 
-  bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId) {
+  bool deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->deleteJobSubmissionInterface(jobSubmissionInterfaceId);
+      ifaces_[i]->deleteJobSubmissionInterface(computeResourceId, jobSubmissionInterfaceId);
     }
-    return ifaces_[i]->deleteJobSubmissionInterface(jobSubmissionInterfaceId);
+    return ifaces_[i]->deleteJobSubmissionInterface(computeResourceId, jobSubmissionInterfaceId);
   }
 
-  bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId) {
+  bool deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->deleteDataMovementInterface(dataMovementInterfaceId);
+      ifaces_[i]->deleteDataMovementInterface(computeResourceId, dataMovementInterfaceId);
     }
-    return ifaces_[i]->deleteDataMovementInterface(dataMovementInterfaceId);
+    return ifaces_[i]->deleteDataMovementInterface(computeResourceId, dataMovementInterfaceId);
   }
 
   void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index fde48c0..4f36e0a 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -354,7 +354,7 @@ class AiravataHandler : virtual public AiravataIf {
     printf("addLocalDataMovementDetails\n");
   }
 
-  bool updateLocalDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) {
+  bool updateLocalDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::LOCALDataMovement& localDataMovement) {
     // Your implementation goes here
     printf("updateLocalDataMovementDetails\n");
   }
@@ -369,7 +369,7 @@ class AiravataHandler : virtual public AiravataIf {
     printf("addSCPDataMovementDetails\n");
   }
 
-  bool updateSCPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) {
+  bool updateSCPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::SCPDataMovement& scpDataMovement) {
     // Your implementation goes here
     printf("updateSCPDataMovementDetails\n");
   }
@@ -384,7 +384,7 @@ class AiravataHandler : virtual public AiravataIf {
     printf("addGridFTPDataMovementDetails\n");
   }
 
-  bool updateGridFTPDataMovementDetails(const std::string& jobSubmissionInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) {
+  bool updateGridFTPDataMovementDetails(const std::string& dataMovementInterfaceId, const  ::apache::airavata::model::appcatalog::computeresource::GridFTPDataMovement& gridFTPDataMovement) {
     // Your implementation goes here
     printf("updateGridFTPDataMovementDetails\n");
   }
@@ -414,12 +414,12 @@ class AiravataHandler : virtual public AiravataIf {
     printf("changeDataMovementPriorities\n");
   }
 
-  bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId) {
+  bool deleteJobSubmissionInterface(const std::string& computeResourceId, const std::string& jobSubmissionInterfaceId) {
     // Your implementation goes here
     printf("deleteJobSubmissionInterface\n");
   }
 
-  bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId) {
+  bool deleteDataMovementInterface(const std::string& computeResourceId, const std::string& dataMovementInterfaceId) {
     // Your implementation goes here
     printf("deleteDataMovementInterface\n");
   }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
index 6b68a3a..546e96e 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
@@ -23,7 +23,7 @@
  */
 #include "Workflow.h"
 
-namespace airavata { namespace api { namespace workflow {
+namespace apache { namespace airavata { namespace api {
 
 uint32_t Workflow_getAllWorkflows_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -94,14 +94,14 @@ uint32_t Workflow_getAllWorkflows_result::read(::apache::thrift::protocol::TProt
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size0;
-            ::apache::thrift::protocol::TType _etype3;
-            xfer += iprot->readListBegin(_etype3, _size0);
-            this->success.resize(_size0);
-            uint32_t _i4;
-            for (_i4 = 0; _i4 < _size0; ++_i4)
+            uint32_t _size277;
+            ::apache::thrift::protocol::TType _etype280;
+            xfer += iprot->readListBegin(_etype280, _size277);
+            this->success.resize(_size277);
+            uint32_t _i281;
+            for (_i281 = 0; _i281 < _size277; ++_i281)
             {
-              xfer += iprot->readString(this->success[_i4]);
+              xfer += iprot->readString(this->success[_i281]);
             }
             xfer += iprot->readListEnd();
           }
@@ -156,10 +156,10 @@ uint32_t Workflow_getAllWorkflows_result::write(::apache::thrift::protocol::TPro
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::vector<std::string> ::const_iterator _iter5;
-      for (_iter5 = this->success.begin(); _iter5 != this->success.end(); ++_iter5)
+      std::vector<std::string> ::const_iterator _iter282;
+      for (_iter282 = this->success.begin(); _iter282 != this->success.end(); ++_iter282)
       {
-        xfer += oprot->writeString((*_iter5));
+        xfer += oprot->writeString((*_iter282));
       }
       xfer += oprot->writeListEnd();
     }
@@ -206,14 +206,14 @@ uint32_t Workflow_getAllWorkflows_presult::read(::apache::thrift::protocol::TPro
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size6;
-            ::apache::thrift::protocol::TType _etype9;
-            xfer += iprot->readListBegin(_etype9, _size6);
-            (*(this->success)).resize(_size6);
-            uint32_t _i10;
-            for (_i10 = 0; _i10 < _size6; ++_i10)
+            uint32_t _size283;
+            ::apache::thrift::protocol::TType _etype286;
+            xfer += iprot->readListBegin(_etype286, _size283);
+            (*(this->success)).resize(_size283);
+            uint32_t _i287;
+            for (_i287 = 0; _i287 < _size283; ++_i287)
             {
-              xfer += iprot->readString((*(this->success))[_i10]);
+              xfer += iprot->readString((*(this->success))[_i287]);
             }
             xfer += iprot->readListEnd();
           }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.h
index 508f173..31fdfe0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.h
@@ -25,9 +25,9 @@
 #define Workflow_H
 
 #include <thrift/TDispatchProcessor.h>
-#include "workflowAPI_types.h"
+#include "airavataAPI_types.h"
 
-namespace airavata { namespace api { namespace workflow {
+namespace apache { namespace airavata { namespace api {
 
 class WorkflowIf {
  public:

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow_server.skeleton.cpp
index c7233c5..6f2b207 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow_server.skeleton.cpp
@@ -31,7 +31,7 @@ using namespace ::apache::thrift::server;
 
 using boost::shared_ptr;
 
-using namespace  ::airavata::api::workflow;
+using namespace  ::apache::airavata::api;
 
 class WorkflowHandler : virtual public WorkflowIf {
  public:

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_types.h
index a5cf8d6..54edb43 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_types.h
@@ -38,6 +38,7 @@
 #include "applicationDeploymentModel_types.h"
 #include "applicationInterfaceModel_types.h"
 #include "gatewayResourceProfileModel_types.h"
+#include "workflowDataModel_types.h"
 
 
 namespace apache { namespace airavata { namespace api {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 3181377..08c075b 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -80,20 +80,20 @@ interface AiravataIf {
   public function updateSSHJobSubmissionDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission);
   public function updateCloudJobSubmissionDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $sshJobSubmission);
   public function addLocalDataMovementDetails($computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement);
-  public function updateLocalDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement);
+  public function updateLocalDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement);
   public function getLocalDataMovement($dataMovementId);
   public function addSCPDataMovementDetails($computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement);
-  public function updateSCPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement);
+  public function updateSCPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement);
   public function getSCPDataMovement($dataMovementId);
   public function addGridFTPDataMovementDetails($computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement);
-  public function updateGridFTPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement);
+  public function updateGridFTPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement);
   public function getGridFTPDataMovement($dataMovementId);
   public function changeJobSubmissionPriority($jobSubmissionInterfaceId, $newPriorityOrder);
   public function changeDataMovementPriority($dataMovementInterfaceId, $newPriorityOrder);
   public function changeJobSubmissionPriorities($jobSubmissionPriorityMap);
   public function changeDataMovementPriorities($dataMovementPriorityMap);
-  public function deleteJobSubmissionInterface($jobSubmissionInterfaceId);
-  public function deleteDataMovementInterface($dataMovementInterfaceId);
+  public function deleteJobSubmissionInterface($computeResourceId, $jobSubmissionInterfaceId);
+  public function deleteDataMovementInterface($computeResourceId, $dataMovementInterfaceId);
   public function registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager);
   public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager);
   public function getResourceJobManager($resourceJobManagerId);
@@ -3936,16 +3936,16 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("addLocalDataMovementDetails failed: unknown result");
   }
 
-  public function updateLocalDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement)
+  public function updateLocalDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement)
   {
-    $this->send_updateLocalDataMovementDetails($jobSubmissionInterfaceId, $localDataMovement);
+    $this->send_updateLocalDataMovementDetails($dataMovementInterfaceId, $localDataMovement);
     return $this->recv_updateLocalDataMovementDetails();
   }
 
-  public function send_updateLocalDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement)
+  public function send_updateLocalDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement $localDataMovement)
   {
     $args = new \Airavata\API\Airavata_updateLocalDataMovementDetails_args();
-    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
+    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
     $args->localDataMovement = $localDataMovement;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
@@ -4119,16 +4119,16 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("addSCPDataMovementDetails failed: unknown result");
   }
 
-  public function updateSCPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement)
+  public function updateSCPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement)
   {
-    $this->send_updateSCPDataMovementDetails($jobSubmissionInterfaceId, $scpDataMovement);
+    $this->send_updateSCPDataMovementDetails($dataMovementInterfaceId, $scpDataMovement);
     return $this->recv_updateSCPDataMovementDetails();
   }
 
-  public function send_updateSCPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement)
+  public function send_updateSCPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement $scpDataMovement)
   {
     $args = new \Airavata\API\Airavata_updateSCPDataMovementDetails_args();
-    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
+    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
     $args->scpDataMovement = $scpDataMovement;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
@@ -4302,16 +4302,16 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("addGridFTPDataMovementDetails failed: unknown result");
   }
 
-  public function updateGridFTPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement)
+  public function updateGridFTPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement)
   {
-    $this->send_updateGridFTPDataMovementDetails($jobSubmissionInterfaceId, $gridFTPDataMovement);
+    $this->send_updateGridFTPDataMovementDetails($dataMovementInterfaceId, $gridFTPDataMovement);
     return $this->recv_updateGridFTPDataMovementDetails();
   }
 
-  public function send_updateGridFTPDataMovementDetails($jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement)
+  public function send_updateGridFTPDataMovementDetails($dataMovementInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement $gridFTPDataMovement)
   {
     $args = new \Airavata\API\Airavata_updateGridFTPDataMovementDetails_args();
-    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
+    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
     $args->gridFTPDataMovement = $gridFTPDataMovement;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
@@ -4665,15 +4665,16 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("changeDataMovementPriorities failed: unknown result");
   }
 
-  public function deleteJobSubmissionInterface($jobSubmissionInterfaceId)
+  public function deleteJobSubmissionInterface($computeResourceId, $jobSubmissionInterfaceId)
   {
-    $this->send_deleteJobSubmissionInterface($jobSubmissionInterfaceId);
+    $this->send_deleteJobSubmissionInterface($computeResourceId, $jobSubmissionInterfaceId);
     return $this->recv_deleteJobSubmissionInterface();
   }
 
-  public function send_deleteJobSubmissionInterface($jobSubmissionInterfaceId)
+  public function send_deleteJobSubmissionInterface($computeResourceId, $jobSubmissionInterfaceId)
   {
     $args = new \Airavata\API\Airavata_deleteJobSubmissionInterface_args();
+    $args->computeResourceId = $computeResourceId;
     $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
@@ -4725,15 +4726,16 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteJobSubmissionInterface failed: unknown result");
   }
 
-  public function deleteDataMovementInterface($dataMovementInterfaceId)
+  public function deleteDataMovementInterface($computeResourceId, $dataMovementInterfaceId)
   {
-    $this->send_deleteDataMovementInterface($dataMovementInterfaceId);
+    $this->send_deleteDataMovementInterface($computeResourceId, $dataMovementInterfaceId);
     return $this->recv_deleteDataMovementInterface();
   }
 
-  public function send_deleteDataMovementInterface($dataMovementInterfaceId)
+  public function send_deleteDataMovementInterface($computeResourceId, $dataMovementInterfaceId)
   {
     $args = new \Airavata\API\Airavata_deleteDataMovementInterface_args();
+    $args->computeResourceId = $computeResourceId;
     $args->dataMovementInterfaceId = $dataMovementInterfaceId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
@@ -20193,14 +20195,14 @@ class Airavata_addLocalDataMovementDetails_result {
 class Airavata_updateLocalDataMovementDetails_args {
   static $_TSPEC;
 
-  public $jobSubmissionInterfaceId = null;
+  public $dataMovementInterfaceId = null;
   public $localDataMovement = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'jobSubmissionInterfaceId',
+          'var' => 'dataMovementInterfaceId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -20211,8 +20213,8 @@ class Airavata_updateLocalDataMovementDetails_args {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['jobSubmissionInterfaceId'])) {
-        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+      if (isset($vals['dataMovementInterfaceId'])) {
+        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
       }
       if (isset($vals['localDataMovement'])) {
         $this->localDataMovement = $vals['localDataMovement'];
@@ -20241,7 +20243,7 @@ class Airavata_updateLocalDataMovementDetails_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionInterfaceId);
+            $xfer += $input->readString($this->dataMovementInterfaceId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -20267,9 +20269,9 @@ class Airavata_updateLocalDataMovementDetails_args {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Airavata_updateLocalDataMovementDetails_args');
-    if ($this->jobSubmissionInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+    if ($this->dataMovementInterfaceId !== null) {
+      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->dataMovementInterfaceId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->localDataMovement !== null) {
@@ -20898,14 +20900,14 @@ class Airavata_addSCPDataMovementDetails_result {
 class Airavata_updateSCPDataMovementDetails_args {
   static $_TSPEC;
 
-  public $jobSubmissionInterfaceId = null;
+  public $dataMovementInterfaceId = null;
   public $scpDataMovement = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'jobSubmissionInterfaceId',
+          'var' => 'dataMovementInterfaceId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -20916,8 +20918,8 @@ class Airavata_updateSCPDataMovementDetails_args {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['jobSubmissionInterfaceId'])) {
-        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+      if (isset($vals['dataMovementInterfaceId'])) {
+        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
       }
       if (isset($vals['scpDataMovement'])) {
         $this->scpDataMovement = $vals['scpDataMovement'];
@@ -20946,7 +20948,7 @@ class Airavata_updateSCPDataMovementDetails_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionInterfaceId);
+            $xfer += $input->readString($this->dataMovementInterfaceId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -20972,9 +20974,9 @@ class Airavata_updateSCPDataMovementDetails_args {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Airavata_updateSCPDataMovementDetails_args');
-    if ($this->jobSubmissionInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+    if ($this->dataMovementInterfaceId !== null) {
+      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->dataMovementInterfaceId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->scpDataMovement !== null) {
@@ -21603,14 +21605,14 @@ class Airavata_addGridFTPDataMovementDetails_result {
 class Airavata_updateGridFTPDataMovementDetails_args {
   static $_TSPEC;
 
-  public $jobSubmissionInterfaceId = null;
+  public $dataMovementInterfaceId = null;
   public $gridFTPDataMovement = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'jobSubmissionInterfaceId',
+          'var' => 'dataMovementInterfaceId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -21621,8 +21623,8 @@ class Airavata_updateGridFTPDataMovementDetails_args {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['jobSubmissionInterfaceId'])) {
-        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+      if (isset($vals['dataMovementInterfaceId'])) {
+        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
       }
       if (isset($vals['gridFTPDataMovement'])) {
         $this->gridFTPDataMovement = $vals['gridFTPDataMovement'];
@@ -21651,7 +21653,7 @@ class Airavata_updateGridFTPDataMovementDetails_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionInterfaceId);
+            $xfer += $input->readString($this->dataMovementInterfaceId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -21677,9 +21679,9 @@ class Airavata_updateGridFTPDataMovementDetails_args {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Airavata_updateGridFTPDataMovementDetails_args');
-    if ($this->jobSubmissionInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+    if ($this->dataMovementInterfaceId !== null) {
+      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->dataMovementInterfaceId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->gridFTPDataMovement !== null) {
@@ -23001,18 +23003,26 @@ class Airavata_changeDataMovementPriorities_result {
 class Airavata_deleteJobSubmissionInterface_args {
   static $_TSPEC;
 
+  public $computeResourceId = null;
   public $jobSubmissionInterfaceId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
+          'var' => 'computeResourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
           'var' => 'jobSubmissionInterfaceId',
           'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['computeResourceId'])) {
+        $this->computeResourceId = $vals['computeResourceId'];
+      }
       if (isset($vals['jobSubmissionInterfaceId'])) {
         $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
       }
@@ -23040,6 +23050,13 @@ class Airavata_deleteJobSubmissionInterface_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->jobSubmissionInterfaceId);
           } else {
             $xfer += $input->skip($ftype);
@@ -23058,8 +23075,13 @@ class Airavata_deleteJobSubmissionInterface_args {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Airavata_deleteJobSubmissionInterface_args');
+    if ($this->computeResourceId !== null) {
+      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->computeResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->jobSubmissionInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
+      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
       $xfer += $output->writeString($this->jobSubmissionInterfaceId);
       $xfer += $output->writeFieldEnd();
     }
@@ -23211,18 +23233,26 @@ class Airavata_deleteJobSubmissionInterface_result {
 class Airavata_deleteDataMovementInterface_args {
   static $_TSPEC;
 
+  public $computeResourceId = null;
   public $dataMovementInterfaceId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
+          'var' => 'computeResourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
           'var' => 'dataMovementInterfaceId',
           'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['computeResourceId'])) {
+        $this->computeResourceId = $vals['computeResourceId'];
+      }
       if (isset($vals['dataMovementInterfaceId'])) {
         $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
       }
@@ -23250,6 +23280,13 @@ class Airavata_deleteDataMovementInterface_args {
       {
         case 1:
           if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->dataMovementInterfaceId);
           } else {
             $xfer += $input->skip($ftype);
@@ -23268,8 +23305,13 @@ class Airavata_deleteDataMovementInterface_args {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Airavata_deleteDataMovementInterface_args');
+    if ($this->computeResourceId !== null) {
+      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->computeResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->dataMovementInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
       $xfer += $output->writeString($this->dataMovementInterfaceId);
       $xfer += $output->writeFieldEnd();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index d38e60a..c4a4d71 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -152,7 +152,7 @@ rm -rf ${JAVA_GEN_DIR}
 #   The airavataAPI.thrift includes rest of data models.
 thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/airavataAPI.thrift || fail unable to generate java thrift classes on AiravataAPI
 
-thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate java thrift classes on WorkflowAPI
+#thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate java thrift classes on WorkflowAPI
 
 # For the generated java classes add the ASF V2 License header
 add_license_header $JAVA_GEN_DIR
@@ -175,7 +175,7 @@ rm -rf ${CPP_GEN_DIR}
 #   The airavataAPI.thrift includes rest of data models.
 thrift ${THRIFT_ARGS} --gen cpp ${THRIFT_IDL_DIR}/airavataAPI.thrift || fail unable to generate C++ thrift classes
 
-thrift ${THRIFT_ARGS} --gen cpp ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate C++ thrift classes for WorkflowAPI
+#thrift ${THRIFT_ARGS} --gen cpp ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate C++ thrift classes for WorkflowAPI
 # For the generated CPP classes add the ASF V2 License header
 add_license_header $CPP_GEN_DIR
 
@@ -197,7 +197,7 @@ rm -rf ${PHP_GEN_DIR}
 #   The airavataAPI.thrift includes rest of data models.
 thrift ${THRIFT_ARGS} --gen php:autoload ${THRIFT_IDL_DIR}/airavataAPI.thrift || fail unable to generate PHP thrift classes
 
-thrift ${THRIFT_ARGS} --gen php:autoload ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate PHP thrift classes for WorkflowAPI
+#thrift ${THRIFT_ARGS} --gen php:autoload ${THRIFT_IDL_DIR}/workflowAPI.thrift || fail unable to generate PHP thrift classes for WorkflowAPI
 # For the generated java classes add the ASF V2 License header
 ## TODO Write PHP license parser
 


[23/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index 7387517..b68d927 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -63,6 +63,7 @@ class AiravataIf {
   virtual void registerApplicationModule(std::string& _return, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule) = 0;
   virtual void getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& _return, const std::string& appModuleId) = 0;
   virtual bool updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule) = 0;
+  virtual void getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & _return) = 0;
   virtual bool deleteApplicationModule(const std::string& appModuleId) = 0;
   virtual void registerApplicationDeployment(std::string& _return, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationDeploymentDescription& applicationDeployment) = 0;
   virtual void getApplicationDeployment( ::apache::airavata::model::appcatalog::appdeployment::ApplicationDeploymentDescription& _return, const std::string& appDeploymentId) = 0;
@@ -123,6 +124,13 @@ class AiravataIf {
   virtual void getAllGatewayComputeResourcePreferences(std::vector< ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference> & _return, const std::string& gatewayID) = 0;
   virtual bool updateGatewayComputeResourcePreference(const std::string& gatewayID, const std::string& computeResourceId, const  ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference& computeResourcePreference) = 0;
   virtual bool deleteGatewayComputeResourcePreference(const std::string& gatewayID, const std::string& computeResourceId) = 0;
+  virtual void getAllWorkflows(std::vector<std::string> & _return) = 0;
+  virtual void getWorkflow( ::Workflow& _return, const std::string& workflowTemplateId) = 0;
+  virtual void deleteWorkflow(const std::string& workflowTemplateId) = 0;
+  virtual void registerWorkflow(std::string& _return, const  ::Workflow& workflow) = 0;
+  virtual void updateWorkflow(const std::string& workflowTemplateId, const  ::Workflow& workflow) = 0;
+  virtual void getWorkflowTemplateId(std::string& _return, const std::string& workflowName) = 0;
+  virtual bool isWorkflowExistWithName(const std::string& workflowName) = 0;
 };
 
 class AiravataIfFactory {
@@ -247,6 +255,9 @@ class AiravataNull : virtual public AiravataIf {
     bool _return = false;
     return _return;
   }
+  void getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & /* _return */) {
+    return;
+  }
   bool deleteApplicationModule(const std::string& /* appModuleId */) {
     bool _return = false;
     return _return;
@@ -454,6 +465,28 @@ class AiravataNull : virtual public AiravataIf {
     bool _return = false;
     return _return;
   }
+  void getAllWorkflows(std::vector<std::string> & /* _return */) {
+    return;
+  }
+  void getWorkflow( ::Workflow& /* _return */, const std::string& /* workflowTemplateId */) {
+    return;
+  }
+  void deleteWorkflow(const std::string& /* workflowTemplateId */) {
+    return;
+  }
+  void registerWorkflow(std::string& /* _return */, const  ::Workflow& /* workflow */) {
+    return;
+  }
+  void updateWorkflow(const std::string& /* workflowTemplateId */, const  ::Workflow& /* workflow */) {
+    return;
+  }
+  void getWorkflowTemplateId(std::string& /* _return */, const std::string& /* workflowName */) {
+    return;
+  }
+  bool isWorkflowExistWithName(const std::string& /* workflowName */) {
+    bool _return = false;
+    return _return;
+  }
 };
 
 
@@ -4684,6 +4717,130 @@ class Airavata_updateApplicationModule_presult {
 };
 
 
+class Airavata_getAllModules_args {
+ public:
+
+  Airavata_getAllModules_args() {
+  }
+
+  virtual ~Airavata_getAllModules_args() throw() {}
+
+
+  bool operator == (const Airavata_getAllModules_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Airavata_getAllModules_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getAllModules_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_getAllModules_pargs {
+ public:
+
+
+  virtual ~Airavata_getAllModules_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getAllModules_result__isset {
+  _Airavata_getAllModules_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getAllModules_result__isset;
+
+class Airavata_getAllModules_result {
+ public:
+
+  Airavata_getAllModules_result() {
+  }
+
+  virtual ~Airavata_getAllModules_result() throw() {}
+
+  std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule>  success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getAllModules_result__isset __isset;
+
+  void __set_success(const std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_getAllModules_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getAllModules_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getAllModules_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getAllModules_presult__isset {
+  _Airavata_getAllModules_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getAllModules_presult__isset;
+
+class Airavata_getAllModules_presult {
+ public:
+
+
+  virtual ~Airavata_getAllModules_presult() throw() {}
+
+  std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> * success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getAllModules_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
 class Airavata_deleteApplicationModule_args {
  public:
 
@@ -12867,121 +13024,1028 @@ class Airavata_deleteGatewayComputeResourcePreference_presult {
 
 };
 
-class AiravataClient : virtual public AiravataIf {
+
+class Airavata_getAllWorkflows_args {
  public:
-  AiravataClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
-    piprot_(prot),
-    poprot_(prot) {
-    iprot_ = prot.get();
-    oprot_ = prot.get();
+
+  Airavata_getAllWorkflows_args() {
   }
-  AiravataClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
-    piprot_(iprot),
-    poprot_(oprot) {
-    iprot_ = iprot.get();
-    oprot_ = oprot.get();
+
+  virtual ~Airavata_getAllWorkflows_args() throw() {}
+
+
+  bool operator == (const Airavata_getAllWorkflows_args & /* rhs */) const
+  {
+    return true;
   }
-  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
-    return piprot_;
+  bool operator != (const Airavata_getAllWorkflows_args &rhs) const {
+    return !(*this == rhs);
   }
-  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
-    return poprot_;
+
+  bool operator < (const Airavata_getAllWorkflows_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_getAllWorkflows_pargs {
+ public:
+
+
+  virtual ~Airavata_getAllWorkflows_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getAllWorkflows_result__isset {
+  _Airavata_getAllWorkflows_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getAllWorkflows_result__isset;
+
+class Airavata_getAllWorkflows_result {
+ public:
+
+  Airavata_getAllWorkflows_result() {
   }
-  void getAPIVersion(std::string& _return);
-  void send_getAPIVersion();
-  void recv_getAPIVersion(std::string& _return);
-  void createProject(std::string& _return, const  ::apache::airavata::model::workspace::Project& project);
-  void send_createProject(const  ::apache::airavata::model::workspace::Project& project);
-  void recv_createProject(std::string& _return);
-  void updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject);
-  void send_updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject);
-  void recv_updateProject();
-  void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId);
-  void send_getProject(const std::string& projectId);
-  void recv_getProject( ::apache::airavata::model::workspace::Project& _return);
-  void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName);
-  void send_getAllUserProjects(const std::string& userName);
-  void recv_getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return);
-  void searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName, const std::string& projectName);
-  void send_searchProjectsByProjectName(const std::string& userName, const std::string& projectName);
-  void recv_searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return);
-  void searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName, const std::string& description);
-  void send_searchProjectsByProjectDesc(const std::string& userName, const std::string& description);
-  void recv_searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return);
-  void searchExperimentsByName(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& expName);
-  void send_searchExperimentsByName(const std::string& userName, const std::string& expName);
-  void recv_searchExperimentsByName(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
-  void searchExperimentsByDesc(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& description);
-  void send_searchExperimentsByDesc(const std::string& userName, const std::string& description);
-  void recv_searchExperimentsByDesc(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
-  void searchExperimentsByApplication(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& applicationId);
-  void send_searchExperimentsByApplication(const std::string& userName, const std::string& applicationId);
-  void recv_searchExperimentsByApplication(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
-  void searchExperimentsByStatus(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const  ::apache::airavata::model::workspace::experiment::ExperimentState::type experimentState);
-  void send_searchExperimentsByStatus(const std::string& userName, const  ::apache::airavata::model::workspace::experiment::ExperimentState::type experimentState);
-  void recv_searchExperimentsByStatus(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
-  void searchExperimentsByCreationTime(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const int64_t fromTime, const int64_t toTime);
-  void send_searchExperimentsByCreationTime(const std::string& userName, const int64_t fromTime, const int64_t toTime);
-  void recv_searchExperimentsByCreationTime(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
-  void getAllExperimentsInProject(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return, const std::string& projectId);
-  void send_getAllExperimentsInProject(const std::string& projectId);
-  void recv_getAllExperimentsInProject(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return);
-  void getAllUserExperiments(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return, const std::string& userName);
-  void send_getAllUserExperiments(const std::string& userName);
-  void recv_getAllUserExperiments(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return);
-  void createExperiment(std::string& _return, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
-  void send_createExperiment(const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
-  void recv_createExperiment(std::string& _return);
-  void getExperiment( ::apache::airavata::model::workspace::experiment::Experiment& _return, const std::string& airavataExperimentId);
-  void send_getExperiment(const std::string& airavataExperimentId);
-  void recv_getExperiment( ::apache::airavata::model::workspace::experiment::Experiment& _return);
-  void updateExperiment(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
-  void send_updateExperiment(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
-  void recv_updateExperiment();
-  void updateExperimentConfiguration(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::UserConfigurationData& userConfiguration);
-  void send_updateExperimentConfiguration(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::UserConfigurationData& userConfiguration);
-  void recv_updateExperimentConfiguration();
-  void updateResourceScheduleing(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::ComputationalResourceScheduling& resourceScheduling);
-  void send_updateResourceScheduleing(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::ComputationalResourceScheduling& resourceScheduling);
-  void recv_updateResourceScheduleing();
-  bool validateExperiment(const std::string& airavataExperimentId);
-  void send_validateExperiment(const std::string& airavataExperimentId);
-  bool recv_validateExperiment();
-  void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
-  void send_launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
-  void recv_launchExperiment();
-  void getExperimentStatus( ::apache::airavata::model::workspace::experiment::ExperimentStatus& _return, const std::string& airavataExperimentId);
-  void send_getExperimentStatus(const std::string& airavataExperimentId);
-  void recv_getExperimentStatus( ::apache::airavata::model::workspace::experiment::ExperimentStatus& _return);
-  void getExperimentOutputs(std::vector< ::apache::airavata::model::workspace::experiment::DataObjectType> & _return, const std::string& airavataExperimentId);
-  void send_getExperimentOutputs(const std::string& airavataExperimentId);
-  void recv_getExperimentOutputs(std::vector< ::apache::airavata::model::workspace::experiment::DataObjectType> & _return);
-  void getJobStatuses(std::map<std::string,  ::apache::airavata::model::workspace::experiment::JobStatus> & _return, const std::string& airavataExperimentId);
-  void send_getJobStatuses(const std::string& airavataExperimentId);
-  void recv_getJobStatuses(std::map<std::string,  ::apache::airavata::model::workspace::experiment::JobStatus> & _return);
-  void getJobDetails(std::vector< ::apache::airavata::model::workspace::experiment::JobDetails> & _return, const std::string& airavataExperimentId);
-  void send_getJobDetails(const std::string& airavataExperimentId);
-  void recv_getJobDetails(std::vector< ::apache::airavata::model::workspace::experiment::JobDetails> & _return);
-  void getDataTransferDetails(std::vector< ::apache::airavata::model::workspace::experiment::DataTransferDetails> & _return, const std::string& airavataExperimentId);
-  void send_getDataTransferDetails(const std::string& airavataExperimentId);
-  void recv_getDataTransferDetails(std::vector< ::apache::airavata::model::workspace::experiment::DataTransferDetails> & _return);
-  void cloneExperiment(std::string& _return, const std::string& existingExperimentID, const std::string& newExperimentName);
-  void send_cloneExperiment(const std::string& existingExperimentID, const std::string& newExperimentName);
-  void recv_cloneExperiment(std::string& _return);
-  void terminateExperiment(const std::string& airavataExperimentId);
-  void send_terminateExperiment(const std::string& airavataExperimentId);
-  void recv_terminateExperiment();
-  void registerApplicationModule(std::string& _return, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
-  void send_registerApplicationModule(const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
-  void recv_registerApplicationModule(std::string& _return);
-  void getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& _return, const std::string& appModuleId);
-  void send_getApplicationModule(const std::string& appModuleId);
-  void recv_getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& _return);
-  bool updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
-  void send_updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
-  bool recv_updateApplicationModule();
-  bool deleteApplicationModule(const std::string& appModuleId);
-  void send_deleteApplicationModule(const std::string& appModuleId);
+
+  virtual ~Airavata_getAllWorkflows_result() throw() {}
+
+  std::vector<std::string>  success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getAllWorkflows_result__isset __isset;
+
+  void __set_success(const std::vector<std::string> & val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_getAllWorkflows_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getAllWorkflows_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getAllWorkflows_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getAllWorkflows_presult__isset {
+  _Airavata_getAllWorkflows_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getAllWorkflows_presult__isset;
+
+class Airavata_getAllWorkflows_presult {
+ public:
+
+
+  virtual ~Airavata_getAllWorkflows_presult() throw() {}
+
+  std::vector<std::string> * success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getAllWorkflows_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_getWorkflow_args {
+ public:
+
+  Airavata_getWorkflow_args() : workflowTemplateId() {
+  }
+
+  virtual ~Airavata_getWorkflow_args() throw() {}
+
+  std::string workflowTemplateId;
+
+  void __set_workflowTemplateId(const std::string& val) {
+    workflowTemplateId = val;
+  }
+
+  bool operator == (const Airavata_getWorkflow_args & rhs) const
+  {
+    if (!(workflowTemplateId == rhs.workflowTemplateId))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getWorkflow_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getWorkflow_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_getWorkflow_pargs {
+ public:
+
+
+  virtual ~Airavata_getWorkflow_pargs() throw() {}
+
+  const std::string* workflowTemplateId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getWorkflow_result__isset {
+  _Airavata_getWorkflow_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getWorkflow_result__isset;
+
+class Airavata_getWorkflow_result {
+ public:
+
+  Airavata_getWorkflow_result() {
+  }
+
+  virtual ~Airavata_getWorkflow_result() throw() {}
+
+   ::Workflow success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getWorkflow_result__isset __isset;
+
+  void __set_success(const  ::Workflow& val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_getWorkflow_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getWorkflow_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getWorkflow_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getWorkflow_presult__isset {
+  _Airavata_getWorkflow_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getWorkflow_presult__isset;
+
+class Airavata_getWorkflow_presult {
+ public:
+
+
+  virtual ~Airavata_getWorkflow_presult() throw() {}
+
+   ::Workflow* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getWorkflow_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_deleteWorkflow_args {
+ public:
+
+  Airavata_deleteWorkflow_args() : workflowTemplateId() {
+  }
+
+  virtual ~Airavata_deleteWorkflow_args() throw() {}
+
+  std::string workflowTemplateId;
+
+  void __set_workflowTemplateId(const std::string& val) {
+    workflowTemplateId = val;
+  }
+
+  bool operator == (const Airavata_deleteWorkflow_args & rhs) const
+  {
+    if (!(workflowTemplateId == rhs.workflowTemplateId))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteWorkflow_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteWorkflow_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteWorkflow_pargs {
+ public:
+
+
+  virtual ~Airavata_deleteWorkflow_pargs() throw() {}
+
+  const std::string* workflowTemplateId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteWorkflow_result__isset {
+  _Airavata_deleteWorkflow_result__isset() : ire(false), ace(false), ase(false) {}
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteWorkflow_result__isset;
+
+class Airavata_deleteWorkflow_result {
+ public:
+
+  Airavata_deleteWorkflow_result() {
+  }
+
+  virtual ~Airavata_deleteWorkflow_result() throw() {}
+
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteWorkflow_result__isset __isset;
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_deleteWorkflow_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteWorkflow_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteWorkflow_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteWorkflow_presult__isset {
+  _Airavata_deleteWorkflow_presult__isset() : ire(false), ace(false), ase(false) {}
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteWorkflow_presult__isset;
+
+class Airavata_deleteWorkflow_presult {
+ public:
+
+
+  virtual ~Airavata_deleteWorkflow_presult() throw() {}
+
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteWorkflow_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_registerWorkflow_args {
+ public:
+
+  Airavata_registerWorkflow_args() {
+  }
+
+  virtual ~Airavata_registerWorkflow_args() throw() {}
+
+   ::Workflow workflow;
+
+  void __set_workflow(const  ::Workflow& val) {
+    workflow = val;
+  }
+
+  bool operator == (const Airavata_registerWorkflow_args & rhs) const
+  {
+    if (!(workflow == rhs.workflow))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_registerWorkflow_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_registerWorkflow_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_registerWorkflow_pargs {
+ public:
+
+
+  virtual ~Airavata_registerWorkflow_pargs() throw() {}
+
+  const  ::Workflow* workflow;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_registerWorkflow_result__isset {
+  _Airavata_registerWorkflow_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_registerWorkflow_result__isset;
+
+class Airavata_registerWorkflow_result {
+ public:
+
+  Airavata_registerWorkflow_result() : success() {
+  }
+
+  virtual ~Airavata_registerWorkflow_result() throw() {}
+
+  std::string success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_registerWorkflow_result__isset __isset;
+
+  void __set_success(const std::string& val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_registerWorkflow_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_registerWorkflow_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_registerWorkflow_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_registerWorkflow_presult__isset {
+  _Airavata_registerWorkflow_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_registerWorkflow_presult__isset;
+
+class Airavata_registerWorkflow_presult {
+ public:
+
+
+  virtual ~Airavata_registerWorkflow_presult() throw() {}
+
+  std::string* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_registerWorkflow_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_updateWorkflow_args {
+ public:
+
+  Airavata_updateWorkflow_args() : workflowTemplateId() {
+  }
+
+  virtual ~Airavata_updateWorkflow_args() throw() {}
+
+  std::string workflowTemplateId;
+   ::Workflow workflow;
+
+  void __set_workflowTemplateId(const std::string& val) {
+    workflowTemplateId = val;
+  }
+
+  void __set_workflow(const  ::Workflow& val) {
+    workflow = val;
+  }
+
+  bool operator == (const Airavata_updateWorkflow_args & rhs) const
+  {
+    if (!(workflowTemplateId == rhs.workflowTemplateId))
+      return false;
+    if (!(workflow == rhs.workflow))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_updateWorkflow_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_updateWorkflow_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_updateWorkflow_pargs {
+ public:
+
+
+  virtual ~Airavata_updateWorkflow_pargs() throw() {}
+
+  const std::string* workflowTemplateId;
+  const  ::Workflow* workflow;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_updateWorkflow_result__isset {
+  _Airavata_updateWorkflow_result__isset() : ire(false), ace(false), ase(false) {}
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_updateWorkflow_result__isset;
+
+class Airavata_updateWorkflow_result {
+ public:
+
+  Airavata_updateWorkflow_result() {
+  }
+
+  virtual ~Airavata_updateWorkflow_result() throw() {}
+
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_updateWorkflow_result__isset __isset;
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_updateWorkflow_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_updateWorkflow_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_updateWorkflow_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_updateWorkflow_presult__isset {
+  _Airavata_updateWorkflow_presult__isset() : ire(false), ace(false), ase(false) {}
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_updateWorkflow_presult__isset;
+
+class Airavata_updateWorkflow_presult {
+ public:
+
+
+  virtual ~Airavata_updateWorkflow_presult() throw() {}
+
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_updateWorkflow_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_getWorkflowTemplateId_args {
+ public:
+
+  Airavata_getWorkflowTemplateId_args() : workflowName() {
+  }
+
+  virtual ~Airavata_getWorkflowTemplateId_args() throw() {}
+
+  std::string workflowName;
+
+  void __set_workflowName(const std::string& val) {
+    workflowName = val;
+  }
+
+  bool operator == (const Airavata_getWorkflowTemplateId_args & rhs) const
+  {
+    if (!(workflowName == rhs.workflowName))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getWorkflowTemplateId_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getWorkflowTemplateId_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_getWorkflowTemplateId_pargs {
+ public:
+
+
+  virtual ~Airavata_getWorkflowTemplateId_pargs() throw() {}
+
+  const std::string* workflowName;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getWorkflowTemplateId_result__isset {
+  _Airavata_getWorkflowTemplateId_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getWorkflowTemplateId_result__isset;
+
+class Airavata_getWorkflowTemplateId_result {
+ public:
+
+  Airavata_getWorkflowTemplateId_result() : success() {
+  }
+
+  virtual ~Airavata_getWorkflowTemplateId_result() throw() {}
+
+  std::string success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getWorkflowTemplateId_result__isset __isset;
+
+  void __set_success(const std::string& val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_getWorkflowTemplateId_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getWorkflowTemplateId_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getWorkflowTemplateId_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getWorkflowTemplateId_presult__isset {
+  _Airavata_getWorkflowTemplateId_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getWorkflowTemplateId_presult__isset;
+
+class Airavata_getWorkflowTemplateId_presult {
+ public:
+
+
+  virtual ~Airavata_getWorkflowTemplateId_presult() throw() {}
+
+  std::string* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getWorkflowTemplateId_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_isWorkflowExistWithName_args {
+ public:
+
+  Airavata_isWorkflowExistWithName_args() : workflowName() {
+  }
+
+  virtual ~Airavata_isWorkflowExistWithName_args() throw() {}
+
+  std::string workflowName;
+
+  void __set_workflowName(const std::string& val) {
+    workflowName = val;
+  }
+
+  bool operator == (const Airavata_isWorkflowExistWithName_args & rhs) const
+  {
+    if (!(workflowName == rhs.workflowName))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_isWorkflowExistWithName_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_isWorkflowExistWithName_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_isWorkflowExistWithName_pargs {
+ public:
+
+
+  virtual ~Airavata_isWorkflowExistWithName_pargs() throw() {}
+
+  const std::string* workflowName;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_isWorkflowExistWithName_result__isset {
+  _Airavata_isWorkflowExistWithName_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_isWorkflowExistWithName_result__isset;
+
+class Airavata_isWorkflowExistWithName_result {
+ public:
+
+  Airavata_isWorkflowExistWithName_result() : success(0) {
+  }
+
+  virtual ~Airavata_isWorkflowExistWithName_result() throw() {}
+
+  bool success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_isWorkflowExistWithName_result__isset __isset;
+
+  void __set_success(const bool val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_isWorkflowExistWithName_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_isWorkflowExistWithName_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_isWorkflowExistWithName_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_isWorkflowExistWithName_presult__isset {
+  _Airavata_isWorkflowExistWithName_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_isWorkflowExistWithName_presult__isset;
+
+class Airavata_isWorkflowExistWithName_presult {
+ public:
+
+
+  virtual ~Airavata_isWorkflowExistWithName_presult() throw() {}
+
+  bool* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_isWorkflowExistWithName_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+class AiravataClient : virtual public AiravataIf {
+ public:
+  AiravataClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
+    piprot_(prot),
+    poprot_(prot) {
+    iprot_ = prot.get();
+    oprot_ = prot.get();
+  }
+  AiravataClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
+    piprot_(iprot),
+    poprot_(oprot) {
+    iprot_ = iprot.get();
+    oprot_ = oprot.get();
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
+    return piprot_;
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
+    return poprot_;
+  }
+  void getAPIVersion(std::string& _return);
+  void send_getAPIVersion();
+  void recv_getAPIVersion(std::string& _return);
+  void createProject(std::string& _return, const  ::apache::airavata::model::workspace::Project& project);
+  void send_createProject(const  ::apache::airavata::model::workspace::Project& project);
+  void recv_createProject(std::string& _return);
+  void updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject);
+  void send_updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject);
+  void recv_updateProject();
+  void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId);
+  void send_getProject(const std::string& projectId);
+  void recv_getProject( ::apache::airavata::model::workspace::Project& _return);
+  void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName);
+  void send_getAllUserProjects(const std::string& userName);
+  void recv_getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return);
+  void searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName, const std::string& projectName);
+  void send_searchProjectsByProjectName(const std::string& userName, const std::string& projectName);
+  void recv_searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return);
+  void searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& userName, const std::string& description);
+  void send_searchProjectsByProjectDesc(const std::string& userName, const std::string& description);
+  void recv_searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return);
+  void searchExperimentsByName(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& expName);
+  void send_searchExperimentsByName(const std::string& userName, const std::string& expName);
+  void recv_searchExperimentsByName(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
+  void searchExperimentsByDesc(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& description);
+  void send_searchExperimentsByDesc(const std::string& userName, const std::string& description);
+  void recv_searchExperimentsByDesc(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
+  void searchExperimentsByApplication(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const std::string& applicationId);
+  void send_searchExperimentsByApplication(const std::string& userName, const std::string& applicationId);
+  void recv_searchExperimentsByApplication(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
+  void searchExperimentsByStatus(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const  ::apache::airavata::model::workspace::experiment::ExperimentState::type experimentState);
+  void send_searchExperimentsByStatus(const std::string& userName, const  ::apache::airavata::model::workspace::experiment::ExperimentState::type experimentState);
+  void recv_searchExperimentsByStatus(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
+  void searchExperimentsByCreationTime(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return, const std::string& userName, const int64_t fromTime, const int64_t toTime);
+  void send_searchExperimentsByCreationTime(const std::string& userName, const int64_t fromTime, const int64_t toTime);
+  void recv_searchExperimentsByCreationTime(std::vector< ::apache::airavata::model::workspace::experiment::ExperimentSummary> & _return);
+  void getAllExperimentsInProject(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return, const std::string& projectId);
+  void send_getAllExperimentsInProject(const std::string& projectId);
+  void recv_getAllExperimentsInProject(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return);
+  void getAllUserExperiments(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return, const std::string& userName);
+  void send_getAllUserExperiments(const std::string& userName);
+  void recv_getAllUserExperiments(std::vector< ::apache::airavata::model::workspace::experiment::Experiment> & _return);
+  void createExperiment(std::string& _return, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
+  void send_createExperiment(const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
+  void recv_createExperiment(std::string& _return);
+  void getExperiment( ::apache::airavata::model::workspace::experiment::Experiment& _return, const std::string& airavataExperimentId);
+  void send_getExperiment(const std::string& airavataExperimentId);
+  void recv_getExperiment( ::apache::airavata::model::workspace::experiment::Experiment& _return);
+  void updateExperiment(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
+  void send_updateExperiment(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::Experiment& experiment);
+  void recv_updateExperiment();
+  void updateExperimentConfiguration(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::UserConfigurationData& userConfiguration);
+  void send_updateExperimentConfiguration(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::UserConfigurationData& userConfiguration);
+  void recv_updateExperimentConfiguration();
+  void updateResourceScheduleing(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::ComputationalResourceScheduling& resourceScheduling);
+  void send_updateResourceScheduleing(const std::string& airavataExperimentId, const  ::apache::airavata::model::workspace::experiment::ComputationalResourceScheduling& resourceScheduling);
+  void recv_updateResourceScheduleing();
+  bool validateExperiment(const std::string& airavataExperimentId);
+  void send_validateExperiment(const std::string& airavataExperimentId);
+  bool recv_validateExperiment();
+  void launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
+  void send_launchExperiment(const std::string& airavataExperimentId, const std::string& airavataCredStoreToken);
+  void recv_launchExperiment();
+  void getExperimentStatus( ::apache::airavata::model::workspace::experiment::ExperimentStatus& _return, const std::string& airavataExperimentId);
+  void send_getExperimentStatus(const std::string& airavataExperimentId);
+  void recv_getExperimentStatus( ::apache::airavata::model::workspace::experiment::ExperimentStatus& _return);
+  void getExperimentOutputs(std::vector< ::apache::airavata::model::workspace::experiment::DataObjectType> & _return, const std::string& airavataExperimentId);
+  void send_getExperimentOutputs(const std::string& airavataExperimentId);
+  void recv_getExperimentOutputs(std::vector< ::apache::airavata::model::workspace::experiment::DataObjectType> & _return);
+  void getJobStatuses(std::map<std::string,  ::apache::airavata::model::workspace::experiment::JobStatus> & _return, const std::string& airavataExperimentId);
+  void send_getJobStatuses(const std::string& airavataExperimentId);
+  void recv_getJobStatuses(std::map<std::string,  ::apache::airavata::model::workspace::experiment::JobStatus> & _return);
+  void getJobDetails(std::vector< ::apache::airavata::model::workspace::experiment::JobDetails> & _return, const std::string& airavataExperimentId);
+  void send_getJobDetails(const std::string& airavataExperimentId);
+  void recv_getJobDetails(std::vector< ::apache::airavata::model::workspace::experiment::JobDetails> & _return);
+  void getDataTransferDetails(std::vector< ::apache::airavata::model::workspace::experiment::DataTransferDetails> & _return, const std::string& airavataExperimentId);
+  void send_getDataTransferDetails(const std::string& airavataExperimentId);
+  void recv_getDataTransferDetails(std::vector< ::apache::airavata::model::workspace::experiment::DataTransferDetails> & _return);
+  void cloneExperiment(std::string& _return, const std::string& existingExperimentID, const std::string& newExperimentName);
+  void send_cloneExperiment(const std::string& existingExperimentID, const std::string& newExperimentName);
+  void recv_cloneExperiment(std::string& _return);
+  void terminateExperiment(const std::string& airavataExperimentId);
+  void send_terminateExperiment(const std::string& airavataExperimentId);
+  void recv_terminateExperiment();
+  void registerApplicationModule(std::string& _return, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
+  void send_registerApplicationModule(const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
+  void recv_registerApplicationModule(std::string& _return);
+  void getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& _return, const std::string& appModuleId);
+  void send_getApplicationModule(const std::string& appModuleId);
+  void recv_getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& _return);
+  bool updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
+  void send_updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
+  bool recv_updateApplicationModule();
+  void getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & _return);
+  void send_getAllModules();
+  void recv_getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & _return);
+  bool deleteApplicationModule(const std::string& appModuleId);
+  void send_deleteApplicationModule(const std::string& appModuleId);
   bool recv_deleteApplicationModule();
   void registerApplicationDeployment(std::string& _return, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationDeploymentDescription& applicationDeployment);
   void send_registerApplicationDeployment(const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationDeploymentDescription& applicationDeployment);
@@ -13160,6 +14224,27 @@ class AiravataClient : virtual public AiravataIf {
   bool deleteGatewayComputeResourcePreference(const std::string& gatewayID, const std::string& computeResourceId);
   void send_deleteGatewayComputeResourcePreference(const std::string& gatewayID, const std::string& computeResourceId);
   bool recv_deleteGatewayComputeResourcePreference();
+  void getAllWorkflows(std::vector<std::string> & _return);
+  void send_getAllWorkflows();
+  void recv_getAllWorkflows(std::vector<std::string> & _return);
+  void getWorkflow( ::Workflow& _return, const std::string& workflowTemplateId);
+  void send_getWorkflow(const std::string& workflowTemplateId);
+  void recv_getWorkflow( ::Workflow& _return);
+  void deleteWorkflow(const std::string& workflowTemplateId);
+  void send_deleteWorkflow(const std::string& workflowTemplateId);
+  void recv_deleteWorkflow();
+  void registerWorkflow(std::string& _return, const  ::Workflow& workflow);
+  void send_registerWorkflow(const  ::Workflow& workflow);
+  void recv_registerWorkflow(std::string& _return);
+  void updateWorkflow(const std::string& workflowTemplateId, const  ::Workflow& workflow);
+  void send_updateWorkflow(const std::string& workflowTemplateId, const  ::Workflow& workflow);
+  void recv_updateWorkflow();
+  void getWorkflowTemplateId(std::string& _return, const std::string& workflowName);
+  void send_getWorkflowTemplateId(const std::string& workflowName);
+  void recv_getWorkflowTemplateId(std::string& _return);
+  bool isWorkflowExistWithName(const std::string& workflowName);
+  void send_isWorkflowExistWithName(const std::string& workflowName);
+  bool recv_isWorkflowExistWithName();
  protected:
   boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
   boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
@@ -13206,6 +14291,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
   void process_registerApplicationModule(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getApplicationModule(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_updateApplicationModule(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getAllModules(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_deleteApplicationModule(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_registerApplicationDeployment(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getApplicationDeployment(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -13266,6 +14352,13 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
   void process_getAllGatewayComputeResourcePreferences(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_updateGatewayComputeResourcePreference(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_deleteGatewayComputeResourcePreference(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getAllWorkflows(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getWorkflow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_deleteWorkflow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_registerWorkflow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_updateWorkflow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getWorkflowTemplateId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_isWorkflowExistWithName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  public:
   AiravataProcessor(boost::shared_ptr<AiravataIf> iface) :
     iface_(iface) {
@@ -13300,6 +14393,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
     processMap_["registerApplicationModule"] = &AiravataProcessor::process_registerApplicationModule;
     processMap_["getApplicationModule"] = &AiravataProcessor::process_getApplicationModule;
     processMap_["updateApplicationModule"] = &AiravataProcessor::process_updateApplicationModule;
+    processMap_["getAllModules"] = &AiravataProcessor::process_getAllModules;
     processMap_["deleteApplicationModule"] = &AiravataProcessor::process_deleteApplicationModule;
     processMap_["registerApplicationDeployment"] = &AiravataProcessor::process_registerApplicationDeployment;
     processMap_["getApplicationDeployment"] = &AiravataProcessor::process_getApplicationDeployment;
@@ -13360,6 +14454,13 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
     processMap_["getAllGatewayComputeResourcePreferences"] = &AiravataProcessor::process_getAllGatewayComputeResourcePreferences;
     processMap_["updateGatewayComputeResourcePreference"] = &AiravataProcessor::process_updateGatewayComputeResourcePreference;
     processMap_["deleteGatewayComputeResourcePreference"] = &AiravataProcessor::process_deleteGatewayComputeResourcePreference;
+    processMap_["getAllWorkflows"] = &AiravataProcessor::process_getAllWorkflows;
+    processMap_["getWorkflow"] = &AiravataProcessor::process_getWorkflow;
+    processMap_["deleteWorkflow"] = &AiravataProcessor::process_deleteWorkflow;
+    processMap_["registerWorkflow"] = &AiravataProcessor::process_registerWorkflow;
+    processMap_["updateWorkflow"] = &AiravataProcessor::process_updateWorkflow;
+    processMap_["getWorkflowTemplateId"] = &AiravataProcessor::process_getWorkflowTemplateId;
+    processMap_["isWorkflowExistWithName"] = &AiravataProcessor::process_isWorkflowExistWithName;
   }
 
   virtual ~AiravataProcessor() {}
@@ -13690,6 +14791,16 @@ class AiravataMultiface : virtual public AiravataIf {
     return ifaces_[i]->updateApplicationModule(appModuleId, applicationModule);
   }
 
+  void getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & _return) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getAllModules(_return);
+    }
+    ifaces_[i]->getAllModules(_return);
+    return;
+  }
+
   bool deleteApplicationModule(const std::string& appModuleId) {
     size_t sz = ifaces_.size();
     size_t i = 0;
@@ -14263,6 +15374,73 @@ class AiravataMultiface : virtual public AiravataIf {
     return ifaces_[i]->deleteGatewayComputeResourcePreference(gatewayID, computeResourceId);
   }
 
+  void getAllWorkflows(std::vector<std::string> & _return) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getAllWorkflows(_return);
+    }
+    ifaces_[i]->getAllWorkflows(_return);
+    return;
+  }
+
+  void getWorkflow( ::Workflow& _return, const std::string& workflowTemplateId) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getWorkflow(_return, workflowTemplateId);
+    }
+    ifaces_[i]->getWorkflow(_return, workflowTemplateId);
+    return;
+  }
+
+  void deleteWorkflow(const std::string& workflowTemplateId) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->deleteWorkflow(workflowTemplateId);
+    }
+    ifaces_[i]->deleteWorkflow(workflowTemplateId);
+  }
+
+  void registerWorkflow(std::string& _return, const  ::Workflow& workflow) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->registerWorkflow(_return, workflow);
+    }
+    ifaces_[i]->registerWorkflow(_return, workflow);
+    return;
+  }
+
+  void updateWorkflow(const std::string& workflowTemplateId, const  ::Workflow& workflow) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->updateWorkflow(workflowTemplateId, workflow);
+    }
+    ifaces_[i]->updateWorkflow(workflowTemplateId, workflow);
+  }
+
+  void getWorkflowTemplateId(std::string& _return, const std::string& workflowName) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getWorkflowTemplateId(_return, workflowName);
+    }
+    ifaces_[i]->getWorkflowTemplateId(_return, workflowName);
+    return;
+  }
+
+  bool isWorkflowExistWithName(const std::string& workflowName) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->isWorkflowExistWithName(workflowName);
+    }
+    return ifaces_[i]->isWorkflowExistWithName(workflowName);
+  }
+
 };
 
 }}} // namespace

http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index 2b7e03f..ce06c45 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -194,6 +194,11 @@ class AiravataHandler : virtual public AiravataIf {
     printf("updateApplicationModule\n");
   }
 
+  void getAllModules(std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> & _return) {
+    // Your implementation goes here
+    printf("getAllModules\n");
+  }
+
   bool deleteApplicationModule(const std::string& appModuleId) {
     // Your implementation goes here
     printf("deleteApplicationModule\n");
@@ -494,6 +499,41 @@ class AiravataHandler : virtual public AiravataIf {
     printf("deleteGatewayComputeResourcePreference\n");
   }
 
+  void getAllWorkflows(std::vector<std::string> & _return) {
+    // Your implementation goes here
+    printf("getAllWorkflows\n");
+  }
+
+  void getWorkflow( ::Workflow& _return, const std::string& workflowTemplateId) {
+    // Your implementation goes here
+    printf("getWorkflow\n");
+  }
+
+  void deleteWorkflow(const std::string& workflowTemplateId) {
+    // Your implementation goes here
+    printf("deleteWorkflow\n");
+  }
+
+  void registerWorkflow(std::string& _return, const  ::Workflow& workflow) {
+    // Your implementation goes here
+    printf("registerWorkflow\n");
+  }
+
+  void updateWorkflow(const std::string& workflowTemplateId, const  ::Workflow& workflow) {
+    // Your implementation goes here
+    printf("updateWorkflow\n");
+  }
+
+  void getWorkflowTemplateId(std::string& _return, const std::string& workflowName) {
+    // Your implementation goes here
+    printf("getWorkflowTemplateId\n");
+  }
+
+  bool isWorkflowExistWithName(const std::string& workflowName) {
+    // Your implementation goes here
+    printf("isWorkflowExistWithName\n");
+  }
+
 };
 
 int main(int argc, char **argv) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
index 546e96e..075a25a 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Workflow.cpp
@@ -94,14 +94,14 @@ uint32_t Workflow_getAllWorkflows_result::read(::apache::thrift::protocol::TProt
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size277;
-            ::apache::thrift::protocol::TType _etype280;
-            xfer += iprot->readListBegin(_etype280, _size277);
-            this->success.resize(_size277);
-            uint32_t _i281;
-            for (_i281 = 0; _i281 < _size277; ++_i281)
+            uint32_t _size288;
+            ::apache::thrift::protocol::TType _etype291;
+            xfer += iprot->readListBegin(_etype291, _size288);
+            this->success.resize(_size288);
+            uint32_t _i292;
+            for (_i292 = 0; _i292 < _size288; ++_i292)
             {
-              xfer += iprot->readString(this->success[_i281]);
+              xfer += iprot->readString(this->success[_i292]);
             }
             xfer += iprot->readListEnd();
           }
@@ -156,10 +156,10 @@ uint32_t Workflow_getAllWorkflows_result::write(::apache::thrift::protocol::TPro
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::vector<std::string> ::const_iterator _iter282;
-      for (_iter282 = this->success.begin(); _iter282 != this->success.end(); ++_iter282)
+      std::vector<std::string> ::const_iterator _iter293;
+      for (_iter293 = this->success.begin(); _iter293 != this->success.end(); ++_iter293)
       {
-        xfer += oprot->writeString((*_iter282));
+        xfer += oprot->writeString((*_iter293));
       }
       xfer += oprot->writeListEnd();
     }
@@ -206,14 +206,14 @@ uint32_t Workflow_getAllWorkflows_presult::read(::apache::thrift::protocol::TPro
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size283;
-            ::apache::thrift::protocol::TType _etype286;
-            xfer += iprot->readListBegin(_etype286, _size283);
-            (*(this->success)).resize(_size283);
-            uint32_t _i287;
-            for (_i287 = 0; _i287 < _size283; ++_i287)
+            uint32_t _size294;
+            ::apache::thrift::protocol::TType _etype297;
+            xfer += iprot->readListBegin(_etype297, _size294);
+            (*(this->success)).resize(_size294);
+            uint32_t _i298;
+            for (_i298 = 0; _i298 < _size294; ++_i298)
             {
-              xfer += iprot->readString((*(this->success))[_i287]);
+              xfer += iprot->readString((*(this->success))[_i298]);
             }
             xfer += iprot->readListEnd();
           }


[16/44] git commit: fixing problem with aliases, ipaddresses and batchques

Posted by ch...@apache.org.
fixing problem with aliases, ipaddresses and batchques


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/08fff2ce
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/08fff2ce
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/08fff2ce

Branch: refs/heads/gfac_appcatalog_int
Commit: 08fff2ce283af84f51e63f9443a982cc9c94852a
Parents: 0db9cad
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 13:07:25 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 13:07:25 2014 -0500

----------------------------------------------------------------------
 .../catalog/data/impl/ComputeResourceImpl.java   | 11 +++++++++--
 .../data/resources/BatchQueueResource.java       | 10 +---------
 .../data/resources/HostAliasResource.java        | 12 ++----------
 .../data/resources/HostIPAddressResource.java    | 11 +----------
 .../app/catalog/test/ComputeResourceTest.java    | 19 +++++++++++++------
 5 files changed, 26 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/08fff2ce/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 6b9b841..89a292b 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -118,6 +118,8 @@ public class ComputeResourceImpl implements ComputeResource {
 			ComputeResourceResource computeHostResource)
 			throws AppCatalogException {
 		List<BatchQueue> batchQueueList = description.getBatchQueues();
+        BatchQueueResource resource = new BatchQueueResource();
+        resource.remove(description.getComputeResourceId());
 		if (batchQueueList != null && !batchQueueList.isEmpty()) {
 		    for (BatchQueue batchQueue : batchQueueList) {
 		    	BatchQueueResource bq = AppCatalogThriftConversion.getBatchQueue(batchQueue);
@@ -132,6 +134,8 @@ public class ComputeResourceImpl implements ComputeResource {
 			ComputeResourceResource computeHostResource)
 			throws AppCatalogException {
 		List<String> ipAddresses = description.getIpAddresses();
+        HostIPAddressResource resource = new HostIPAddressResource();
+        resource.remove(description.getComputeResourceId());
 		if (ipAddresses != null && !ipAddresses.isEmpty()) {
 		    for (String ipAddress : ipAddresses) {
 		        HostIPAddressResource ipAddressResource = new HostIPAddressResource();
@@ -147,6 +151,9 @@ public class ComputeResourceImpl implements ComputeResource {
 			ComputeResourceResource computeHostResource)
 			throws AppCatalogException {
 		List<String> hostAliases = description.getHostAliases();
+        // delete previous host aliases
+        HostAliasResource resource = new HostAliasResource();
+        resource.remove(description.getComputeResourceId());
 		if (hostAliases != null && !hostAliases.isEmpty()) {
 		    for (String alias : hostAliases) {
 		        HostAliasResource aliasResource = new HostAliasResource();
@@ -732,7 +739,7 @@ public class ComputeResourceImpl implements ComputeResource {
 		ResourceJobManagerResource resource = AppCatalogThriftConversion.getResourceJobManager(resourceJobManager);
 		resource.save();
 		Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
-		if (jobManagerCommands!=null) {
+		if (jobManagerCommands!=null && jobManagerCommands.size() != 0) {
 			for (JobManagerCommand commandType : jobManagerCommands.keySet()) {
 				JobManagerCommandResource r = new JobManagerCommandResource();
 				r.setCommandType(commandType.toString());
@@ -751,7 +758,7 @@ public class ComputeResourceImpl implements ComputeResource {
             resource.setResourceJobManagerId(resourceJobManagerId);
             resource.save();
             Map<JobManagerCommand, String> jobManagerCommands = updatedResourceJobManager.getJobManagerCommands();
-            if (jobManagerCommands!=null) {
+            if (jobManagerCommands!=null && jobManagerCommands.size() != 0) {
                 for (JobManagerCommand commandType : jobManagerCommands.keySet()) {
                     JobManagerCommandResource r = new JobManagerCommandResource();
                     Map<String, String> ids = new HashMap<String, String>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/08fff2ce/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
index 91cd60f..5df3bd2 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
@@ -53,20 +53,12 @@ public class BatchQueueResource extends AbstractResource {
 	
 	@Override
 	public void remove(Object identifier) throws AppCatalogException {
-		HashMap<String, String> ids;
-		if (identifier instanceof Map) {
-			ids = (HashMap<String, String>) identifier;
-		} else {
-			logger.error("Identifier should be a map with the field name and it's value");
-			throw new AppCatalogException("Identifier should be a map with the field name and it's value");
-		}
 		EntityManager em = null;
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
 			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
-			generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, ids.get(BatchQueueConstants.COMPUTE_RESOURCE_ID));
-			generator.setParameter(BatchQueueConstants.QUEUE_NAME, ids.get(BatchQueueConstants.QUEUE_NAME));
+			generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, identifier);
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/08fff2ce/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostAliasResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostAliasResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostAliasResource.java
index 5713ed8..f267a72 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostAliasResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostAliasResource.java
@@ -43,21 +43,13 @@ public class HostAliasResource extends AbstractResource {
     private ComputeResourceResource computeHostResource;
 
     public void remove(Object identifier) throws AppCatalogException {
-        HashMap<String, String> ids;
-        if (identifier instanceof Map){
-            ids = (HashMap)identifier;
-        }else {
-            logger.error("Identifier should be a map with the field name and it's value");
-            throw new AppCatalogException("Identifier should be a map with the field name and it's value");
-        }
-
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator= new AppCatalogQueryGenerator(HOST_ALIAS);
-            generator.setParameter(HostAliasConstants.RESOURCE_ID, ids.get(HostAliasConstants.RESOURCE_ID));
-            generator.setParameter(HostAliasConstants.ALIAS, ids.get(HostAliasConstants.ALIAS));
+            generator.setParameter(HostAliasConstants.RESOURCE_ID, (String)identifier);
+//            generator.setParameter(HostAliasConstants.ALIAS, ids.get(HostAliasConstants.ALIAS));
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/08fff2ce/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostIPAddressResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostIPAddressResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostIPAddressResource.java
index afafe92..683efec 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostIPAddressResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/HostIPAddressResource.java
@@ -46,21 +46,12 @@ public class HostIPAddressResource extends AbstractResource{
     private ComputeResourceResource computeHostResource;
 
     public void remove(Object identifier) throws AppCatalogException {
-        HashMap<String, String> ids;
-        if (identifier instanceof Map){
-            ids = (HashMap)identifier;
-        }else {
-            logger.error("Identifier should be a map with the field name and it's value");
-            throw new AppCatalogException("Identifier should be a map with the field name and it's value");
-        }
-
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator= new AppCatalogQueryGenerator(HOST_IPADDRESS);
-            generator.setParameter(HostIPAddressConstants.RESOURCE_ID, ids.get(HostIPAddressConstants.RESOURCE_ID));
-            generator.setParameter(HostIPAddressConstants.IP_ADDRESS, ids.get(HostIPAddressConstants.IP_ADDRESS));
+            generator.setParameter(HostIPAddressConstants.RESOURCE_ID, identifier);
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/08fff2ce/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 296478c..3347f08 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
@@ -73,10 +73,10 @@ public class ComputeResourceTest {
             ipdaresses.add("222.33.43.444");
             ipdaresses.add("23.344.44.454");
             description.setIpAddresses(ipdaresses);
-            List<String> aliases = new ArrayList<String>();
-            aliases.add("test.alias1");
-            aliases.add("test.alias2");
-            description.setHostAliases(aliases);
+//            List<String> aliases = new ArrayList<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();
@@ -144,10 +144,17 @@ public class ComputeResourceTest {
             if (computeResource.isComputeResourceExists(resourceId)){
                 host = computeResource.getComputeResource(resourceId);
                 List<String> hostAliases = host.getHostAliases();
-                for (String alias : hostAliases){
+                if (hostAliases != null && !hostAliases.isEmpty()){
+                    for (String alias : hostAliases){
+                        System.out.println("%%%%%%%%%%%%%%%% alias value :  %%%%%%%%%%%%%%%%%%% : " + alias);
+                    }
+                }
+                host.addToHostAliases("abc");
+                computeResource.updateComputeResource(resourceId, host);
+                List<String> hostAliases1 = computeResource.getComputeResource(resourceId).getHostAliases();
+                for (String alias : hostAliases1){
                     System.out.println("%%%%%%%%%%%%%%%% alias value :  %%%%%%%%%%%%%%%%%%% : " + alias);
                 }
-
                 System.out.println("**********Resource name ************* : " +  host.getHostName());
             }
 


[33/44] git commit: Updated JobExecutionContext with thrift data model types

Posted by ch...@apache.org.
Updated JobExecutionContext with thrift data model types


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/73e21be4
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/73e21be4
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/73e21be4

Branch: refs/heads/gfac_appcatalog_int
Commit: 73e21be4cf423dc35fb5f1a3363f989a40e067e7
Parents: 96a673f
Author: shamrath <sh...@gmail.com>
Authored: Thu Oct 30 15:57:33 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:15 2014 -0500

----------------------------------------------------------------------
 .../gfac/core/context/JobExecutionContext.java  | 91 +++++++++++++++-----
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 37 ++++----
 2 files changed, 85 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/73e21be4/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 2b2255f..3616b42 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -33,6 +33,9 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.cpi.GFac;
 import org.apache.airavata.gfac.core.notification.GFacNotifier;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
@@ -67,16 +70,42 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     private ZooKeeper zk;
 
     private String credentialStoreToken;
-
+    /**
+     * User defined working directory.
+     */
     private String workingDir;
-
+    /**
+     * Input data directory
+     */
     private String inputDir;
+    /**
+     * Output data directory
+     */
     private String outputDir;
-    private String standaredOutput;
-    private String standaredError;
-    private String prefferedJobSubmissionProtocal;
-    private String prefferedDataMovementProtocal;
-
+    /**
+     * standard output file path
+     */
+    private String standardOutput;
+    /**
+     * standard error file path
+     */
+    private String standardError;
+    /**
+     * User preferred job submission protocol.
+     */
+    private JobSubmissionProtocol preferredJobSubmissionProtocol;
+    /**
+     * User preferred data movement protocol.
+     */
+    private DataMovementProtocol preferredDataMovementProtocol;
+    /**
+     * List of job submission protocols sorted by priority order.
+      */
+    private List<JobSubmissionInterface> hostPrioritizedJobSubmissionInterfaces;
+    /**
+     * use preferred job submission protocol.
+     */
+    private JobSubmissionInterface preferredJobSubmissionInterface;
 
 //    private ContextHeaderDocument.ContextHeader contextHeader;
 
@@ -354,35 +383,51 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         this.outputDir = outputDir;
     }
 
-    public String getStandaredOutput() {
-        return standaredOutput;
+    public String getStandardOutput() {
+        return standardOutput;
+    }
+
+    public void setStandardOutput(String standardOutput) {
+        this.standardOutput = standardOutput;
+    }
+
+    public String getStandardError() {
+        return standardError;
+    }
+
+    public void setStandardError(String standardError) {
+        this.standardError = standardError;
+    }
+
+    public JobSubmissionProtocol getPreferredJobSubmissionProtocol() {
+        return preferredJobSubmissionProtocol;
     }
 
-    public void setStandaredOutput(String standaredOutput) {
-        this.standaredOutput = standaredOutput;
+    public void setPreferredJobSubmissionProtocol(JobSubmissionProtocol preferredJobSubmissionProtocol) {
+        this.preferredJobSubmissionProtocol = preferredJobSubmissionProtocol;
     }
 
-    public String getStandaredError() {
-        return standaredError;
+    public DataMovementProtocol getPreferredDataMovementProtocol() {
+        return preferredDataMovementProtocol;
     }
 
-    public void setStandaredError(String standaredError) {
-        this.standaredError = standaredError;
+    public void setPreferredDataMovementProtocol(DataMovementProtocol preferredDataMovementProtocol) {
+        this.preferredDataMovementProtocol = preferredDataMovementProtocol;
     }
 
-    public String getPrefferedJobSubmissionProtocal() {
-        return prefferedJobSubmissionProtocal;
+    public List<JobSubmissionInterface> getHostPrioritizedJobSubmissionInterfaces() {
+        return hostPrioritizedJobSubmissionInterfaces;
     }
 
-    public void setPrefferedJobSubmissionProtocal(String prefferedJobSubmissionProtocal) {
-        this.prefferedJobSubmissionProtocal = prefferedJobSubmissionProtocal;
+    public void setHostPrioritizedJobSubmissionInterfaces(List<JobSubmissionInterface> hostPrioritizedJobSubmissionInterfaces) {
+        this.hostPrioritizedJobSubmissionInterfaces = hostPrioritizedJobSubmissionInterfaces;
     }
 
-    public String getPrefferedDataMovementProtocal() {
-        return prefferedDataMovementProtocal;
+    public JobSubmissionInterface getPreferredJobSubmissionInterface() {
+        return preferredJobSubmissionInterface;
     }
 
-    public void setPrefferedDataMovementProtocal(String prefferedDataMovementProtocal) {
-        this.prefferedDataMovementProtocal = prefferedDataMovementProtocal;
+    public void setPreferredJobSubmissionInterface(JobSubmissionInterface preferredJobSubmissionInterface) {
+        this.preferredJobSubmissionInterface = preferredJobSubmissionInterface;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/73e21be4/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 fd43c65..696b61b 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
@@ -53,6 +53,7 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentD
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.messaging.event.*;
 import org.apache.airavata.model.workspace.experiment.*;
@@ -70,6 +71,8 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Properties;
 
@@ -319,31 +322,25 @@ public class BetterGfacImpl implements GFac,Watcher {
             /*
             * Stdout and Stderr for Shell
             */
-            jobExecutionContext.setStandaredOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
-            jobExecutionContext.setStandaredError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+            jobExecutionContext.setStandardOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
+            jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+
+            jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
         }
 
         List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
-        String preferredJobSubmissionProtocol = gatewayResourcePreferences.getPreferredJobSubmissionProtocol();
-        String hostClass;
-        if (preferredJobSubmissionProtocol != null){
-            hostClass = preferredJobSubmissionProtocol;
-        }else {
-            if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
-                int lowestPriority = jobSubmissionInterfaces.get(0).getPriorityOrder();
-                String selectedHost = null;
-                for (int i = 0; i < jobSubmissionInterfaces.size() - 1; i++){
-                    if (jobSubmissionInterfaces.get(i+1).getPriorityOrder() < lowestPriority ){
-                        lowestPriority = jobSubmissionInterfaces.get(i+1).getPriorityOrder();
-                        selectedHost = jobSubmissionInterfaces.get(i+1).getJobSubmissionProtocol().toString();
-                    }
+        if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
+            Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
+                @Override
+                public int compare(JobSubmissionInterface jobSubmissionInterface, JobSubmissionInterface jobSubmissionInterface2) {
+                    return jobSubmissionInterface.getPriorityOrder() - jobSubmissionInterface2.getPriorityOrder();
                 }
-                hostClass = selectedHost;
-            }else {
-                throw new GFacException("Compute resource should have atleast one job submission interface defined...");
-            }
+            });
+
+            jobExecutionContext.setHostPrioritizedJobSubmissionInterfaces(jobSubmissionInterfaces);
+        }else {
+            throw new GFacException("Compute resource should have at least one job submission interface defined...");
         }
-        jobExecutionContext.setPrefferedJobSubmissionProtocal(hostClass);
 
         return jobExecutionContext;
     }


[26/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 8d1f9a8..720173c 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -493,6 +493,8 @@ import org.slf4j.LoggerFactory;
      */
     public boolean updateApplicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
+    public List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> getAllModules() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
     /**
      * Delete a Application Module.
      * 
@@ -1385,6 +1387,20 @@ import org.slf4j.LoggerFactory;
      */
     public boolean deleteGatewayComputeResourcePreference(String gatewayID, String computeResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
+    public List<String> getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public void deleteWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String getWorkflowTemplateId(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean isWorkflowExistWithName(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
   }
 
   public interface AsyncIface {
@@ -1451,6 +1467,8 @@ import org.slf4j.LoggerFactory;
 
     public void updateApplicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getAllModules(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void deleteApplicationModule(String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void registerApplicationDeployment(org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -1571,6 +1589,20 @@ import org.slf4j.LoggerFactory;
 
     public void deleteGatewayComputeResourcePreference(String gatewayID, String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getAllWorkflows(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void deleteWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void registerWorkflow(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getWorkflowTemplateId(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void isWorkflowExistWithName(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
   }
 
   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -2608,6 +2640,37 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateApplicationModule failed: unknown result");
     }
 
+    public List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> getAllModules() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getAllModules();
+      return recv_getAllModules();
+    }
+
+    public void send_getAllModules() throws org.apache.thrift.TException
+    {
+      getAllModules_args args = new getAllModules_args();
+      sendBase("getAllModules", args);
+    }
+
+    public List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> recv_getAllModules() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getAllModules_result result = new getAllModules_result();
+      receiveBase(result, "getAllModules");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllModules failed: unknown result");
+    }
+
     public boolean deleteApplicationModule(String appModuleId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
       send_deleteApplicationModule(appModuleId);
@@ -4561,6 +4624,224 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGatewayComputeResourcePreference failed: unknown result");
     }
 
+    public List<String> getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getAllWorkflows();
+      return recv_getAllWorkflows();
+    }
+
+    public void send_getAllWorkflows() throws org.apache.thrift.TException
+    {
+      getAllWorkflows_args args = new getAllWorkflows_args();
+      sendBase("getAllWorkflows", args);
+    }
+
+    public List<String> recv_getAllWorkflows() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getAllWorkflows_result result = new getAllWorkflows_result();
+      receiveBase(result, "getAllWorkflows");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllWorkflows failed: unknown result");
+    }
+
+    public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getWorkflow(workflowTemplateId);
+      return recv_getWorkflow();
+    }
+
+    public void send_getWorkflow(String workflowTemplateId) throws org.apache.thrift.TException
+    {
+      getWorkflow_args args = new getWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      sendBase("getWorkflow", args);
+    }
+
+    public org.apache.airavata.model.Workflow recv_getWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getWorkflow_result result = new getWorkflow_result();
+      receiveBase(result, "getWorkflow");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkflow failed: unknown result");
+    }
+
+    public void deleteWorkflow(String workflowTemplateId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_deleteWorkflow(workflowTemplateId);
+      recv_deleteWorkflow();
+    }
+
+    public void send_deleteWorkflow(String workflowTemplateId) throws org.apache.thrift.TException
+    {
+      deleteWorkflow_args args = new deleteWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      sendBase("deleteWorkflow", args);
+    }
+
+    public void recv_deleteWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      deleteWorkflow_result result = new deleteWorkflow_result();
+      receiveBase(result, "deleteWorkflow");
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      return;
+    }
+
+    public String registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_registerWorkflow(workflow);
+      return recv_registerWorkflow();
+    }
+
+    public void send_registerWorkflow(org.apache.airavata.model.Workflow workflow) throws org.apache.thrift.TException
+    {
+      registerWorkflow_args args = new registerWorkflow_args();
+      args.setWorkflow(workflow);
+      sendBase("registerWorkflow", args);
+    }
+
+    public String recv_registerWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      registerWorkflow_result result = new registerWorkflow_result();
+      receiveBase(result, "registerWorkflow");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerWorkflow failed: unknown result");
+    }
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_updateWorkflow(workflowTemplateId, workflow);
+      recv_updateWorkflow();
+    }
+
+    public void send_updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws org.apache.thrift.TException
+    {
+      updateWorkflow_args args = new updateWorkflow_args();
+      args.setWorkflowTemplateId(workflowTemplateId);
+      args.setWorkflow(workflow);
+      sendBase("updateWorkflow", args);
+    }
+
+    public void recv_updateWorkflow() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      updateWorkflow_result result = new updateWorkflow_result();
+      receiveBase(result, "updateWorkflow");
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      return;
+    }
+
+    public String getWorkflowTemplateId(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getWorkflowTemplateId(workflowName);
+      return recv_getWorkflowTemplateId();
+    }
+
+    public void send_getWorkflowTemplateId(String workflowName) throws org.apache.thrift.TException
+    {
+      getWorkflowTemplateId_args args = new getWorkflowTemplateId_args();
+      args.setWorkflowName(workflowName);
+      sendBase("getWorkflowTemplateId", args);
+    }
+
+    public String recv_getWorkflowTemplateId() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+      receiveBase(result, "getWorkflowTemplateId");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWorkflowTemplateId failed: unknown result");
+    }
+
+    public boolean isWorkflowExistWithName(String workflowName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_isWorkflowExistWithName(workflowName);
+      return recv_isWorkflowExistWithName();
+    }
+
+    public void send_isWorkflowExistWithName(String workflowName) throws org.apache.thrift.TException
+    {
+      isWorkflowExistWithName_args args = new isWorkflowExistWithName_args();
+      args.setWorkflowName(workflowName);
+      sendBase("isWorkflowExistWithName", args);
+    }
+
+    public boolean recv_isWorkflowExistWithName() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+      receiveBase(result, "isWorkflowExistWithName");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isWorkflowExistWithName failed: unknown result");
+    }
+
   }
   public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
     public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -5613,6 +5894,35 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void getAllModules(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllModules_call method_call = new getAllModules_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllModules_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public getAllModules_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllModules", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllModules_args args = new getAllModules_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getAllModules();
+      }
+    }
+
     public void deleteApplicationModule(String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       deleteApplicationModule_call method_call = new deleteApplicationModule_call(appModuleId, resultHandler, this, ___protocolFactory, ___transport);
@@ -7632,6 +7942,230 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void getAllWorkflows(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllWorkflows_call method_call = new getAllWorkflows_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllWorkflows_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public getAllWorkflows_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllWorkflows", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllWorkflows_args args = new getAllWorkflows_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<String> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getAllWorkflows();
+      }
+    }
+
+    public void getWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getWorkflow_call method_call = new getWorkflow_call(workflowTemplateId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      public getWorkflow_call(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getWorkflow_args args = new getWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.Workflow getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getWorkflow();
+      }
+    }
+
+    public void deleteWorkflow(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deleteWorkflow_call method_call = new deleteWorkflow_call(workflowTemplateId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deleteWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      public deleteWorkflow_call(String workflowTemplateId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteWorkflow_args args = new deleteWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        (new Client(prot)).recv_deleteWorkflow();
+      }
+    }
+
+    public void registerWorkflow(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      registerWorkflow_call method_call = new registerWorkflow_call(workflow, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class registerWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.Workflow workflow;
+      public registerWorkflow_call(org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflow = workflow;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerWorkflow_args args = new registerWorkflow_args();
+        args.setWorkflow(workflow);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_registerWorkflow();
+      }
+    }
+
+    public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      updateWorkflow_call method_call = new updateWorkflow_call(workflowTemplateId, workflow, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class updateWorkflow_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowTemplateId;
+      private org.apache.airavata.model.Workflow workflow;
+      public updateWorkflow_call(String workflowTemplateId, org.apache.airavata.model.Workflow workflow, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowTemplateId = workflowTemplateId;
+        this.workflow = workflow;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateWorkflow", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        updateWorkflow_args args = new updateWorkflow_args();
+        args.setWorkflowTemplateId(workflowTemplateId);
+        args.setWorkflow(workflow);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        (new Client(prot)).recv_updateWorkflow();
+      }
+    }
+
+    public void getWorkflowTemplateId(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getWorkflowTemplateId_call method_call = new getWorkflowTemplateId_call(workflowName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getWorkflowTemplateId_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowName;
+      public getWorkflowTemplateId_call(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowName = workflowName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWorkflowTemplateId", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getWorkflowTemplateId_args args = new getWorkflowTemplateId_args();
+        args.setWorkflowName(workflowName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getWorkflowTemplateId();
+      }
+    }
+
+    public void isWorkflowExistWithName(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      isWorkflowExistWithName_call method_call = new isWorkflowExistWithName_call(workflowName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class isWorkflowExistWithName_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String workflowName;
+      public isWorkflowExistWithName_call(String workflowName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.workflowName = workflowName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isWorkflowExistWithName", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        isWorkflowExistWithName_args args = new isWorkflowExistWithName_args();
+        args.setWorkflowName(workflowName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_isWorkflowExistWithName();
+      }
+    }
+
   }
 
   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -7676,6 +8210,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("registerApplicationModule", new registerApplicationModule());
       processMap.put("getApplicationModule", new getApplicationModule());
       processMap.put("updateApplicationModule", new updateApplicationModule());
+      processMap.put("getAllModules", new getAllModules());
       processMap.put("deleteApplicationModule", new deleteApplicationModule());
       processMap.put("registerApplicationDeployment", new registerApplicationDeployment());
       processMap.put("getApplicationDeployment", new getApplicationDeployment());
@@ -7736,6 +8271,13 @@ import org.slf4j.LoggerFactory;
       processMap.put("getAllGatewayComputeResourcePreferences", new getAllGatewayComputeResourcePreferences());
       processMap.put("updateGatewayComputeResourcePreference", new updateGatewayComputeResourcePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
+      processMap.put("getAllWorkflows", new getAllWorkflows());
+      processMap.put("getWorkflow", new getWorkflow());
+      processMap.put("deleteWorkflow", new deleteWorkflow());
+      processMap.put("registerWorkflow", new registerWorkflow());
+      processMap.put("updateWorkflow", new updateWorkflow());
+      processMap.put("getWorkflowTemplateId", new getWorkflowTemplateId());
+      processMap.put("isWorkflowExistWithName", new isWorkflowExistWithName());
       return processMap;
     }
 
@@ -8623,6 +9165,34 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public static class getAllModules<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllModules_args> {
+      public getAllModules() {
+        super("getAllModules");
+      }
+
+      public getAllModules_args getEmptyArgsInstance() {
+        return new getAllModules_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllModules_result getResult(I iface, getAllModules_args args) throws org.apache.thrift.TException {
+        getAllModules_result result = new getAllModules_result();
+        try {
+          result.success = iface.getAllModules();
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
     public static class deleteApplicationModule<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteApplicationModule_args> {
       public deleteApplicationModule() {
         super("deleteApplicationModule");
@@ -10330,6 +10900,203 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public static class getAllWorkflows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllWorkflows_args> {
+      public getAllWorkflows() {
+        super("getAllWorkflows");
+      }
+
+      public getAllWorkflows_args getEmptyArgsInstance() {
+        return new getAllWorkflows_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllWorkflows_result getResult(I iface, getAllWorkflows_args args) throws org.apache.thrift.TException {
+        getAllWorkflows_result result = new getAllWorkflows_result();
+        try {
+          result.success = iface.getAllWorkflows();
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class getWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWorkflow_args> {
+      public getWorkflow() {
+        super("getWorkflow");
+      }
+
+      public getWorkflow_args getEmptyArgsInstance() {
+        return new getWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getWorkflow_result getResult(I iface, getWorkflow_args args) throws org.apache.thrift.TException {
+        getWorkflow_result result = new getWorkflow_result();
+        try {
+          result.success = iface.getWorkflow(args.workflowTemplateId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class deleteWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteWorkflow_args> {
+      public deleteWorkflow() {
+        super("deleteWorkflow");
+      }
+
+      public deleteWorkflow_args getEmptyArgsInstance() {
+        return new deleteWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteWorkflow_result getResult(I iface, deleteWorkflow_args args) throws org.apache.thrift.TException {
+        deleteWorkflow_result result = new deleteWorkflow_result();
+        try {
+          iface.deleteWorkflow(args.workflowTemplateId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class registerWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerWorkflow_args> {
+      public registerWorkflow() {
+        super("registerWorkflow");
+      }
+
+      public registerWorkflow_args getEmptyArgsInstance() {
+        return new registerWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public registerWorkflow_result getResult(I iface, registerWorkflow_args args) throws org.apache.thrift.TException {
+        registerWorkflow_result result = new registerWorkflow_result();
+        try {
+          result.success = iface.registerWorkflow(args.workflow);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class updateWorkflow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateWorkflow_args> {
+      public updateWorkflow() {
+        super("updateWorkflow");
+      }
+
+      public updateWorkflow_args getEmptyArgsInstance() {
+        return new updateWorkflow_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public updateWorkflow_result getResult(I iface, updateWorkflow_args args) throws org.apache.thrift.TException {
+        updateWorkflow_result result = new updateWorkflow_result();
+        try {
+          iface.updateWorkflow(args.workflowTemplateId, args.workflow);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class getWorkflowTemplateId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWorkflowTemplateId_args> {
+      public getWorkflowTemplateId() {
+        super("getWorkflowTemplateId");
+      }
+
+      public getWorkflowTemplateId_args getEmptyArgsInstance() {
+        return new getWorkflowTemplateId_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getWorkflowTemplateId_result getResult(I iface, getWorkflowTemplateId_args args) throws org.apache.thrift.TException {
+        getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+        try {
+          result.success = iface.getWorkflowTemplateId(args.workflowName);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class isWorkflowExistWithName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isWorkflowExistWithName_args> {
+      public isWorkflowExistWithName() {
+        super("isWorkflowExistWithName");
+      }
+
+      public isWorkflowExistWithName_args getEmptyArgsInstance() {
+        return new isWorkflowExistWithName_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public isWorkflowExistWithName_result getResult(I iface, isWorkflowExistWithName_args args) throws org.apache.thrift.TException {
+        isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+        try {
+          result.success = iface.isWorkflowExistWithName(args.workflowName);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
   }
 
   public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -10374,6 +11141,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("registerApplicationModule", new registerApplicationModule());
       processMap.put("getApplicationModule", new getApplicationModule());
       processMap.put("updateApplicationModule", new updateApplicationModule());
+      processMap.put("getAllModules", new getAllModules());
       processMap.put("deleteApplicationModule", new deleteApplicationModule());
       processMap.put("registerApplicationDeployment", new registerApplicationDeployment());
       processMap.put("getApplicationDeployment", new getApplicationDeployment());
@@ -10434,6 +11202,13 @@ import org.slf4j.LoggerFactory;
       processMap.put("getAllGatewayComputeResourcePreferences", new getAllGatewayComputeResourcePreferences());
       processMap.put("updateGatewayComputeResourcePreference", new updateGatewayComputeResourcePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
+      processMap.put("getAllWorkflows", new getAllWorkflows());
+      processMap.put("getWorkflow", new getWorkflow());
+      processMap.put("deleteWorkflow", new deleteWorkflow());
+      processMap.put("registerWorkflow", new registerWorkflow());
+      processMap.put("updateWorkflow", new updateWorkflow());
+      processMap.put("getWorkflowTemplateId", new getWorkflowTemplateId());
+      processMap.put("isWorkflowExistWithName", new isWorkflowExistWithName());
       return processMap;
     }
 
@@ -12553,22 +13328,21 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public static class deleteApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationModule_args, Boolean> {
-      public deleteApplicationModule() {
-        super("deleteApplicationModule");
+    public static class getAllModules<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllModules_args, List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> {
+      public getAllModules() {
+        super("getAllModules");
       }
 
-      public deleteApplicationModule_args getEmptyArgsInstance() {
-        return new deleteApplicationModule_args();
+      public getAllModules_args getEmptyArgsInstance() {
+        return new getAllModules_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteApplicationModule_result result = new deleteApplicationModule_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> o) {
+            getAllModules_result result = new getAllModules_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -12580,7 +13354,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteApplicationModule_result result = new deleteApplicationModule_result();
+            getAllModules_result result = new getAllModules_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -12616,26 +13390,27 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, deleteApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteApplicationModule(args.appModuleId,resultHandler);
+      public void start(I iface, getAllModules_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> resultHandler) throws TException {
+        iface.getAllModules(resultHandler);
       }
     }
 
-    public static class registerApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationDeployment_args, String> {
-      public registerApplicationDeployment() {
-        super("registerApplicationDeployment");
+    public static class deleteApplicationModule<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationModule_args, Boolean> {
+      public deleteApplicationModule() {
+        super("deleteApplicationModule");
       }
 
-      public registerApplicationDeployment_args getEmptyArgsInstance() {
-        return new registerApplicationDeployment_args();
+      public deleteApplicationModule_args getEmptyArgsInstance() {
+        return new deleteApplicationModule_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerApplicationDeployment_result result = new registerApplicationDeployment_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteApplicationModule_result result = new deleteApplicationModule_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -12647,7 +13422,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerApplicationDeployment_result result = new registerApplicationDeployment_result();
+            deleteApplicationModule_result result = new deleteApplicationModule_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -12683,25 +13458,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, registerApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerApplicationDeployment(args.applicationDeployment,resultHandler);
+      public void start(I iface, deleteApplicationModule_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteApplicationModule(args.appModuleId,resultHandler);
       }
     }
 
-    public static class getApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationDeployment_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> {
-      public getApplicationDeployment() {
-        super("getApplicationDeployment");
+    public static class registerApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerApplicationDeployment_args, String> {
+      public registerApplicationDeployment() {
+        super("registerApplicationDeployment");
       }
 
-      public getApplicationDeployment_args getEmptyArgsInstance() {
-        return new getApplicationDeployment_args();
+      public registerApplicationDeployment_args getEmptyArgsInstance() {
+        return new registerApplicationDeployment_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription o) {
-            getApplicationDeployment_result result = new getApplicationDeployment_result();
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerApplicationDeployment_result result = new registerApplicationDeployment_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -12714,7 +13489,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getApplicationDeployment_result result = new getApplicationDeployment_result();
+            registerApplicationDeployment_result result = new registerApplicationDeployment_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -12750,27 +13525,26 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> resultHandler) throws TException {
-        iface.getApplicationDeployment(args.appDeploymentId,resultHandler);
+      public void start(I iface, registerApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerApplicationDeployment(args.applicationDeployment,resultHandler);
       }
     }
 
-    public static class updateApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationDeployment_args, Boolean> {
-      public updateApplicationDeployment() {
-        super("updateApplicationDeployment");
+    public static class getApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getApplicationDeployment_args, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> {
+      public getApplicationDeployment() {
+        super("getApplicationDeployment");
       }
 
-      public updateApplicationDeployment_args getEmptyArgsInstance() {
-        return new updateApplicationDeployment_args();
+      public getApplicationDeployment_args getEmptyArgsInstance() {
+        return new getApplicationDeployment_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateApplicationDeployment_result result = new updateApplicationDeployment_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription o) {
+            getApplicationDeployment_result result = new getApplicationDeployment_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -12782,7 +13556,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateApplicationDeployment_result result = new updateApplicationDeployment_result();
+            getApplicationDeployment_result result = new getApplicationDeployment_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -12818,25 +13592,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, updateApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateApplicationDeployment(args.appDeploymentId, args.applicationDeployment,resultHandler);
+      public void start(I iface, getApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> resultHandler) throws TException {
+        iface.getApplicationDeployment(args.appDeploymentId,resultHandler);
       }
     }
 
-    public static class deleteApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationDeployment_args, Boolean> {
-      public deleteApplicationDeployment() {
-        super("deleteApplicationDeployment");
+    public static class updateApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateApplicationDeployment_args, Boolean> {
+      public updateApplicationDeployment() {
+        super("updateApplicationDeployment");
       }
 
-      public deleteApplicationDeployment_args getEmptyArgsInstance() {
-        return new deleteApplicationDeployment_args();
+      public updateApplicationDeployment_args getEmptyArgsInstance() {
+        return new updateApplicationDeployment_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
+            updateApplicationDeployment_result result = new updateApplicationDeployment_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -12850,7 +13624,75 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
+            updateApplicationDeployment_result result = new updateApplicationDeployment_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, updateApplicationDeployment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateApplicationDeployment(args.appDeploymentId, args.applicationDeployment,resultHandler);
+      }
+    }
+
+    public static class deleteApplicationDeployment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteApplicationDeployment_args, Boolean> {
+      public deleteApplicationDeployment() {
+        super("deleteApplicationDeployment");
+      }
+
+      public deleteApplicationDeployment_args getEmptyArgsInstance() {
+        return new deleteApplicationDeployment_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            deleteApplicationDeployment_result result = new deleteApplicationDeployment_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -16600,6 +17442,474 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
+      public getAllWorkflows() {
+        super("getAllWorkflows");
+      }
+
+      public getAllWorkflows_args getEmptyArgsInstance() {
+        return new getAllWorkflows_args();
+      }
+
+      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<String>>() { 
+          public void onComplete(List<String> o) {
+            getAllWorkflows_result result = new getAllWorkflows_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllWorkflows_result result = new getAllWorkflows_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllWorkflows_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+        iface.getAllWorkflows(resultHandler);
+      }
+    }
+
+    public static class getWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflow_args, org.apache.airavata.model.Workflow> {
+      public getWorkflow() {
+        super("getWorkflow");
+      }
+
+      public getWorkflow_args getEmptyArgsInstance() {
+        return new getWorkflow_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.Workflow> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.Workflow>() { 
+          public void onComplete(org.apache.airavata.model.Workflow o) {
+            getWorkflow_result result = new getWorkflow_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getWorkflow_result result = new getWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.Workflow> resultHandler) throws TException {
+        iface.getWorkflow(args.workflowTemplateId,resultHandler);
+      }
+    }
+
+    public static class deleteWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteWorkflow_args, Void> {
+      public deleteWorkflow() {
+        super("deleteWorkflow");
+      }
+
+      public deleteWorkflow_args getEmptyArgsInstance() {
+        return new deleteWorkflow_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            deleteWorkflow_result result = new deleteWorkflow_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            deleteWorkflow_result result = new deleteWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, deleteWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.deleteWorkflow(args.workflowTemplateId,resultHandler);
+      }
+    }
+
+    public static class registerWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerWorkflow_args, String> {
+      public registerWorkflow() {
+        super("registerWorkflow");
+      }
+
+      public registerWorkflow_args getEmptyArgsInstance() {
+        return new registerWorkflow_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerWorkflow_result result = new registerWorkflow_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            registerWorkflow_result result = new registerWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, registerWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerWorkflow(args.workflow,resultHandler);
+      }
+    }
+
+    public static class updateWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateWorkflow_args, Void> {
+      public updateWorkflow() {
+        super("updateWorkflow");
+      }
+
+      public updateWorkflow_args getEmptyArgsInstance() {
+        return new updateWorkflow_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            updateWorkflow_result result = new updateWorkflow_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            updateWorkflow_result result = new updateWorkflow_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, updateWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.updateWorkflow(args.workflowTemplateId, args.workflow,resultHandler);
+      }
+    }
+
+    public static class getWorkflowTemplateId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflowTemplateId_args, String> {
+      public getWorkflowTemplateId() {
+        super("getWorkflowTemplateId");
+      }
+
+      public getWorkflowTemplateId_args getEmptyArgsInstance() {
+        return new getWorkflowTemplateId_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getWorkflowTemplateId_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.getWorkflowTemplateId(args.workflowName,resultHandler);
+      }
+    }
+
+    public static class isWorkflowExistWithName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isWorkflowExistWithName_args, Boolean> {
+      public isWorkflowExistWithName() {
+        super("isWorkflowExistWithName");
+      }
+
+      public isWorkflowExistWithName_args getEmptyArgsInstance() {
+        return new isWorkflowExistWithName_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, isWorkflowExistWithName_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.isWorkflowExistWithName(args.workflowName,resultHandler);
+      }
+    }
+
   }
 
   public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args>   {
@@ -50315,22 +51625,20 @@ import org.slf4j.LoggerFactory;
 
   }
 
-  public static class deleteApplicationModule_args implements org.apache.thrift.TBase<deleteApplicationModule_args, deleteApplicationModule_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteApplicationModule_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteApplicationModule_args");
+  public static class getAllModules_args implements org.apache.thrift.TBase<getAllModules_args, getAllModules_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllModules_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thri

<TRUNCATED>

[25/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
index af96aa8..7d3d15a 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Workflow.java
@@ -2063,13 +2063,13 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list204 = iprot.readListBegin();
-                  struct.success = new ArrayList<String>(_list204.size);
-                  for (int _i205 = 0; _i205 < _list204.size; ++_i205)
+                  org.apache.thrift.protocol.TList _list212 = iprot.readListBegin();
+                  struct.success = new ArrayList<String>(_list212.size);
+                  for (int _i213 = 0; _i213 < _list212.size; ++_i213)
                   {
-                    String _elem206;
-                    _elem206 = iprot.readString();
-                    struct.success.add(_elem206);
+                    String _elem214;
+                    _elem214 = iprot.readString();
+                    struct.success.add(_elem214);
                   }
                   iprot.readListEnd();
                 }
@@ -2124,9 +2124,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (String _iter207 : struct.success)
+            for (String _iter215 : struct.success)
             {
-              oprot.writeString(_iter207);
+              oprot.writeString(_iter215);
             }
             oprot.writeListEnd();
           }
@@ -2181,9 +2181,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (String _iter208 : struct.success)
+            for (String _iter216 : struct.success)
             {
-              oprot.writeString(_iter208);
+              oprot.writeString(_iter216);
             }
           }
         }
@@ -2204,13 +2204,13 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list209 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new ArrayList<String>(_list209.size);
-            for (int _i210 = 0; _i210 < _list209.size; ++_i210)
+            org.apache.thrift.protocol.TList _list217 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new ArrayList<String>(_list217.size);
+            for (int _i218 = 0; _i218 < _list217.size; ++_i218)
             {
-              String _elem211;
-              _elem211 = iprot.readString();
-              struct.success.add(_elem211);
+              String _elem219;
+              _elem219 = iprot.readString();
+              struct.success.add(_elem219);
             }
           }
           struct.setSuccessIsSet(true);


[39/44] git commit: Integrated appCatalog for ssh and gsi modules, commented out old test classes, need to fix this

Posted by ch...@apache.org.
Integrated appCatalog for ssh and gsi modules, commented out old test classes, need to fix this


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d94e8c95
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d94e8c95
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d94e8c95

Branch: refs/heads/gfac_appcatalog_int
Commit: d94e8c955763243f7b36b5151fd0a27aff90e0f6
Parents: 5a28f74
Author: shamrath <sh...@gmail.com>
Authored: Tue Nov 4 12:32:09 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:53:12 2014 -0500

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/Scheduler.java     |   6 +-
 .../gfac/core/context/JobExecutionContext.java  |  31 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |   3 +-
 .../gfac/gram/handler/GridFTPOutputHandler.java |   2 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  58 +--
 .../impl/GSISSHProviderTestWithMyProxyAuth.java | 465 +++++++++--------
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  16 +
 .../ssh/handler/SSHDirectorySetupHandler.java   |   7 +-
 .../gfac/ssh/handler/SSHInputHandler.java       |   3 +-
 .../gfac/ssh/handler/SSHOutputHandler.java      | 142 +++---
 .../gfac/ssh/provider/impl/SSHProvider.java     |  69 +--
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    | 300 +++++------
 .../services/impl/BigRed2TestWithSSHAuth.java   | 504 +++++++++----------
 .../impl/SSHProviderTestWithSSHAuth.java        | 342 ++++++-------
 14 files changed, 909 insertions(+), 1039 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 9e642fe..2bd612c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -60,9 +60,9 @@ public class Scheduler {
         jobExecutionContext.setProvider(getProvider(jobExecutionContext));
         // TODO: Selecting the provider based on application description.
         jobExecutionContext.getGFacConfiguration().setInHandlers(jobExecutionContext.getProvider().getClass().getName(),
-                jobExecutionContext.getServiceName());
+                jobExecutionContext.getApplicationName());
         jobExecutionContext.getGFacConfiguration().setOutHandlers(jobExecutionContext.getProvider().getClass().getName(),
-        		 jobExecutionContext.getServiceName());
+        		 jobExecutionContext.getApplicationName());
         jobExecutionContext.getGFacConfiguration().setExecutionMode(getExecutionMode(jobExecutionContext));
     }
 
@@ -72,7 +72,7 @@ public class Scheduler {
      * @return GFacProvider instance.
      */
     private static GFacProvider getProvider(JobExecutionContext jobExecutionContext) throws GFacException {
-        String applicationName = jobExecutionContext.getServiceName();
+        String applicationName = jobExecutionContext.getApplicationName();
 
         URL resource = Scheduler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index dcae96a..2d1a975 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -139,7 +139,7 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     // a scientific application(or algorithm) as a service. Service name is there to identify to
     // which service description we should refer during the execution of the current job represented
     // by this context instance.
-    private String serviceName;
+    private String applicationName;
 
     private String experimentID;
 
@@ -166,10 +166,10 @@ public class JobExecutionContext extends AbstractContext implements Serializable
      */
     private Map<String, SecurityContext> securityContext = new HashMap<String, SecurityContext>();
 
-    public JobExecutionContext(GFacConfiguration gFacConfiguration,String serviceName){
+    public JobExecutionContext(GFacConfiguration gFacConfiguration,String applicationName){
         this.gfacConfiguration = gFacConfiguration;
         notifier = new GFacNotifier();
-        setServiceName(serviceName);
+        setApplicationName(applicationName);
         outputFileList = new ArrayList<String>();
     }
 
@@ -238,12 +238,12 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         this.outHandlers = outHandlers;
     }
 
-    public String getServiceName() {
-        return serviceName;
+    public String getApplicationName() {
+        return applicationName;
     }
 
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
+    public void setApplicationName(String applicationName) {
+        this.applicationName = applicationName;
     }
 
     public GFacNotifier getNotifier() {
@@ -274,15 +274,6 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         this.inPath = false;
     }
 
-//    public ContextHeaderDocument.ContextHeader getContextHeader() {
-//        return contextHeader;
-//    }
-//
-//    public void setContextHeader(ContextHeaderDocument.ContextHeader contextHeader) {
-//        this.contextHeader = contextHeader;
-//    }
-
-	
 	public SecurityContext getSecurityContext(String name) throws GFacException{
 		SecurityContext secContext = securityContext.get(name+"-"+this.getApplicationContext().getHostDescription().getType().getHostAddress());
 		return secContext;
@@ -459,4 +450,12 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     public void setPreferredDataMovementInterface(DataMovementInterface preferredDataMovementInterface) {
         this.preferredDataMovementInterface = preferredDataMovementInterface;
     }
+
+    public String getExecutablePath() {
+        if (applicationContext == null || applicationContext.getApplicationDeploymentDescription() == null) {
+            return null;
+        } else {
+            return applicationContext.getApplicationDeploymentDescription().getExecutablePath();
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/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 656a291..0455f7e 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
@@ -269,7 +269,7 @@ public class BetterGfacImpl implements GFac,Watcher {
         GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), configurationProperties);
 
         // start constructing jobexecutioncontext
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, applicationInterfaceId);
+        jobExecutionContext = new JobExecutionContext(gFacConfiguration, applicationInterface.getApplicationName());
 
         // setting experiment/task/workflownode related information
         Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
@@ -281,6 +281,7 @@ public class BetterGfacImpl implements GFac,Watcher {
 
 
         List<JobDetails> jobDetailsList = taskData.getJobDetailsList();
+        //FIXME: Following for loop only set last jobDetails element to the jobExecutionContext
         for(JobDetails jDetails:jobDetailsList){
             jobExecutionContext.setJobDetails(jDetails);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-gram/src/main/java/org/apache/airavata/gfac/gram/handler/GridFTPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gram/src/main/java/org/apache/airavata/gfac/gram/handler/GridFTPOutputHandler.java b/modules/gfac/gfac-gram/src/main/java/org/apache/airavata/gfac/gram/handler/GridFTPOutputHandler.java
index a424da0..7e226ea 100644
--- a/modules/gfac/gfac-gram/src/main/java/org/apache/airavata/gfac/gram/handler/GridFTPOutputHandler.java
+++ b/modules/gfac/gfac-gram/src/main/java/org/apache/airavata/gfac/gram/handler/GridFTPOutputHandler.java
@@ -133,7 +133,7 @@ public class GridFTPOutputHandler extends AbstractHandler {
                     }
 
                     String timeStampedServiceName = GFacUtils.createUniqueNameWithDate(jobExecutionContext
-                            .getServiceName());
+                            .getApplicationName());
                     File localStdOutFile = File.createTempFile(timeStampedServiceName, "stdout");
                     localStdErrFile = File.createTempFile(timeStampedServiceName, "stderr");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index baca65c..0a521b5 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -42,7 +42,6 @@ import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
@@ -50,21 +49,13 @@ import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterfa
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.schemas.gfac.FileArrayType;
-import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.StringArrayType;
 import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
+import java.util.*;
 
 
 public class GFACGSISSHUtils {
@@ -181,7 +172,7 @@ public class GFACGSISSHUtils {
         jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
         jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
         jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
-        jobDescriptor.setExecutablePath(app.getExecutablePath());
+        jobDescriptor.setExecutablePath(jobExecutionContext.getExecutablePath());
         jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
         jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
         Random random = new Random();
@@ -214,51 +205,6 @@ public class GFACGSISSHUtils {
         }
         jobDescriptor.setInputValues(inputValues);
 
-        // this part will fill out the hpcApplicationDescriptor
-        if (app instanceof HpcApplicationDeploymentType) {
-            HpcApplicationDeploymentType applicationDeploymentType
-                    = (HpcApplicationDeploymentType) app;
-            jobDescriptor.setUserName(((GSISSHAbstractCluster)cluster).getServerInfo().getUserName());
-            jobDescriptor.setShellName("/bin/bash");
-            jobDescriptor.setAllEnvExport(true);
-            jobDescriptor.setMailOptions("n");
-            jobDescriptor.setNodes(applicationDeploymentType.getNodeCount());
-            jobDescriptor.setProcessesPerNode(applicationDeploymentType.getProcessorsPerNode());
-            jobDescriptor.setMaxWallTime(String.valueOf(applicationDeploymentType.getMaxWallTime()));
-            jobDescriptor.setJobSubmitter(applicationDeploymentType.getJobSubmitterCommand());
-            jobDescriptor.setCPUCount(applicationDeploymentType.getCpuCount());
-            if (applicationDeploymentType.getProjectAccount() != null) {
-                if (applicationDeploymentType.getProjectAccount().getProjectAccountNumber() != null) {
-                    jobDescriptor.setAcountString(applicationDeploymentType.getProjectAccount().getProjectAccountNumber());
-                }
-            }
-            if (applicationDeploymentType.getQueue() != null) {
-                if (applicationDeploymentType.getQueue().getQueueName() != null) {
-                    jobDescriptor.setQueueName(applicationDeploymentType.getQueue().getQueueName());
-                }
-            }
-            jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
-            TaskDetails taskData = jobExecutionContext.getTaskData();
-            if (taskData != null && taskData.isSetTaskScheduling()) {
-                ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
-                if (computionnalResource.getNodeCount() > 0) {
-                    jobDescriptor.setNodes(computionnalResource.getNodeCount());
-                }
-                if (computionnalResource.getComputationalProjectAccount() != null) {
-                    jobDescriptor.setAcountString(computionnalResource.getComputationalProjectAccount());
-                }
-                if (computionnalResource.getQueueName() != null) {
-                    jobDescriptor.setQueueName(computionnalResource.getQueueName());
-                }
-                if (computionnalResource.getTotalCPUCount() > 0) {
-                    jobDescriptor.setProcessesPerNode(computionnalResource.getTotalCPUCount());
-                }
-                if (computionnalResource.getWallTimeLimit() > 0) {
-                    jobDescriptor.setMaxWallTime(String.valueOf(computionnalResource.getWallTimeLimit()));
-                }
-            }
-
-        }
         return jobDescriptor;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 0774022..630cd5c 100644
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -1,236 +1,229 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.core.gfac.services.impl;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-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.ProjectAccountType;
-import org.apache.airavata.schemas.gfac.QueueType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-public class GSISSHProviderTestWithMyProxyAuth {
-    private JobExecutionContext jobExecutionContext;
-
-    //FIXME: move job properties to configuration file
-    private static final String hostAddress = "trestles.sdsc.edu";
-    private static final String hostName = "trestles";
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String workingDirectory;
-    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-
-    @BeforeClass
-    public void setUp() throws Exception {
-//        System.setProperty("myproxy.user", "ogce");
-//        System.setProperty("myproxy.password", "");
-//        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
-//        System.setProperty("gsi.working.directory", "/home/ogce");
-//        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
-        certificateLocation = System.getProperty("trusted.cert.location");
-        myProxyUserName = System.getProperty("myproxy.username");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-
-        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        assert resource != null;
-        System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
-
-//        gFacConfiguration.setMyProxyLifeCycle(3600);
-//        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
-//        gFacConfiguration.setMyProxyUser("*****");
-//        gFacConfiguration.setMyProxyPassphrase("*****");
-//        gFacConfiguration.setTrustedCertLocation("./certificates");
-//        //have to set InFlwo Handlers and outFlowHandlers
-//        gFacConfiguration.setInHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GramDirectorySetupHandler","org.apache.airavata.gfac.handler.GridFTPInputHandler"}));
-//        gFacConfiguration.setOutHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GridFTPOutputHandler"}));
-
-        /*
-        * Host
-        */
-        HostDescription host = new HostDescription(GsisshHostType.type);
-        host.getType().setHostAddress(hostAddress);
-        host.getType().setHostName(hostName);
-
-        /*
-        * App
-        */
-        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-        name.setStringValue("EchoLocal");
-        app.setApplicationName(name);
-        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);
-
-        /*
-        * Use bat file if it is compiled on Windows
-        */
-        app.setExecutableLocation("/bin/echo");
-
-        /*
-        * Default tmp location
-        */
-        String tempDir = "/home/ogce/scratch/";
-        String date = (new Date()).toString();
-        date = date.replaceAll(" ", "_");
-        date = date.replaceAll(":", "_");
-
-        tempDir = workingDirectory + File.separator
-                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-
-        System.out.println(tempDir);
-        app.setScratchWorkingDirectory(tempDir);
-        app.setStaticWorkingDirectory(tempDir);
-        app.setInputDataDirectory(tempDir + File.separator + "inputData");
-        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
-        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
-        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
-        app.setMaxWallTime(5);
-        app.setInstalledParentPath("/opt/torque/bin/");
-
-        /*
-        * Service
-        */
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("SimpleEcho");
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-
-        InputParameterType input = InputParameterType.Factory.newInstance();
-        input.setParameterName("echo_input");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input);
-
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-
-                .size()]);
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("echo_output");
-        output.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-
-        OutputParameterType[] outputParamList = outputList
-                .toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-        // Adding security context
-        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
-        ApplicationContext applicationContext = new ApplicationContext();
-        jobExecutionContext.setApplicationContext(applicationContext);
-        applicationContext.setServiceDescription(serv);
-        applicationContext.setApplicationDeploymentDescription(appDesc);
-        applicationContext.setHostDescription(host);
-
-        MessageContext inMessage = new MessageContext();
-        ActualParameter echo_input = new ActualParameter();
-        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-        inMessage.addParameter("echo_input", echo_input);
-
-
-        jobExecutionContext.setInMessageContext(inMessage);
-
-        MessageContext outMessage = new MessageContext();
-        ActualParameter echo_out = new ActualParameter();
-//		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-        outMessage.addParameter("echo_output", echo_out);
-        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
-        jobExecutionContext.setTaskData(new TaskDetails("11323"));
-        jobExecutionContext.setOutMessageContext(outMessage);
-
-    }
-
-    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
-        Cluster pbsCluster = null;
-        try {
-            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(app.getInstalledParentPath()));
-        } catch (SSHApiException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        GSISecurityContext sshSecurityContext = new GSISecurityContext(pbsCluster);
-        return sshSecurityContext;
-    }
-    @Test
-    public void testGSISSHProvider() throws GFacException {
-        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
-        System.out.println(jobExecutionContext.getJobDetails().getJobID());
-    }
-
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//import org.apache.aiaravata.application.catalog.data.model.ApplicationInterface;
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.SecurityContext;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+//import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+//import org.apache.airavata.gsi.ssh.api.Cluster;
+//import org.apache.airavata.gsi.ssh.api.SSHApiException;
+//import org.apache.airavata.gsi.ssh.api.ServerInfo;
+//import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+//import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.util.CommonUtils;
+//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//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.ProjectAccountType;
+//import org.apache.airavata.schemas.gfac.QueueType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.testng.annotations.BeforeClass;
+//import org.testng.annotations.Test;
+//
+//public class GSISSHProviderTestWithMyProxyAuth {
+//    private JobExecutionContext jobExecutionContext;
+//
+//    //FIXME: move job properties to configuration file
+//    private static final String hostAddress = "trestles.sdsc.edu";
+//    private static final String hostName = "trestles";
+//    private String myProxyUserName;
+//    private String myProxyPassword;
+//    private String workingDirectory;
+//    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
+//
+//    @BeforeClass
+//    public void setUp() throws Exception {
+////        System.setProperty("myproxy.user", "ogce");
+////        System.setProperty("myproxy.password", "");
+////        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
+////        System.setProperty("gsi.working.directory", "/home/ogce");
+////        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
+//        certificateLocation = System.getProperty("trusted.cert.location");
+//        myProxyUserName = System.getProperty("myproxy.username");
+//        myProxyPassword = System.getProperty("myproxy.password");
+//        workingDirectory = System.getProperty("gsi.working.directory");
+//
+//        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
+//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+//            throw new Exception("Need my proxy user name password to run tests.");
+//        }
+//        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        assert resource != null;
+//        System.out.println(resource.getFile());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+//
+//        /*
+//        * Host
+//        */
+//        HostDescription host = new HostDescription(GsisshHostType.type);
+//        host.getType().setHostAddress(hostAddress);
+//        host.getType().setHostName(hostName);
+//
+//        /*
+//        * App
+//        */
+//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//        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);
+//
+//        /*
+//        * Use bat file if it is compiled on Windows
+//        */
+//        app.setExecutableLocation("/bin/echo");
+//
+//        /*
+//        * Default tmp location
+//        */
+//        String tempDir = "/home/ogce/scratch/";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = workingDirectory + File.separator
+//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+//
+//        System.out.println(tempDir);
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+//        app.setMaxWallTime(5);
+//        app.setInstalledParentPath("/opt/torque/bin/");
+//
+//        /*
+//        * Service
+//        */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//
+//                .size()]);
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        // Adding security context
+//        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        applicationContext.setServiceDescription(serv);
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//        applicationContext.setHostDescription(host);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+//        GSIAuthenticationInfo authenticationInfo
+//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+//                7512, 17280000, certificateLocation);
+//
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
+//        Cluster pbsCluster = null;
+//        try {
+//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(app.getInstalledParentPath()));
+//        } catch (SSHApiException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        GSISecurityContext sshSecurityContext = new GSISecurityContext(pbsCluster);
+//        return sshSecurityContext;
+//    }
+//    @Test
+//    public void testGSISSHProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
+//        System.out.println(jobExecutionContext.getJobDetails().getJobID());
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index dfd84de..f508e23 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -114,6 +114,22 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
                     .getApplicationDeploymentDescription().getType();
             String standardError = app.getStandardError();
             String standardOutput = app.getStandardOutput();
+            if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT) == null) {
+                try {
+                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                } catch (ApplicationSettingsException e) {
+                    log.error(e.getMessage());
+                    try {
+         				GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+         			} catch (GFacException e1) {
+         				 log.error(e1.getLocalizedMessage());
+         			}
+                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                }
+            }
+            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
+            String standardError = jobExecutionContext.getStandardError();
+            String standardOutput = jobExecutionContext.getStandardOutput();
             super.invoke(jobExecutionContext);
             // Server info
             if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir() != null){

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
index 0be6820..f7cbcc0 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
@@ -73,11 +73,10 @@ public class SSHDirectorySetupHandler extends AbstractHandler {
         } else {
             log.info("Successfully retrieved the Security Context");
         }
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
-            String workingDirectory = app.getScratchWorkingDirectory();
+            String workingDirectory = jobExecutionContext.getWorkingDir();
             cluster.makeDirectory(workingDirectory);
-            cluster.makeDirectory(app.getInputDataDirectory());
-            cluster.makeDirectory(app.getOutputDataDirectory());
+            cluster.makeDirectory(jobExecutionContext.getInputDir());
+            cluster.makeDirectory(jobExecutionContext.getOutputDir());
             DataTransferDetails detail = new DataTransferDetails();
             TransferStatus status = new TransferStatus();
             status.setTransferState(TransferState.DIRECTORY_SETUP);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
index b26e035..b0367f3 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
@@ -150,11 +150,10 @@ public class SSHInputHandler extends AbstractHandler {
     }
 
     private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
         int i = paramValue.lastIndexOf(File.separator);
         String substring = paramValue.substring(i + 1);
         try {
-            String targetFile = app.getInputDataDirectory() + File.separator + substring;
+            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
             if(paramValue.startsWith("scp:")){
             	paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
             	cluster.scpThirdParty(paramValue, targetFile);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
index 328ad32..d80e92b 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
@@ -27,6 +27,8 @@ import java.util.*;
 import net.schmizz.sshj.connection.ConnectionException;
 import net.schmizz.sshj.transport.TransportException;
 
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
@@ -44,6 +46,9 @@ import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.apache.airavata.registry.cpi.RegistryModelType;
@@ -58,38 +63,6 @@ public class SSHOutputHandler extends AbstractHandler {
     private static final Logger log = LoggerFactory.getLogger(SSHOutputHandler.class);
 
     public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        if (jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof GsisshHostType) { // this is because we don't have the right jobexecution context
-            // so attempting to get it from the registry
-            if (Constants.PUSH.equals(((GsisshHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType()).getMonitorMode())) { // this is because we don't have the right jobexecution context
-                // so attempting to get it from the registry
-                log.warn("During the out handler chain jobExecution context came null, so trying to handler");
-                ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-                TaskDetails taskData = null;
-                try {
-                    taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
-                } catch (RegistryException e) {
-                    log.error("Error retrieving job details from Registry");
-                    throw new GFacHandlerException("Error retrieving job details from Registry", e);
-                }
-                JobDetails jobDetails = taskData.getJobDetailsList().get(0);
-                String jobDescription = jobDetails.getJobDescription();
-                if (jobDescription != null) {
-                    JobDescriptor jobDescriptor = null;
-                    try {
-                        jobDescriptor = JobDescriptor.fromXML(jobDescription);
-                    } catch (XmlException e1) {
-                        e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                    }
-                    applicationDeploymentDescription.getType().setScratchWorkingDirectory(
-                            jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory());
-                    applicationDeploymentDescription.getType().setInputDataDirectory(jobDescriptor.getInputDirectory());
-                    applicationDeploymentDescription.getType().setOutputDataDirectory(jobDescriptor.getOutputDirectory());
-                    applicationDeploymentDescription.getType().setStandardError(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile());
-                    applicationDeploymentDescription.getType().setStandardOutput(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile());
-                }
-            }
-        }
-
         try {
             if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT) == null) {
 
@@ -98,10 +71,10 @@ public class SSHOutputHandler extends AbstractHandler {
         } catch (Exception e) {
             log.error(e.getMessage());
             try {
- 				GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
- 			} catch (GFacException e1) {
- 				 log.error(e1.getLocalizedMessage());
- 			}
+                GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                log.error(e1.getLocalizedMessage());
+            }
             throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
         }
 
@@ -109,11 +82,9 @@ public class SSHOutputHandler extends AbstractHandler {
         DataTransferDetails detail = new DataTransferDetails();
         TransferStatus status = new TransferStatus();
 
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext()
-                .getApplicationDeploymentDescription().getType();
         Cluster cluster = null;
         try {
-             cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
+            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
             if (cluster == null) {
                 throw new GFacProviderException("Security context is not set properly");
             } else {
@@ -143,19 +114,19 @@ public class SSHOutputHandler extends AbstractHandler {
 //            cluster.makeDirectory(outputDataDir);
             int i = 0;
             String stdOutStr = "";
-            while(stdOutStr.isEmpty()){ 		
-            try {
-            	cluster.scpFrom(app.getStandardOutput(), localStdOutFile.getAbsolutePath());
-                stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
-			} catch (Exception e) {
-				log.error(e.getLocalizedMessage());
-				Thread.sleep(2000);
-			}
-            i++;
-            if(i == 3) break;
+            while (stdOutStr.isEmpty()) {
+                try {
+                    cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
+                    stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
+                } catch (Exception e) {
+                    log.error(e.getLocalizedMessage());
+                    Thread.sleep(2000);
+                }
+                i++;
+                if (i == 3) break;
             }
             Thread.sleep(1000);
-            cluster.scpFrom(app.getStandardError(), localStdErrFile.getAbsolutePath());
+            cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
             Thread.sleep(1000);
 
             String stdErrStr = GFacUtils.readFileToString(localStdErrFile.getAbsolutePath());
@@ -177,72 +148,73 @@ public class SSHOutputHandler extends AbstractHandler {
                 ActualParameter actualParameter = (ActualParameter) output.get(paramName);
                 if ("URI".equals(actualParameter.getType().getType().toString())) {
                     List<String> outputList = null;
-                    int retry=3;
-                    while(retry>0){
-                    	 outputList = cluster.listDirectory(app.getOutputDataDirectory());
-                    	 if(outputList.size() > 0){
-                    		 break;
-                    	 }	
-                    	 retry--;
-                    	 Thread.sleep(2000);
+                    int retry = 3;
+                    while (retry > 0) {
+                        outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
+                        if (outputList.size() > 0) {
+                            break;
+                        }
+                        retry--;
+                        Thread.sleep(2000);
                     }
-                  
+
                     if (outputList.size() == 0 || outputList.get(0).isEmpty() || outputList.size() > 0) {
-                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr,outputArray);
+                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
                         Set<String> strings = output.keySet();
                         outputArray.clear();
                         for (String key : strings) {
                             ActualParameter actualParameter1 = (ActualParameter) output.get(key);
                             if ("URI".equals(actualParameter1.getType().getType().toString())) {
-                              	String downloadFile = MappingFactory.toString(actualParameter1);
-                            	cluster.scpFrom(downloadFile, outputDataDir);
-                            	String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar)+1, downloadFile.length());
-                            	String localFile = outputDataDir +  File.separator +fileName;
-								jobExecutionContext.addOutputFile(localFile);
-								MappingFactory.fromString(actualParameter1, localFile);
-								DataObjectType dataObjectType = new DataObjectType();
+                                String downloadFile = MappingFactory.toString(actualParameter1);
+                                cluster.scpFrom(downloadFile, outputDataDir);
+                                String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
+                                String localFile = outputDataDir + File.separator + fileName;
+                                jobExecutionContext.addOutputFile(localFile);
+                                MappingFactory.fromString(actualParameter1, localFile);
+                                DataObjectType dataObjectType = new DataObjectType();
                                 dataObjectType.setValue(localFile);
                                 dataObjectType.setKey(key);
                                 dataObjectType.setType(DataType.URI);
                                 outputArray.add(dataObjectType);
                             }
                         }
-                    
+
                         break;
-                    } else if( outputList.size() == 0) {//FIXME: Ultrascan case
+                    } else if (outputList.size() == 0) {//FIXME: Ultrascan case
                         String valueList = outputList.get(0);
-                        cluster.scpFrom(app.getOutputDataDirectory() + File.separator + valueList, outputDataDir);
+                        cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
                         String outputPath = outputDataDir + File.separator + valueList;
-						jobExecutionContext.addOutputFile(outputPath);
-						MappingFactory.fromString(actualParameter, outputPath);
-						DataObjectType dataObjectType = new DataObjectType();
+                        jobExecutionContext.addOutputFile(outputPath);
+                        MappingFactory.fromString(actualParameter, outputPath);
+                        DataObjectType dataObjectType = new DataObjectType();
                         dataObjectType.setValue(outputPath);
                         dataObjectType.setKey(paramName);
                         dataObjectType.setType(DataType.URI);
                         outputArray.add(dataObjectType);
                     }
                 } else {
-                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr,outputArray);
+                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
                 }
             }
             if (outputArray == null || outputArray.isEmpty()) {
-            	log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
-            	if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null){
-            		throw new GFacHandlerException(
-                        "Empty Output returned from the Application, Double check the application"
-                                + "and ApplicationDescriptor output Parameter Names");
-            	}
+                log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
+                if (jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null) {
+                    throw new GFacHandlerException(
+                            "Empty Output returned from the Application, Double check the application"
+                                    + "and ApplicationDescriptor output Parameter Names");
+                }
             }
-            app.setStandardError(localStdErrFile.getAbsolutePath());
-            app.setStandardOutput(localStdOutFile.getAbsolutePath());
-            app.setOutputDataDirectory(outputDataDir);
+            // FIXME: why we set standard error ouput and outputDirectory again ?
+//            app.setStandardError(localStdErrFile.getAbsolutePath());
+//            app.setStandardOutput(localStdOutFile.getAbsolutePath());
+//            app.setOutputDataDirectory(outputDataDir);
             status.setTransferState(TransferState.DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription(outputDataDir);
             registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
             registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-            
-        }catch (Exception e) {
+
+        } catch (Exception e) {
             try {
                 status.setTransferState(TransferState.FAILED);
                 detail.setTransferStatus(status);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 0527c78..573ddf0 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -51,6 +51,8 @@ import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
 import org.apache.airavata.gsi.ssh.impl.StandardOutReader;
+import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
@@ -86,16 +88,16 @@ public class SSHProvider extends AbstractProvider {
         }
         taskID = jobExecutionContext.getTaskData().getTaskID();
 
-        if (!((SSHHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType()).getHpcResource()) {
-            jobID = "SSH_" + jobExecutionContext.getApplicationContext().getHostDescription().getType().getHostAddress() + "_" + Calendar.getInstance().getTimeInMillis();
+        JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH) {
+            jobID = "SSH_" + jobExecutionContext.getHostName() + "_" + Calendar.getInstance().getTimeInMillis();
             cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
 
-            ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
-            String remoteFile = app.getStaticWorkingDirectory() + File.separatorChar + Constants.EXECUTABLE_NAME;
+            String remoteFile = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
             details.setJobID(taskID);
             details.setJobDescription(remoteFile);
             jobExecutionContext.setJobDetails(details);
-            JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, app, null);
+            JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, null);
             details.setJobDescription(jobDescriptor.toXML());
 
             GFacUtils.saveJobStatus(jobExecutionContext, details, JobState.SETUP);
@@ -114,16 +116,15 @@ public class SSHProvider extends AbstractProvider {
 
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
         if (!hpcType) {
-            ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
             try {
                 /*
                  * Execute
                  */
-                String execuable = app.getStaticWorkingDirectory() + File.separatorChar + Constants.EXECUTABLE_NAME;
-                details.setJobDescription(execuable);
+                String executable = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
+                details.setJobDescription(executable);
 
 //                GFacUtils.updateJobStatus(details, JobState.SUBMITTED);
-                RawCommandInfo rawCommandInfo = new RawCommandInfo("/bin/chmod 755 " + execuable + "; " + execuable);
+                RawCommandInfo rawCommandInfo = new RawCommandInfo("/bin/chmod 755 " + executable + "; " + executable);
 
                 StandardOutReader jobIDReaderCommandOutput = new StandardOutReader();
 
@@ -139,10 +140,6 @@ public class SSHProvider extends AbstractProvider {
         } else {
             try {
                 jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-                HostDescriptionType host = jobExecutionContext.getApplicationContext().
-                        getHostDescription().getType();
-                HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) jobExecutionContext.getApplicationContext().
-                        getApplicationDeploymentDescription().getType();
                 JobDetails jobDetails = new JobDetails();
                 try {
                     Cluster cluster = null;
@@ -155,7 +152,7 @@ public class SSHProvider extends AbstractProvider {
                         log.info("Successfully retrieved the Security Context");
                     }
                     // This installed path is a mandetory field, because this could change based on the computing resource
-                    JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, app, cluster);
+                    JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
                     jobDetails.setJobName(jobDescriptor.getJobName());
                     log.info(jobDescriptor.toXML());
 
@@ -172,14 +169,14 @@ public class SSHProvider extends AbstractProvider {
                     }
                     delegateToMonitorHandlers(jobExecutionContext);
                 } catch (SSHApiException e) {
-                    String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                     log.error(error);
                     jobDetails.setJobID("none");
                     GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
                     GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
                     throw new GFacProviderException(error, e);
                 } catch (Exception e) {
-                    String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                     log.error(error);
                     jobDetails.setJobID("none");
                     GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
@@ -199,8 +196,6 @@ public class SSHProvider extends AbstractProvider {
 
     public void cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
         JobDetails jobDetails = jobExecutionContext.getJobDetails();
-        HostDescriptionType host = jobExecutionContext.getApplicationContext().
-                getHostDescription().getType();
         StringBuffer data = new StringBuffer();
         if (!hpcType) {
             throw new NotImplementedException();
@@ -225,14 +220,14 @@ public class SSHProvider extends AbstractProvider {
                 }
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
             } catch (SSHApiException e) {
-                String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+                String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                 log.error(error);
                 jobDetails.setJobID("none");
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
                 GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
                 throw new GFacProviderException(error, e);
             } catch (Exception e) {
-                String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
+                String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                 log.error(error);
                 jobDetails.setJobID("none");
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
@@ -279,40 +274,28 @@ public class SSHProvider extends AbstractProvider {
         }
     }
     private File createShellScript(JobExecutionContext context) throws IOException {
-        ApplicationDeploymentDescriptionType app = context.getApplicationContext()
-                .getApplicationDeploymentDescription().getType();
-        String uniqueDir = app.getApplicationName().getStringValue() + System.currentTimeMillis()
+        String uniqueDir = jobExecutionContext.getApplicationName() + System.currentTimeMillis()
                 + new Random().nextLong();
 
         File shellScript = File.createTempFile(uniqueDir, "sh");
         OutputStream out = new FileOutputStream(shellScript);
 
         out.write("#!/bin/bash\n".getBytes());
-        out.write(("cd " + app.getStaticWorkingDirectory() + "\n").getBytes());
-        out.write(("export " + Constants.INPUT_DATA_DIR_VAR_NAME + "=" + app.getInputDataDirectory() + "\n").getBytes());
-        out.write(("export " + Constants.OUTPUT_DATA_DIR_VAR_NAME + "=" + app.getOutputDataDirectory() + "\n")
+        out.write(("cd " + jobExecutionContext.getWorkingDir() + "\n").getBytes());
+        out.write(("export " + Constants.INPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getInputDir() + "\n").getBytes());
+        out.write(("export " + Constants.OUTPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getOutputDir() + "\n")
                 .getBytes());
         // get the env of the host and the application
-        NameValuePairType[] env = app.getApplicationEnvironmentArray();
-
-        Map<String, String> nv = new HashMap<String, String>();
-        if (env != null) {
-            for (int i = 0; i < env.length; i++) {
-                String key = env[i].getName();
-                String value = env[i].getValue();
-                nv.put(key, value);
-            }
-        }
-        for (Entry<String, String> entry : nv.entrySet()) {
-            log.debug("Env[" + entry.getKey() + "] = " + entry.getValue());
-            out.write(("export " + entry.getKey() + "=" + entry.getValue() + "\n").getBytes());
-
+        List<SetEnvPaths> envPathList = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getSetEnvironment();
+        for (SetEnvPaths setEnvPaths : envPathList) {
+            log.debug("Env[" + setEnvPaths.getName() + "] = " + setEnvPaths.getValue());
+            out.write(("export " + setEnvPaths.getName() + "=" + setEnvPaths.getValue() + "\n").getBytes());
         }
 
         // prepare the command
         final String SPACE = " ";
         StringBuffer cmd = new StringBuffer();
-        cmd.append(app.getExecutableLocation());
+        cmd.append(jobExecutionContext.getExecutablePath());
         cmd.append(SPACE);
 
         MessageContext input = context.getInMessageContext();
@@ -338,11 +321,11 @@ public class SSHProvider extends AbstractProvider {
         cmd.append(SPACE);
         cmd.append("1>");
         cmd.append(SPACE);
-        cmd.append(app.getStandardOutput());
+        cmd.append(jobExecutionContext.getStandardOutput());
         cmd.append(SPACE);
         cmd.append("2>");
         cmd.append(SPACE);
-        cmd.append(app.getStandardError());
+        cmd.append(jobExecutionContext.getStandardError());
 
         String cmdStr = cmd.toString();
         log.info("Command = " + cmdStr);


[07/44] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata

Posted by ch...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a728bf21
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a728bf21
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a728bf21

Branch: refs/heads/gfac_appcatalog_int
Commit: a728bf2127dfacab50718b4188b7bcc0aa742a2d
Parents: 99e47f1 8b82bee
Author: lahiru <la...@apache.org>
Authored: Thu Oct 30 14:19:22 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Thu Oct 30 14:19:22 2014 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    58 +
 .../java/org/apache/airavata/api/Airavata.java  | 25217 ++++++++++-------
 .../main/resources/lib/airavata/Airavata.cpp    |  4008 ++-
 .../src/main/resources/lib/airavata/Airavata.h  |   612 +
 .../lib/airavata/Airavata_server.skeleton.cpp   |    20 +
 .../resources/lib/Airavata/API/Airavata.php     |  1120 +
 .../airavataAPI.thrift                          |    19 +
 .../appcatalog/cpi/ComputeResource.java         |     7 +
 .../catalog/data/impl/ComputeResourceImpl.java  |    51 +-
 9 files changed, 19622 insertions(+), 11490 deletions(-)
----------------------------------------------------------------------



[29/44] git commit: committing intital gfac app catalog integration

Posted by ch...@apache.org.
committing intital gfac app catalog integration


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8abe8dca
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8abe8dca
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8abe8dca

Branch: refs/heads/gfac_appcatalog_int
Commit: 8abe8dca55f49eeac0ed1416b4565a767922b7a0
Parents: 91f5de5
Author: chathuriw <ka...@gmail.com>
Authored: Tue Oct 28 16:23:38 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:14 2014 -0500

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  |  11 +-
 .../org/apache/airavata/gfac/Scheduler.java     |   5 +-
 .../gfac/core/context/ApplicationContext.java   |  44 +--
 .../gfac/core/context/JobExecutionContext.java  |  47 +++
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 292 +++----------------
 .../core/handler/AppDescriptorCheckHandler.java |  61 ++--
 .../gfac/core/provider/utils/ProviderUtils.java |  18 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |  16 +
 8 files changed, 160 insertions(+), 334 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 2845bc6..a96cba7 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -53,7 +53,7 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_GATEWAY = "default.registry.gateway";
     private static Airavata.Client airavataClient;
 
-    private static String echoAppId = "Echo_6281480a-9887-4a0f-8311-59bbaf738e54";
+    private static String echoAppId = "Echo_b6782be4-315b-4cbd-9403-aa7ce564548a";
     private static String wrfAppId = "WRF_5f097c9c-7066-49ec-aed7-4e39607b3adc";
     private static String amberAppId = "Amber_89906be6-5678-49a6-9d04-a0604fbdef2e";
 
@@ -70,7 +70,7 @@ public class CreateLaunchExperiment {
     public static void main(String[] args) throws Exception {
                 airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
                 System.out.println("API version is " + airavataClient.getAPIVersion());
-                registerApplications(); // run this only the first time
+//                registerApplications(); // run this only the first time
                 createAndLaunchExp();
     }
     
@@ -79,12 +79,13 @@ public class CreateLaunchExperiment {
     
     
     public static void createAndLaunchExp() throws TException {
-    	final String expId = createEchoExperimentForFSD(airavataClient);
+//    	final String expId = createEchoExperimentForFSD(airavataClient);
     	try {
-        for (int i = 0; i < 2; i++) {
+        for (int i = 0; i < 1; i++) {
 //    final String expId = createExperimentForSSHHost(airavata);
 //            final String expId = createEchoExperimentForFSD(airavataClient);
 //    final String expId = createEchoExperimentForStampede(airavataClient);
+    final String expId = createEchoExperimentForTrestles(airavataClient);
 //    final String expId = createExperimentEchoForLocalHost(airavataClient);
 //    final String expId = createExperimentWRFTrestles(airavataClient);
 //    final String expId = createExperimentForBR2(airavataClient);
@@ -93,7 +94,7 @@ public class CreateLaunchExperiment {
 //    final String expId = createExperimentForStampedeAmber(airavataClient);
 //    final String expId = createExperimentForTrestlesAmber(airavataClient);
 
-//    System.out.println("Experiment ID : " + expId);
+    System.out.println("Experiment ID : " + expId);
 //    updateExperiment(airavata, expId);
             launchExperiment(airavataClient, expId);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 1b8efe0..9b70fae 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -39,6 +39,7 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderConfig;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
@@ -75,7 +76,7 @@ public class Scheduler {
      * @return GFacProvider instance.
      */
     private static GFacProvider getProvider(JobExecutionContext jobExecutionContext) throws GFacException {
-        HostDescription hostDescription = jobExecutionContext.getApplicationContext().getHostDescription();
+        ComputeResourceDescription hostDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
         String applicationName = jobExecutionContext.getServiceName();
 
         URL resource = Scheduler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
@@ -111,6 +112,8 @@ public class Scheduler {
             }
             // We give higher preference to applications specific provider if configured
             if (provider == null) {
+
+                jobExecutionContext.getApplicationContext().getComputeResourcePreference().getPreferredJobSubmissionProtocol()
                 String hostClass = hostDescription.getType().getClass().getName();
                 providerClassName = GFacConfiguration.getAttributeValue(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_ON_HOST + hostClass + "']", Constants.GFAC_CONFIG_CLASS_ATTRIBUTE);
                 Class<? extends GFacProvider> aClass1 = Class.forName(providerClassName).asSubclass(GFacProvider.class);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ApplicationContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ApplicationContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ApplicationContext.java
index 4083f29..29197be 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ApplicationContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ApplicationContext.java
@@ -21,37 +21,47 @@
 
 package org.apache.airavata.gfac.core.context;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
 
 public class ApplicationContext extends AbstractContext {
+    private ApplicationDeploymentDescription applicationDeploymentDescription;
+    private ComputeResourceDescription computeResourceDescription;
+    private ApplicationInterfaceDescription applicationInterfaceDescription;
+    private ComputeResourcePreference computeResourcePreference;
 
-    private ApplicationDescription applicationDeploymentDescription;
-    private ServiceDescription serviceDescription;
-    private HostDescription hostDescription;
-
-    public ApplicationDescription getApplicationDeploymentDescription() {
+    public ApplicationDeploymentDescription getApplicationDeploymentDescription() {
         return applicationDeploymentDescription;
     }
 
-    public <T extends ApplicationDescription> void setApplicationDeploymentDescription(T applicationDeploymentDescription) {
+    public void setApplicationDeploymentDescription(ApplicationDeploymentDescription applicationDeploymentDescription) {
         this.applicationDeploymentDescription = applicationDeploymentDescription;
     }
 
-    public <T extends ServiceDescription> void setServiceDescription(T serviceDescription) {
-        this.serviceDescription = serviceDescription;
+    public ComputeResourceDescription getComputeResourceDescription() {
+        return computeResourceDescription;
+    }
+
+    public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
+        this.computeResourceDescription = computeResourceDescription;
+    }
+
+    public ApplicationInterfaceDescription getApplicationInterfaceDescription() {
+        return applicationInterfaceDescription;
     }
 
-    public <T extends HostDescription> void setHostDescription(T hostDescription) {
-        this.hostDescription = hostDescription;
+    public void setApplicationInterfaceDescription(ApplicationInterfaceDescription applicationInterfaceDescription) {
+        this.applicationInterfaceDescription = applicationInterfaceDescription;
     }
 
-    public ServiceDescription getServiceDescription() {
-        return serviceDescription;
+    public ComputeResourcePreference getComputeResourcePreference() {
+        return computeResourcePreference;
     }
 
-    public HostDescription getHostDescription() {
-        return hostDescription;
+    public void setComputeResourcePreference(ComputeResourcePreference computeResourcePreference) {
+        this.computeResourcePreference = computeResourcePreference;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 2f94ec5..da716c5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -66,6 +66,13 @@ public class JobExecutionContext extends AbstractContext implements Serializable
 
     private String credentialStoreToken;
 
+    private String workingDir;
+
+    private String inputDir;
+    private String outputDir;
+    private String standaredOutput;
+    private String standaredError;
+
 //    private ContextHeaderDocument.ContextHeader contextHeader;
 
     // Keep track of the current path of the message. Before hitting provider its in-path.
@@ -317,4 +324,44 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     public void setCredentialStoreToken(String credentialStoreToken) {
         this.credentialStoreToken = credentialStoreToken;
     }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public String getInputDir() {
+        return inputDir;
+    }
+
+    public void setInputDir(String inputDir) {
+        this.inputDir = inputDir;
+    }
+
+    public String getOutputDir() {
+        return outputDir;
+    }
+
+    public void setOutputDir(String outputDir) {
+        this.outputDir = outputDir;
+    }
+
+    public String getStandaredOutput() {
+        return standaredOutput;
+    }
+
+    public void setStandaredOutput(String standaredOutput) {
+        this.standaredOutput = standaredOutput;
+    }
+
+    public String getStandaredError() {
+        return standaredError;
+    }
+
+    public void setStandaredError(String standaredError) {
+        this.standaredError = standaredError;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/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 ca7620d..16c49e6 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
@@ -19,14 +19,7 @@
  *
 */
 package org.apache.airavata.gfac.core.cpi;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
+
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.AiravataException;
@@ -35,9 +28,6 @@ import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacConfiguration;
 import org.apache.airavata.gfac.GFacException;
@@ -57,45 +47,16 @@ import org.apache.airavata.gfac.core.provider.GFacRecoverableProvider;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
-
 import org.apache.airavata.messaging.core.Publisher;
-
 import org.apache.airavata.messaging.core.PublisherFactory;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
-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.JobManagerCommand;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
-
-import org.apache.airavata.model.appcatalog.computeresource.*;
-
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.messaging.event.*;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.airavata.schemas.gfac.*;
-import org.apache.airavata.schemas.gfac.DataType;
-
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.apache.airavata.schemas.gfac.HostDescriptionType;
-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.airavata.schemas.gfac.ServiceDescriptionType;
-import org.apache.airavata.schemas.gfac.UnicoreHostType;
 import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
@@ -111,8 +72,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
-//import org.apache.airavata.api.server.listener.ExperimentStatusChangedEvent;
-
 /**
  * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
  * the resource, required data for the job has to be stored in registry prior to invoke this object.
@@ -123,13 +82,8 @@ public class BetterGfacImpl implements GFac,Watcher {
 
     private Registry registry;
 
-//    private AiravataAPI airavataAPI;
-
-//    private AiravataRegistry2 airavataRegistry2;
-
-    private ZooKeeper zk;                       // we are not storing zk instance in to jobExecution context
-
-    private static Integer mutex = new Integer(-1);
+    // we are not storing zk instance in to jobExecution context
+    private ZooKeeper zk;
 
     private static List<ThreadedHandler> daemonHandlers = new ArrayList<ThreadedHandler>();
 
@@ -150,8 +104,6 @@ public class BetterGfacImpl implements GFac,Watcher {
     public BetterGfacImpl(Registry registry, ZooKeeper zooKeeper,
                           MonitorPublisher publisher) {
         this.registry = registry;
-//        this.airavataAPI = airavataAPI;
-//        this.airavataRegistry2 = airavataRegistry2;
         monitorPublisher = publisher;     // This is a EventBus common for gfac
         this.zk = zooKeeper;
     }
@@ -186,10 +138,20 @@ public class BetterGfacImpl implements GFac,Watcher {
 
     public static void startDaemonHandlers() {
         List<GFacHandlerConfig> daemonHandlerConfig = null;
-        URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        gfacConfigFile = new File(resource.getPath());
+        String className = null;
         try {
+            URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+            if (resource != null) {
+                gfacConfigFile = new File(resource.getPath());
+            }
             daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
+            for (GFacHandlerConfig handlerConfig : daemonHandlerConfig) {
+                className = handlerConfig.getClassName();
+                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
+                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
+                threadedHandler.initProperties(handlerConfig.getProperties());
+                daemonHandlers.add(threadedHandler);
+            }
         } catch (ParserConfigurationException e) {
             log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
         } catch (IOException e) {
@@ -198,29 +160,18 @@ public class BetterGfacImpl implements GFac,Watcher {
             log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
         } catch (XPathExpressionException e) {
             log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-        }
-
-        for (GFacHandlerConfig handlerConfig : daemonHandlerConfig) {
-            String className = handlerConfig.getClassName();
-            try {
-                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
-                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
-                threadedHandler.initProperties(handlerConfig.getProperties());
-                daemonHandlers.add(threadedHandler);
-            } catch (ClassNotFoundException e) {
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (InstantiationException e) {
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (IllegalAccessException e) {
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (GFacHandlerException e) {
-                log.error("Error initializing the handler " + className);
-            } catch (GFacException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            }
+        } catch (ClassNotFoundException e) {
+            log.error("Error initializing the handler: " + className);
+            log.error(className + " class has to implement " + ThreadedHandler.class);
+        } catch (InstantiationException e) {
+            log.error("Error initializing the handler: " + className);
+            log.error(className + " class has to implement " + ThreadedHandler.class);
+        } catch (GFacHandlerException e) {
+            log.error("Error initializing the handler: " + className);
+            log.error(className + " class has to implement " + ThreadedHandler.class);
+        } catch (IllegalAccessException e) {
+            log.error("Error initializing the handler: " + className);
+            log.error(className + " class has to implement " + ThreadedHandler.class);
         }
         for (ThreadedHandler tHandler : daemonHandlers) {
             (new Thread(tHandler)).start();
@@ -306,173 +257,6 @@ public class BetterGfacImpl implements GFac,Watcher {
                 }
             }
         }
-        //Create the legacy schema docs to fill-in
-        ServiceDescription legacyServiceDescription = new ServiceDescription();
-        ServiceDescriptionType legacyServiceDescType = legacyServiceDescription.getType();
-        ApplicationDescription legacyAppDescription = null;
-        HostDescription legacyHostDescription = null;
-
-        ///////////////SERVICE DESCRIPTOR///////////////////////////////
-        //Fetch the application inputs and outputs from the app interface and create the legacy service description.
-        legacyServiceDescType.setName(applicationInterface.getApplicationName());
-        legacyServiceDescType.setDescription(applicationInterface.getApplicationName());
-        List<InputParameterType> legacyInputParameters = new ArrayList<InputParameterType>();
-        List<OutputParameterType> legacyOutputParameters = new ArrayList<OutputParameterType>();
-        List<InputDataObjectType> applicationInputs = applicationInterface.getApplicationInputs();
-        for (InputDataObjectType dataObjectType : applicationInputs) {
-            InputParameterType parameter = InputParameterType.Factory.newInstance();
-            parameter.setParameterName(dataObjectType.getName());
-            parameter.setParameterDescription(dataObjectType.getUserFriendlyDescription());
-            ParameterType parameterType = parameter.addNewParameterType();
-            switch (dataObjectType.getType()) {
-                case FLOAT:
-                    parameterType.setType(DataType.FLOAT);
-                    break;
-                case INTEGER:
-                    parameterType.setType(DataType.INTEGER);
-                    break;
-                case STRING:
-                    parameterType.setType(DataType.STRING);
-                    break;
-                case URI:
-                    parameterType.setType(DataType.URI);
-                    break;
-            }
-            parameterType.setName(parameterType.getType().toString());
-            parameter.addParameterValue(dataObjectType.getValue());
-            legacyInputParameters.add(parameter);
-        }
-
-        List<OutputDataObjectType> applicationOutputs = applicationInterface.getApplicationOutputs();
-        for (OutputDataObjectType dataObjectType : applicationOutputs) {
-            OutputParameterType parameter = OutputParameterType.Factory.newInstance();
-            parameter.setParameterName(dataObjectType.getName());
-            parameter.setParameterDescription(dataObjectType.getName());
-            ParameterType parameterType = parameter.addNewParameterType();
-            switch (dataObjectType.getType()) {
-                case FLOAT:
-                    parameterType.setType(DataType.FLOAT);
-                    break;
-                case INTEGER:
-                    parameterType.setType(DataType.INTEGER);
-                    break;
-                case STRING:
-                    parameterType.setType(DataType.STRING);
-                    break;
-                case URI:
-                    parameterType.setType(DataType.URI);
-                    break;
-            }
-            parameterType.setName(parameterType.getType().toString());
-            legacyOutputParameters.add(parameter);
-        }
-
-        legacyServiceDescType.setInputParametersArray(legacyInputParameters.toArray(new InputParameterType[]{}));
-        legacyServiceDescType.setOutputParametersArray(legacyOutputParameters.toArray(new OutputParameterType[]{}));
-
-        ////////////////////-----------  HOST DESCRIPTOR  -----------------//////////////////////
-        //Fetch the host description details and fill-in legacy doc
-        ResourceJobManager resourceJobManager = null;
-        for (JobSubmissionInterface jobSubmissionInterface : computeResource.getJobSubmissionInterfaces()) {
-            switch (jobSubmissionInterface.getJobSubmissionProtocol()) {
-                case LOCAL:
-                    legacyHostDescription = new HostDescription();
-                    LOCALSubmission localSubmission =
-                            appCatalog.getComputeResource().getLocalJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-                    resourceJobManager = localSubmission.getResourceJobManager();
-                    break;
-                case SSH:
-                    SSHJobSubmission sshJobSubmission =
-                            appCatalog.getComputeResource().getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-                    resourceJobManager = sshJobSubmission.getResourceJobManager();
-                    switch (sshJobSubmission.getSecurityProtocol()) {
-                        case GSI:
-                            legacyHostDescription = new HostDescription(GsisshHostType.type);
-                            ((GsisshHostType) legacyHostDescription.getType()).setJobManager
-                                    (resourceJobManager.getResourceJobManagerType().name());
-                            ((GsisshHostType) legacyHostDescription.getType()).setInstalledPath(resourceJobManager.getJobManagerBinPath());
-                            // applicationDescription.setInstalledParentPath(resourceJobManager.getJobManagerBinPath());
-                            ((GsisshHostType) legacyHostDescription.getType()).setPort(sshJobSubmission.getSshPort());
-                            break;
-                        case SSH_KEYS:
-                            legacyHostDescription = new HostDescription(SSHHostType.type);
-                            ((SSHHostType) legacyHostDescription.getType()).setHpcResource(true);
-                            break;
-                        default:
-                            legacyHostDescription = new HostDescription(SSHHostType.type);
-                            ((SSHHostType) legacyHostDescription.getType()).setHpcResource(true);
-                            break;
-                    }
-                    break;
-                case UNICORE:
-                	UnicoreJobSubmission ucrSubmission = appCatalog.getComputeResource().getUNICOREJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-                	String unicoreEndpoint = ucrSubmission.getUnicoreEndPointURL();
-                	legacyHostDescription = new HostDescription(UnicoreHostType.type);
-                	((UnicoreHostType) legacyHostDescription.getType()).setUnicoreBESEndPointArray(new String[]{unicoreEndpoint});
-                	break;
-                default:
-                    break;
-            }
-        }
-        HostDescriptionType legacyHostDescType = legacyHostDescription.getType();
-        legacyHostDescType.setHostName(computeResource.getHostName());
-        String ipAddress = computeResource.getHostName();
-        if (computeResource.getIpAddresses() != null && computeResource.getIpAddresses().size() > 0) {
-            ipAddress = computeResource.getIpAddresses().iterator().next();
-        } else if (computeResource.getHostAliases() != null && computeResource.getHostAliases().size() > 0) {
-            ipAddress = computeResource.getHostAliases().iterator().next();
-        }
-        legacyHostDescType.setHostAddress(ipAddress);
-
-        /////////////////////---------------- APPLICATION DESCRIPTOR ---------------------/////////////////////////
-        //Fetch deployment information and fill-in legacy doc
-        if ((legacyHostDescType instanceof GsisshHostType) 
-        		|| (legacyHostDescType instanceof SSHHostType) 
-        		|| (legacyHostDescType instanceof UnicoreHostType)) {
-            legacyAppDescription = new ApplicationDescription(HpcApplicationDeploymentType.type);
-            HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescription.getType();
-            switch (applicationDeployment.getParallelism()) {
-                case SERIAL:
-                    legacyHPCAppDescType.setJobType(JobTypeType.SERIAL);
-                    break;
-                case MPI:
-                    legacyHPCAppDescType.setJobType(JobTypeType.MPI);
-                    break;
-                case OPENMP:
-                    legacyHPCAppDescType.setJobType(JobTypeType.OPEN_MP);
-                    break;
-                default:
-                    break;
-            }
-            //Fetch scheduling information from experiment request
-            ComputationalResourceScheduling taskSchedule = taskData.getTaskScheduling();
-            QueueType queueType = legacyHPCAppDescType.addNewQueue();
-            queueType.setQueueName(taskSchedule.getQueueName());
-            legacyHPCAppDescType.setCpuCount(taskSchedule.getTotalCPUCount());
-            legacyHPCAppDescType.setNodeCount(taskSchedule.getNodeCount());
-            legacyHPCAppDescType.setMaxWallTime(taskSchedule.getWallTimeLimit());
-            if (resourceJobManager != null) {
-                legacyHPCAppDescType.setInstalledParentPath(resourceJobManager.getJobManagerBinPath());
-                if (resourceJobManager.getJobManagerCommands() != null) {
-                    legacyHPCAppDescType.setJobSubmitterCommand(resourceJobManager.getJobManagerCommands().get(JobManagerCommand.SUBMISSION));
-                }
-            }
-            ProjectAccountType projectAccountType = legacyHPCAppDescType.addNewProjectAccount();
-            if (gatewayResourcePreferences != null) {
-                projectAccountType.setProjectAccountNumber(gatewayResourcePreferences.getAllocationProjectNumber());
-            }
-        } else {
-            legacyAppDescription = new ApplicationDescription();
-        }
-        ApplicationDeploymentDescriptionType legacyAppDescType = legacyAppDescription.getType();
-        legacyAppDescType.addNewApplicationName().setStringValue(applicationInterface.getApplicationName().replaceAll(" ", "_"));
-        legacyAppDescType.setExecutableLocation(applicationDeployment.getExecutablePath());
-        if (gatewayResourcePreferences != null) {
-            legacyAppDescType.setScratchWorkingDirectory(gatewayResourcePreferences.getScratchLocation());
-        } else {
-            legacyAppDescType.setScratchWorkingDirectory("/tmp");
-            log.warn("Missing gateway resource profile for gateway id '" + gatewayID + "'.");
-        }
 
         URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         Properties configurationProperties = ServerSettings.getProperties();
@@ -498,19 +282,17 @@ public class BetterGfacImpl implements GFac,Watcher {
         jobExecutionContext.setRegistry(registry);
 
         ApplicationContext applicationContext = new ApplicationContext();
-//        applicationContext.setApplicationDeploymentDescription(applicationDescription);
-        applicationContext.setHostDescription(legacyHostDescription);
-        applicationContext.setServiceDescription(legacyServiceDescription);
-        applicationContext.setApplicationDeploymentDescription(legacyAppDescription);
+        applicationContext.setComputeResourceDescription(computeResource);
+        applicationContext.setApplicationDeploymentDescription(applicationDeployment);
+        applicationContext.setApplicationInterfaceDescription(applicationInterface);
+        applicationContext.setComputeResourcePreference(gatewayResourcePreferences);
         jobExecutionContext.setApplicationContext(applicationContext);
 
         List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
-        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
-                legacyServiceDescType.getInputParametersArray())));
+        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs)));
 
         List<DataObjectType> outputData = taskData.getApplicationOutputs();
-        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getOutMessageContext(outputData,
-                legacyServiceDescType.getOutputParametersArray())));
+        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getOutMessageContext(outputData)));
 
         jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
         jobExecutionContext.setGfac(this);
@@ -1178,14 +960,6 @@ public class BetterGfacImpl implements GFac,Watcher {
         BetterGfacImpl.monitorPublisher = monitorPublisher;
     }
 
-//    public AiravataAPI getAiravataAPI() {
-//        return airavataAPI;
-//    }
-
-//    public AiravataRegistry2 getAiravataRegistry2() {
-//        return airavataRegistry2;
-//    }
-
     public static List<ThreadedHandler> getDaemonHandlers() {
         return daemonHandlers;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
index 33c32d3..676a15a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
@@ -20,12 +20,12 @@
 */
 package org.apache.airavata.gfac.core.handler;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,47 +43,34 @@ public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
             logger.info("Error saving plugin status to ZK");
         }
         StringBuffer data = new StringBuffer();
-        ApplicationDescription app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        ApplicationDeploymentDescriptionType appDesc = app.getType();
+        ApplicationInterfaceDescription appInterface = jobExecutionContext.getApplicationContext().getApplicationInterfaceDescription();
+        ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
 
-        if (appDesc.getScratchWorkingDirectory() == null) {
-            appDesc.setScratchWorkingDirectory("/tmp");
+        if (computeResourcePreference.getScratchLocation() == null) {
+            computeResourcePreference.setScratchLocation("/tmp");
         }
         /*
         * Working dir
         */
-        if (appDesc.getStaticWorkingDirectory() == null || "null".equals(appDesc.getStaticWorkingDirectory())) {
-            String tmpDir = appDesc.getScratchWorkingDirectory() + File.separator
-                    + jobExecutionContext.getExperimentID();
 
-            appDesc.setStaticWorkingDirectory(tmpDir);
-        }
-        data.append(appDesc.getScratchWorkingDirectory());
-        data.append(",").append(appDesc.getStaticWorkingDirectory());
-        //FIXME: Move this input/output to application descrpitor
+        String workingDir = computeResourcePreference.getScratchLocation() + File.separator+ jobExecutionContext.getExperimentID();
+        jobExecutionContext.setWorkingDir(workingDir);
+        data.append(computeResourcePreference.getScratchLocation());
+        data.append(",").append(jobExecutionContext.getWorkingDir());
+
         /*
         * Input and Output Directory
         */
-        if (appDesc.getInputDataDirectory() == null || "".equals(appDesc.getInputDataDirectory())) {
-            appDesc.setInputDataDirectory(appDesc.getStaticWorkingDirectory() + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
-        }
-        if (appDesc.getOutputDataDirectory() == null || "".equals(appDesc.getOutputDataDirectory())) {
-            appDesc.setOutputDataDirectory(appDesc.getStaticWorkingDirectory() + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
-        }
+        jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME );
+        jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
+        data.append(",").append(jobExecutionContext.getInputDir()).append(",").append(jobExecutionContext.getOutputDir());
 
-        data.append(",").append(appDesc.getInputDataDirectory()).append(",").append(appDesc.getOutputDataDirectory());
         /*
         * Stdout and Stderr for Shell
         */
-        if (appDesc.getStandardOutput() == null || "".equals(appDesc.getStandardOutput())) {
-            appDesc.setStandardOutput(appDesc.getStaticWorkingDirectory() + File.separator
-                    + appDesc.getApplicationName().getStringValue().replaceAll("\\s+","") + ".stdout");
-        }
-        if (appDesc.getStandardError() == null || "".equals(appDesc.getStandardError())) {
-            appDesc.setStandardError(appDesc.getStaticWorkingDirectory() + File.separator
-                    + appDesc.getApplicationName().getStringValue().replaceAll("\\s+","") + ".stderr");
-        }
-        data.append(",").append(appDesc.getStandardOutput()).append(",").append(appDesc.getStandardError());
+        jobExecutionContext.setStandaredOutput(workingDir + File.separator + appInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
+        jobExecutionContext.setStandaredError(workingDir + File.separator + appInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+        data.append(",").append(jobExecutionContext.getStandaredOutput()).append(",").append(jobExecutionContext.getStandaredError());
 
 
         logger.info("Recoverable data is saving to zk: " + data.toString());
@@ -97,17 +84,15 @@ public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
     }
 
     public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        ApplicationDescription app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        ApplicationDeploymentDescriptionType appDesc = app.getType();
         try {
             String s = GFacUtils.getPluginData(jobExecutionContext, this.getClass().getName());
             String[] split = s.split(",");                   // this is ugly code but nobody else is saving or reading this data, so this is the fastest way
-            appDesc.setScratchWorkingDirectory(split[0]);
-            appDesc.setStaticWorkingDirectory(split[1]);
-            appDesc.setInputDataDirectory(split[2]);
-            appDesc.setOutputDataDirectory(split[3]);
-            appDesc.setStandardOutput(split[4]);
-            appDesc.setStandardError(split[5]);
+            jobExecutionContext.getApplicationContext().getComputeResourcePreference().setScratchLocation(split[0]);
+            jobExecutionContext.setWorkingDir(split[1]);
+            jobExecutionContext.setInputDir(split[2]);
+            jobExecutionContext.setOutputDir(split[3]);
+            jobExecutionContext.setStandaredOutput(split[4]);
+            jobExecutionContext.setStandaredError(split[5]);
         } catch (Exception e) {
             throw new GFacHandlerException(e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
index c98da92..dc8eb1c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
@@ -21,33 +21,23 @@
 
 package org.apache.airavata.gfac.core.provider.utils;
 
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.MappingFactory;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.schemas.gfac.InputParameterType;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 public class ProviderUtils {
 
     public static List<String> getInputParameters(JobExecutionContext jobExecutionContext) throws GFacProviderException {
         List<String> parameters = new ArrayList<String>();
         MessageContext inMessageContext = jobExecutionContext.getInMessageContext();
-        InputParameterType[] inputParamDefinitionArray = jobExecutionContext.getApplicationContext().
-                getServiceDescription().getType().getInputParametersArray();
-        for (InputParameterType inputParam : inputParamDefinitionArray) {
-            String parameterName = inputParam.getParameterName();
-            ActualParameter parameter = (ActualParameter)inMessageContext.getParameter(parameterName);
-            if(parameter == null){
-                throw new GFacProviderException("Cannot find required input parameter " + parameterName + ".");
-            }
-
-            parameters.add(MappingFactory.toString(parameter));
+        Map<String, Object> inputs = inMessageContext.getParameters();
+        for (String inputParam : inputs.keySet()) {
+            parameters.add(inputParam);
         }
-
         return parameters;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8abe8dca/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index eef44a4..ce74e4e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -819,6 +819,14 @@ public class GFacUtils {
 		return stringObjectHashMap;
 	}
 
+    public static Map<String, Object> getInMessageContext(List<DataObjectType> experimentData) throws GFacException {
+        Map<String, Object> map = new HashMap<String, Object>();
+        for (DataObjectType objectType : experimentData) {
+            map.put(objectType.getKey(), objectType);
+        }
+        return map;
+    }
+
 	public static Map<String, Object> getOutMessageContext(
 			List<DataObjectType> experimentData, Parameter[] parameters)
 			throws GFacException {
@@ -854,6 +862,14 @@ public class GFacUtils {
 		return stringObjectHashMap;
 	}
 
+    public static Map<String, Object> getOutMessageContext(List<DataObjectType> experimentData) throws GFacException {
+        Map<String, Object> map = new HashMap<String, Object>();
+        for (DataObjectType objectType : experimentData) {
+            map.put(objectType.getKey(), objectType);
+        }
+        return map;
+    }
+
 	public static GfacExperimentState getZKExperimentState(ZooKeeper zk,
 			JobExecutionContext jobExecutionContext)
 			throws ApplicationSettingsException, KeeperException,


[21/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
index 720286c..5261d94 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Workflow.php
@@ -579,14 +579,14 @@ class Workflow_getAllWorkflows_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size180 = 0;
-            $_etype183 = 0;
-            $xfer += $input->readListBegin($_etype183, $_size180);
-            for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
+            $_size187 = 0;
+            $_etype190 = 0;
+            $xfer += $input->readListBegin($_etype190, $_size187);
+            for ($_i191 = 0; $_i191 < $_size187; ++$_i191)
             {
-              $elem185 = null;
-              $xfer += $input->readString($elem185);
-              $this->success []= $elem185;
+              $elem192 = null;
+              $xfer += $input->readString($elem192);
+              $this->success []= $elem192;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -638,9 +638,9 @@ class Workflow_getAllWorkflows_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter186)
+          foreach ($this->success as $iter193)
           {
-            $xfer += $output->writeString($iter186);
+            $xfer += $output->writeString($iter193);
           }
         }
         $output->writeListEnd();

http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 6006adb..59b3e7b 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -573,6 +573,12 @@ service Airavata {
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
 
+
+  list<applicationDeploymentModel.ApplicationModule> getAllModules ()
+        throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
   /**
    * Delete a Application Module.
    *
@@ -1566,44 +1572,41 @@ service Airavata {
             2: airavataErrors.AiravataClientException ace,
             3: airavataErrors.AiravataSystemException ase)
 
- //End of API
- }
- // Workflow API
- service Workflow {
-
   list<string> getAllWorkflows()
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
+
+  workflowDataModel.Workflow getWorkflow (1: required string workflowTemplateId)
         throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
-  
-  workflowDataModel.Workflow getWorkflow (1: required string workflowTemplateId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
 
   void deleteWorkflow (1: required string workflowTemplateId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  string registerWorkflow(1: required workflowDataModel.Workflow workflow)
         throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
 
+  string registerWorkflow(1: required workflowDataModel.Workflow workflow)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
+
   void updateWorkflow (1: required string workflowTemplateId, 2: required workflowDataModel.Workflow workflow)
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
 
   string getWorkflowTemplateId (1: required string workflowName)
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
 
   bool isWorkflowExistWithName(1: required string workflowName)
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
+
+ //End of API
  }
 


[24/44] adding workflow related changes back to airavata api

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ede66edf/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index e1c3da2..063c4c6 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -7747,6 +7747,239 @@ uint32_t Airavata_updateApplicationModule_presult::read(::apache::thrift::protoc
   return xfer;
 }
 
+uint32_t Airavata_getAllModules_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    xfer += iprot->skip(ftype);
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getAllModules_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllModules_args");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllModules_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllModules_pargs");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllModules_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size159;
+            ::apache::thrift::protocol::TType _etype162;
+            xfer += iprot->readListBegin(_etype162, _size159);
+            this->success.resize(_size159);
+            uint32_t _i163;
+            for (_i163 = 0; _i163 < _size159; ++_i163)
+            {
+              xfer += this->success[_i163].read(iprot);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getAllModules_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getAllModules_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
+      std::vector< ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule> ::const_iterator _iter164;
+      for (_iter164 = this->success.begin(); _iter164 != this->success.end(); ++_iter164)
+      {
+        xfer += (*_iter164).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllModules_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size165;
+            ::apache::thrift::protocol::TType _etype168;
+            xfer += iprot->readListBegin(_etype168, _size165);
+            (*(this->success)).resize(_size165);
+            uint32_t _i169;
+            for (_i169 = 0; _i169 < _size165; ++_i169)
+            {
+              xfer += (*(this->success))[_i169].read(iprot);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
 uint32_t Airavata_deleteApplicationModule_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
@@ -8984,14 +9217,14 @@ uint32_t Airavata_getAppModuleDeployedResources_result::read(::apache::thrift::p
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size159;
-            ::apache::thrift::protocol::TType _etype162;
-            xfer += iprot->readListBegin(_etype162, _size159);
-            this->success.resize(_size159);
-            uint32_t _i163;
-            for (_i163 = 0; _i163 < _size159; ++_i163)
+            uint32_t _size170;
+            ::apache::thrift::protocol::TType _etype173;
+            xfer += iprot->readListBegin(_etype173, _size170);
+            this->success.resize(_size170);
+            uint32_t _i174;
+            for (_i174 = 0; _i174 < _size170; ++_i174)
             {
-              xfer += iprot->readString(this->success[_i163]);
+              xfer += iprot->readString(this->success[_i174]);
             }
             xfer += iprot->readListEnd();
           }
@@ -9046,10 +9279,10 @@ uint32_t Airavata_getAppModuleDeployedResources_result::write(::apache::thrift::
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::vector<std::string> ::const_iterator _iter164;
-      for (_iter164 = this->success.begin(); _iter164 != this->success.end(); ++_iter164)
+      std::vector<std::string> ::const_iterator _iter175;
+      for (_iter175 = this->success.begin(); _iter175 != this->success.end(); ++_iter175)
       {
-        xfer += oprot->writeString((*_iter164));
+        xfer += oprot->writeString((*_iter175));
       }
       xfer += oprot->writeListEnd();
     }
@@ -9096,14 +9329,14 @@ uint32_t Airavata_getAppModuleDeployedResources_presult::read(::apache::thrift::
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size165;
-            ::apache::thrift::protocol::TType _etype168;
-            xfer += iprot->readListBegin(_etype168, _size165);
-            (*(this->success)).resize(_size165);
-            uint32_t _i169;
-            for (_i169 = 0; _i169 < _size165; ++_i169)
+            uint32_t _size176;
+            ::apache::thrift::protocol::TType _etype179;
+            xfer += iprot->readListBegin(_etype179, _size176);
+            (*(this->success)).resize(_size176);
+            uint32_t _i180;
+            for (_i180 = 0; _i180 < _size176; ++_i180)
             {
-              xfer += iprot->readString((*(this->success))[_i169]);
+              xfer += iprot->readString((*(this->success))[_i180]);
             }
             xfer += iprot->readListEnd();
           }
@@ -10136,17 +10369,17 @@ uint32_t Airavata_getAllApplicationInterfaceNames_result::read(::apache::thrift:
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->success.clear();
-            uint32_t _size170;
-            ::apache::thrift::protocol::TType _ktype171;
-            ::apache::thrift::protocol::TType _vtype172;
-            xfer += iprot->readMapBegin(_ktype171, _vtype172, _size170);
-            uint32_t _i174;
-            for (_i174 = 0; _i174 < _size170; ++_i174)
+            uint32_t _size181;
+            ::apache::thrift::protocol::TType _ktype182;
+            ::apache::thrift::protocol::TType _vtype183;
+            xfer += iprot->readMapBegin(_ktype182, _vtype183, _size181);
+            uint32_t _i185;
+            for (_i185 = 0; _i185 < _size181; ++_i185)
             {
-              std::string _key175;
-              xfer += iprot->readString(_key175);
-              std::string& _val176 = this->success[_key175];
-              xfer += iprot->readString(_val176);
+              std::string _key186;
+              xfer += iprot->readString(_key186);
+              std::string& _val187 = this->success[_key186];
+              xfer += iprot->readString(_val187);
             }
             xfer += iprot->readMapEnd();
           }
@@ -10201,11 +10434,11 @@ uint32_t Airavata_getAllApplicationInterfaceNames_result::write(::apache::thrift
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::map<std::string, std::string> ::const_iterator _iter177;
-      for (_iter177 = this->success.begin(); _iter177 != this->success.end(); ++_iter177)
+      std::map<std::string, std::string> ::const_iterator _iter188;
+      for (_iter188 = this->success.begin(); _iter188 != this->success.end(); ++_iter188)
       {
-        xfer += oprot->writeString(_iter177->first);
-        xfer += oprot->writeString(_iter177->second);
+        xfer += oprot->writeString(_iter188->first);
+        xfer += oprot->writeString(_iter188->second);
       }
       xfer += oprot->writeMapEnd();
     }
@@ -10252,17 +10485,17 @@ uint32_t Airavata_getAllApplicationInterfaceNames_presult::read(::apache::thrift
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             (*(this->success)).clear();
-            uint32_t _size178;
-            ::apache::thrift::protocol::TType _ktype179;
-            ::apache::thrift::protocol::TType _vtype180;
-            xfer += iprot->readMapBegin(_ktype179, _vtype180, _size178);
-            uint32_t _i182;
-            for (_i182 = 0; _i182 < _size178; ++_i182)
+            uint32_t _size189;
+            ::apache::thrift::protocol::TType _ktype190;
+            ::apache::thrift::protocol::TType _vtype191;
+            xfer += iprot->readMapBegin(_ktype190, _vtype191, _size189);
+            uint32_t _i193;
+            for (_i193 = 0; _i193 < _size189; ++_i193)
             {
-              std::string _key183;
-              xfer += iprot->readString(_key183);
-              std::string& _val184 = (*(this->success))[_key183];
-              xfer += iprot->readString(_val184);
+              std::string _key194;
+              xfer += iprot->readString(_key194);
+              std::string& _val195 = (*(this->success))[_key194];
+              xfer += iprot->readString(_val195);
             }
             xfer += iprot->readMapEnd();
           }
@@ -10376,14 +10609,14 @@ uint32_t Airavata_getAllApplicationInterfaces_result::read(::apache::thrift::pro
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size185;
-            ::apache::thrift::protocol::TType _etype188;
-            xfer += iprot->readListBegin(_etype188, _size185);
-            this->success.resize(_size185);
-            uint32_t _i189;
-            for (_i189 = 0; _i189 < _size185; ++_i189)
+            uint32_t _size196;
+            ::apache::thrift::protocol::TType _etype199;
+            xfer += iprot->readListBegin(_etype199, _size196);
+            this->success.resize(_size196);
+            uint32_t _i200;
+            for (_i200 = 0; _i200 < _size196; ++_i200)
             {
-              xfer += this->success[_i189].read(iprot);
+              xfer += this->success[_i200].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -10438,10 +10671,10 @@ uint32_t Airavata_getAllApplicationInterfaces_result::write(::apache::thrift::pr
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
-      std::vector< ::apache::airavata::model::appcatalog::appinterface::ApplicationInterfaceDescription> ::const_iterator _iter190;
-      for (_iter190 = this->success.begin(); _iter190 != this->success.end(); ++_iter190)
+      std::vector< ::apache::airavata::model::appcatalog::appinterface::ApplicationInterfaceDescription> ::const_iterator _iter201;
+      for (_iter201 = this->success.begin(); _iter201 != this->success.end(); ++_iter201)
       {
-        xfer += (*_iter190).write(oprot);
+        xfer += (*_iter201).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -10488,14 +10721,14 @@ uint32_t Airavata_getAllApplicationInterfaces_presult::read(::apache::thrift::pr
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size191;
-            ::apache::thrift::protocol::TType _etype194;
-            xfer += iprot->readListBegin(_etype194, _size191);
-            (*(this->success)).resize(_size191);
-            uint32_t _i195;
-            for (_i195 = 0; _i195 < _size191; ++_i195)
+            uint32_t _size202;
+            ::apache::thrift::protocol::TType _etype205;
+            xfer += iprot->readListBegin(_etype205, _size202);
+            (*(this->success)).resize(_size202);
+            uint32_t _i206;
+            for (_i206 = 0; _i206 < _size202; ++_i206)
             {
-              xfer += (*(this->success))[_i195].read(iprot);
+              xfer += (*(this->success))[_i206].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -10633,14 +10866,14 @@ uint32_t Airavata_getApplicationInputs_result::read(::apache::thrift::protocol::
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size196;
-            ::apache::thrift::protocol::TType _etype199;
-            xfer += iprot->readListBegin(_etype199, _size196);
-            this->success.resize(_size196);
-            uint32_t _i200;
-            for (_i200 = 0; _i200 < _size196; ++_i200)
+            uint32_t _size207;
+            ::apache::thrift::protocol::TType _etype210;
+            xfer += iprot->readListBegin(_etype210, _size207);
+            this->success.resize(_size207);
+            uint32_t _i211;
+            for (_i211 = 0; _i211 < _size207; ++_i211)
             {
-              xfer += this->success[_i200].read(iprot);
+              xfer += this->success[_i211].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -10695,10 +10928,10 @@ uint32_t Airavata_getApplicationInputs_result::write(::apache::thrift::protocol:
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
-      std::vector< ::apache::airavata::model::appcatalog::appinterface::InputDataObjectType> ::const_iterator _iter201;
-      for (_iter201 = this->success.begin(); _iter201 != this->success.end(); ++_iter201)
+      std::vector< ::apache::airavata::model::appcatalog::appinterface::InputDataObjectType> ::const_iterator _iter212;
+      for (_iter212 = this->success.begin(); _iter212 != this->success.end(); ++_iter212)
       {
-        xfer += (*_iter201).write(oprot);
+        xfer += (*_iter212).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -10745,14 +10978,14 @@ uint32_t Airavata_getApplicationInputs_presult::read(::apache::thrift::protocol:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size202;
-            ::apache::thrift::protocol::TType _etype205;
-            xfer += iprot->readListBegin(_etype205, _size202);
-            (*(this->success)).resize(_size202);
-            uint32_t _i206;
-            for (_i206 = 0; _i206 < _size202; ++_i206)
+            uint32_t _size213;
+            ::apache::thrift::protocol::TType _etype216;
+            xfer += iprot->readListBegin(_etype216, _size213);
+            (*(this->success)).resize(_size213);
+            uint32_t _i217;
+            for (_i217 = 0; _i217 < _size213; ++_i217)
             {
-              xfer += (*(this->success))[_i206].read(iprot);
+              xfer += (*(this->success))[_i217].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -10890,14 +11123,14 @@ uint32_t Airavata_getApplicationOutputs_result::read(::apache::thrift::protocol:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size207;
-            ::apache::thrift::protocol::TType _etype210;
-            xfer += iprot->readListBegin(_etype210, _size207);
-            this->success.resize(_size207);
-            uint32_t _i211;
-            for (_i211 = 0; _i211 < _size207; ++_i211)
+            uint32_t _size218;
+            ::apache::thrift::protocol::TType _etype221;
+            xfer += iprot->readListBegin(_etype221, _size218);
+            this->success.resize(_size218);
+            uint32_t _i222;
+            for (_i222 = 0; _i222 < _size218; ++_i222)
             {
-              xfer += this->success[_i211].read(iprot);
+              xfer += this->success[_i222].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -10952,10 +11185,10 @@ uint32_t Airavata_getApplicationOutputs_result::write(::apache::thrift::protocol
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
-      std::vector< ::apache::airavata::model::appcatalog::appinterface::OutputDataObjectType> ::const_iterator _iter212;
-      for (_iter212 = this->success.begin(); _iter212 != this->success.end(); ++_iter212)
+      std::vector< ::apache::airavata::model::appcatalog::appinterface::OutputDataObjectType> ::const_iterator _iter223;
+      for (_iter223 = this->success.begin(); _iter223 != this->success.end(); ++_iter223)
       {
-        xfer += (*_iter212).write(oprot);
+        xfer += (*_iter223).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -11002,14 +11235,14 @@ uint32_t Airavata_getApplicationOutputs_presult::read(::apache::thrift::protocol
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size213;
-            ::apache::thrift::protocol::TType _etype216;
-            xfer += iprot->readListBegin(_etype216, _size213);
-            (*(this->success)).resize(_size213);
-            uint32_t _i217;
-            for (_i217 = 0; _i217 < _size213; ++_i217)
+            uint32_t _size224;
+            ::apache::thrift::protocol::TType _etype227;
+            xfer += iprot->readListBegin(_etype227, _size224);
+            (*(this->success)).resize(_size224);
+            uint32_t _i228;
+            for (_i228 = 0; _i228 < _size224; ++_i228)
             {
-              xfer += (*(this->success))[_i217].read(iprot);
+              xfer += (*(this->success))[_i228].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -11147,17 +11380,17 @@ uint32_t Airavata_getAvailableAppInterfaceComputeResources_result::read(::apache
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->success.clear();
-            uint32_t _size218;
-            ::apache::thrift::protocol::TType _ktype219;
-            ::apache::thrift::protocol::TType _vtype220;
-            xfer += iprot->readMapBegin(_ktype219, _vtype220, _size218);
-            uint32_t _i222;
-            for (_i222 = 0; _i222 < _size218; ++_i222)
+            uint32_t _size229;
+            ::apache::thrift::protocol::TType _ktype230;
+            ::apache::thrift::protocol::TType _vtype231;
+            xfer += iprot->readMapBegin(_ktype230, _vtype231, _size229);
+            uint32_t _i233;
+            for (_i233 = 0; _i233 < _size229; ++_i233)
             {
-              std::string _key223;
-              xfer += iprot->readString(_key223);
-              std::string& _val224 = this->success[_key223];
-              xfer += iprot->readString(_val224);
+              std::string _key234;
+              xfer += iprot->readString(_key234);
+              std::string& _val235 = this->success[_key234];
+              xfer += iprot->readString(_val235);
             }
             xfer += iprot->readMapEnd();
           }
@@ -11212,11 +11445,11 @@ uint32_t Airavata_getAvailableAppInterfaceComputeResources_result::write(::apach
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::map<std::string, std::string> ::const_iterator _iter225;
-      for (_iter225 = this->success.begin(); _iter225 != this->success.end(); ++_iter225)
+      std::map<std::string, std::string> ::const_iterator _iter236;
+      for (_iter236 = this->success.begin(); _iter236 != this->success.end(); ++_iter236)
       {
-        xfer += oprot->writeString(_iter225->first);
-        xfer += oprot->writeString(_iter225->second);
+        xfer += oprot->writeString(_iter236->first);
+        xfer += oprot->writeString(_iter236->second);
       }
       xfer += oprot->writeMapEnd();
     }
@@ -11263,17 +11496,17 @@ uint32_t Airavata_getAvailableAppInterfaceComputeResources_presult::read(::apach
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             (*(this->success)).clear();
-            uint32_t _size226;
-            ::apache::thrift::protocol::TType _ktype227;
-            ::apache::thrift::protocol::TType _vtype228;
-            xfer += iprot->readMapBegin(_ktype227, _vtype228, _size226);
-            uint32_t _i230;
-            for (_i230 = 0; _i230 < _size226; ++_i230)
+            uint32_t _size237;
+            ::apache::thrift::protocol::TType _ktype238;
+            ::apache::thrift::protocol::TType _vtype239;
+            xfer += iprot->readMapBegin(_ktype238, _vtype239, _size237);
+            uint32_t _i241;
+            for (_i241 = 0; _i241 < _size237; ++_i241)
             {
-              std::string _key231;
-              xfer += iprot->readString(_key231);
-              std::string& _val232 = (*(this->success))[_key231];
-              xfer += iprot->readString(_val232);
+              std::string _key242;
+              xfer += iprot->readString(_key242);
+              std::string& _val243 = (*(this->success))[_key242];
+              xfer += iprot->readString(_val243);
             }
             xfer += iprot->readMapEnd();
           }
@@ -11837,17 +12070,17 @@ uint32_t Airavata_getAllComputeResourceNames_result::read(::apache::thrift::prot
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->success.clear();
-            uint32_t _size233;
-            ::apache::thrift::protocol::TType _ktype234;
-            ::apache::thrift::protocol::TType _vtype235;
-            xfer += iprot->readMapBegin(_ktype234, _vtype235, _size233);
-            uint32_t _i237;
-            for (_i237 = 0; _i237 < _size233; ++_i237)
+            uint32_t _size244;
+            ::apache::thrift::protocol::TType _ktype245;
+            ::apache::thrift::protocol::TType _vtype246;
+            xfer += iprot->readMapBegin(_ktype245, _vtype246, _size244);
+            uint32_t _i248;
+            for (_i248 = 0; _i248 < _size244; ++_i248)
             {
-              std::string _key238;
-              xfer += iprot->readString(_key238);
-              std::string& _val239 = this->success[_key238];
-              xfer += iprot->readString(_val239);
+              std::string _key249;
+              xfer += iprot->readString(_key249);
+              std::string& _val250 = this->success[_key249];
+              xfer += iprot->readString(_val250);
             }
             xfer += iprot->readMapEnd();
           }
@@ -11902,11 +12135,11 @@ uint32_t Airavata_getAllComputeResourceNames_result::write(::apache::thrift::pro
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
-      std::map<std::string, std::string> ::const_iterator _iter240;
-      for (_iter240 = this->success.begin(); _iter240 != this->success.end(); ++_iter240)
+      std::map<std::string, std::string> ::const_iterator _iter251;
+      for (_iter251 = this->success.begin(); _iter251 != this->success.end(); ++_iter251)
       {
-        xfer += oprot->writeString(_iter240->first);
-        xfer += oprot->writeString(_iter240->second);
+        xfer += oprot->writeString(_iter251->first);
+        xfer += oprot->writeString(_iter251->second);
       }
       xfer += oprot->writeMapEnd();
     }
@@ -11953,17 +12186,17 @@ uint32_t Airavata_getAllComputeResourceNames_presult::read(::apache::thrift::pro
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             (*(this->success)).clear();
-            uint32_t _size241;
-            ::apache::thrift::protocol::TType _ktype242;
-            ::apache::thrift::protocol::TType _vtype243;
-            xfer += iprot->readMapBegin(_ktype242, _vtype243, _size241);
-            uint32_t _i245;
-            for (_i245 = 0; _i245 < _size241; ++_i245)
+            uint32_t _size252;
+            ::apache::thrift::protocol::TType _ktype253;
+            ::apache::thrift::protocol::TType _vtype254;
+            xfer += iprot->readMapBegin(_ktype253, _vtype254, _size252);
+            uint32_t _i256;
+            for (_i256 = 0; _i256 < _size252; ++_i256)
             {
-              std::string _key246;
-              xfer += iprot->readString(_key246);
-              std::string& _val247 = (*(this->success))[_key246];
-              xfer += iprot->readString(_val247);
+              std::string _key257;
+              xfer += iprot->readString(_key257);
+              std::string& _val258 = (*(this->success))[_key257];
+              xfer += iprot->readString(_val258);
             }
             xfer += iprot->readMapEnd();
           }
@@ -17870,17 +18103,17 @@ uint32_t Airavata_changeJobSubmissionPriorities_args::read(::apache::thrift::pro
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->jobSubmissionPriorityMap.clear();
-            uint32_t _size248;
-            ::apache::thrift::protocol::TType _ktype249;
-            ::apache::thrift::protocol::TType _vtype250;
-            xfer += iprot->readMapBegin(_ktype249, _vtype250, _size248);
-            uint32_t _i252;
-            for (_i252 = 0; _i252 < _size248; ++_i252)
+            uint32_t _size259;
+            ::apache::thrift::protocol::TType _ktype260;
+            ::apache::thrift::protocol::TType _vtype261;
+            xfer += iprot->readMapBegin(_ktype260, _vtype261, _size259);
+            uint32_t _i263;
+            for (_i263 = 0; _i263 < _size259; ++_i263)
             {
-              std::string _key253;
-              xfer += iprot->readString(_key253);
-              int32_t& _val254 = this->jobSubmissionPriorityMap[_key253];
-              xfer += iprot->readI32(_val254);
+              std::string _key264;
+              xfer += iprot->readString(_key264);
+              int32_t& _val265 = this->jobSubmissionPriorityMap[_key264];
+              xfer += iprot->readI32(_val265);
             }
             xfer += iprot->readMapEnd();
           }
@@ -17910,11 +18143,11 @@ uint32_t Airavata_changeJobSubmissionPriorities_args::write(::apache::thrift::pr
   xfer += oprot->writeFieldBegin("jobSubmissionPriorityMap", ::apache::thrift::protocol::T_MAP, 1);
   {
     xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->jobSubmissionPriorityMap.size()));
-    std::map<std::string, int32_t> ::const_iterator _iter255;
-    for (_iter255 = this->jobSubmissionPriorityMap.begin(); _iter255 != this->jobSubmissionPriorityMap.end(); ++_iter255)
+    std::map<std::string, int32_t> ::const_iterator _iter266;
+    for (_iter266 = this->jobSubmissionPriorityMap.begin(); _iter266 != this->jobSubmissionPriorityMap.end(); ++_iter266)
     {
-      xfer += oprot->writeString(_iter255->first);
-      xfer += oprot->writeI32(_iter255->second);
+      xfer += oprot->writeString(_iter266->first);
+      xfer += oprot->writeI32(_iter266->second);
     }
     xfer += oprot->writeMapEnd();
   }
@@ -17932,11 +18165,11 @@ uint32_t Airavata_changeJobSubmissionPriorities_pargs::write(::apache::thrift::p
   xfer += oprot->writeFieldBegin("jobSubmissionPriorityMap", ::apache::thrift::protocol::T_MAP, 1);
   {
     xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>((*(this->jobSubmissionPriorityMap)).size()));
-    std::map<std::string, int32_t> ::const_iterator _iter256;
-    for (_iter256 = (*(this->jobSubmissionPriorityMap)).begin(); _iter256 != (*(this->jobSubmissionPriorityMap)).end(); ++_iter256)
+    std::map<std::string, int32_t> ::const_iterator _iter267;
+    for (_iter267 = (*(this->jobSubmissionPriorityMap)).begin(); _iter267 != (*(this->jobSubmissionPriorityMap)).end(); ++_iter267)
     {
-      xfer += oprot->writeString(_iter256->first);
-      xfer += oprot->writeI32(_iter256->second);
+      xfer += oprot->writeString(_iter267->first);
+      xfer += oprot->writeI32(_iter267->second);
     }
     xfer += oprot->writeMapEnd();
   }
@@ -18128,17 +18361,17 @@ uint32_t Airavata_changeDataMovementPriorities_args::read(::apache::thrift::prot
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->dataMovementPriorityMap.clear();
-            uint32_t _size257;
-            ::apache::thrift::protocol::TType _ktype258;
-            ::apache::thrift::protocol::TType _vtype259;
-            xfer += iprot->readMapBegin(_ktype258, _vtype259, _size257);
-            uint32_t _i261;
-            for (_i261 = 0; _i261 < _size257; ++_i261)
+            uint32_t _size268;
+            ::apache::thrift::protocol::TType _ktype269;
+            ::apache::thrift::protocol::TType _vtype270;
+            xfer += iprot->readMapBegin(_ktype269, _vtype270, _size268);
+            uint32_t _i272;
+            for (_i272 = 0; _i272 < _size268; ++_i272)
             {
-              std::string _key262;
-              xfer += iprot->readString(_key262);
-              int32_t& _val263 = this->dataMovementPriorityMap[_key262];
-              xfer += iprot->readI32(_val263);
+              std::string _key273;
+              xfer += iprot->readString(_key273);
+              int32_t& _val274 = this->dataMovementPriorityMap[_key273];
+              xfer += iprot->readI32(_val274);
             }
             xfer += iprot->readMapEnd();
           }
@@ -18168,11 +18401,11 @@ uint32_t Airavata_changeDataMovementPriorities_args::write(::apache::thrift::pro
   xfer += oprot->writeFieldBegin("dataMovementPriorityMap", ::apache::thrift::protocol::T_MAP, 1);
   {
     xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->dataMovementPriorityMap.size()));
-    std::map<std::string, int32_t> ::const_iterator _iter264;
-    for (_iter264 = this->dataMovementPriorityMap.begin(); _iter264 != this->dataMovementPriorityMap.end(); ++_iter264)
+    std::map<std::string, int32_t> ::const_iterator _iter275;
+    for (_iter275 = this->dataMovementPriorityMap.begin(); _iter275 != this->dataMovementPriorityMap.end(); ++_iter275)
     {
-      xfer += oprot->writeString(_iter264->first);
-      xfer += oprot->writeI32(_iter264->second);
+      xfer += oprot->writeString(_iter275->first);
+      xfer += oprot->writeI32(_iter275->second);
     }
     xfer += oprot->writeMapEnd();
   }
@@ -18190,11 +18423,11 @@ uint32_t Airavata_changeDataMovementPriorities_pargs::write(::apache::thrift::pr
   xfer += oprot->writeFieldBegin("dataMovementPriorityMap", ::apache::thrift::protocol::T_MAP, 1);
   {
     xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>((*(this->dataMovementPriorityMap)).size()));
-    std::map<std::string, int32_t> ::const_iterator _iter265;
-    for (_iter265 = (*(this->dataMovementPriorityMap)).begin(); _iter265 != (*(this->dataMovementPriorityMap)).end(); ++_iter265)
+    std::map<std::string, int32_t> ::const_iterator _iter276;
+    for (_iter276 = (*(this->dataMovementPriorityMap)).begin(); _iter276 != (*(this->dataMovementPriorityMap)).end(); ++_iter276)
     {
-      xfer += oprot->writeString(_iter265->first);
-      xfer += oprot->writeI32(_iter265->second);
+      xfer += oprot->writeString(_iter276->first);
+      xfer += oprot->writeI32(_iter276->second);
     }
     xfer += oprot->writeMapEnd();
   }
@@ -21531,14 +21764,14 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::read(::apache:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->success.clear();
-            uint32_t _size266;
-            ::apache::thrift::protocol::TType _etype269;
-            xfer += iprot->readListBegin(_etype269, _size266);
-            this->success.resize(_size266);
-            uint32_t _i270;
-            for (_i270 = 0; _i270 < _size266; ++_i270)
+            uint32_t _size277;
+            ::apache::thrift::protocol::TType _etype280;
+            xfer += iprot->readListBegin(_etype280, _size277);
+            this->success.resize(_size277);
+            uint32_t _i281;
+            for (_i281 = 0; _i281 < _size277; ++_i281)
             {
-              xfer += this->success[_i270].read(iprot);
+              xfer += this->success[_i281].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -21593,10 +21826,10 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::write(::apache
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
-      std::vector< ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference> ::const_iterator _iter271;
-      for (_iter271 = this->success.begin(); _iter271 != this->success.end(); ++_iter271)
+      std::vector< ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference> ::const_iterator _iter282;
+      for (_iter282 = this->success.begin(); _iter282 != this->success.end(); ++_iter282)
       {
-        xfer += (*_iter271).write(oprot);
+        xfer += (*_iter282).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -21643,14 +21876,14 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_presult::read(::apache
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             (*(this->success)).clear();
-            uint32_t _size272;
-            ::apache::thrift::protocol::TType _etype275;
-            xfer += iprot->readListBegin(_etype275, _size272);
-            (*(this->success)).resize(_size272);
-            uint32_t _i276;
-            for (_i276 = 0; _i276 < _size272; ++_i276)
+            uint32_t _size283;
+            ::apache::thrift::protocol::TType _etype286;
+            xfer += iprot->readListBegin(_etype286, _size283);
+            (*(this->success)).resize(_size283);
+            uint32_t _i287;
+            for (_i287 = 0; _i287 < _size283; ++_i287)
             {
-              xfer += (*(this->success))[_i276].read(iprot);
+              xfer += (*(this->success))[_i287].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -22202,153 +22435,2258 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_presult::read(::apache:
   return xfer;
 }
 
-void AiravataClient::getAPIVersion(std::string& _return)
-{
-  send_getAPIVersion();
-  recv_getAPIVersion(_return);
-}
-
-void AiravataClient::send_getAPIVersion()
-{
-  int32_t cseqid = 0;
-  oprot_->writeMessageBegin("getAPIVersion", ::apache::thrift::protocol::T_CALL, cseqid);
+uint32_t Airavata_getAllWorkflows_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
-  Airavata_getAPIVersion_pargs args;
-  args.write(oprot_);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
 
-  oprot_->writeMessageEnd();
-  oprot_->getTransport()->writeEnd();
-  oprot_->getTransport()->flush();
-}
+  xfer += iprot->readStructBegin(fname);
 
-void AiravataClient::recv_getAPIVersion(std::string& _return)
-{
+  using ::apache::thrift::protocol::TProtocolException;
 
-  int32_t rseqid = 0;
-  std::string fname;
-  ::apache::thrift::protocol::TMessageType mtype;
 
-  iprot_->readMessageBegin(fname, mtype, rseqid);
-  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
-    ::apache::thrift::TApplicationException x;
-    x.read(iprot_);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
-    throw x;
-  }
-  if (mtype != ::apache::thrift::protocol::T_REPLY) {
-    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
-  }
-  if (fname.compare("getAPIVersion") != 0) {
-    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    xfer += iprot->skip(ftype);
+    xfer += iprot->readFieldEnd();
   }
-  Airavata_getAPIVersion_presult result;
-  result.success = &_return;
-  result.read(iprot_);
-  iprot_->readMessageEnd();
-  iprot_->getTransport()->readEnd();
 
-  if (result.__isset.success) {
-    // _return pointer has now been filled
-    return;
-  }
-  if (result.__isset.ire) {
-    throw result.ire;
-  }
-  if (result.__isset.ace) {
-    throw result.ace;
-  }
-  if (result.__isset.ase) {
-    throw result.ase;
-  }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getAPIVersion failed: unknown result");
-}
+  xfer += iprot->readStructEnd();
 
-void AiravataClient::createProject(std::string& _return, const  ::apache::airavata::model::workspace::Project& project)
-{
-  send_createProject(project);
-  recv_createProject(_return);
+  return xfer;
 }
 
-void AiravataClient::send_createProject(const  ::apache::airavata::model::workspace::Project& project)
-{
-  int32_t cseqid = 0;
-  oprot_->writeMessageBegin("createProject", ::apache::thrift::protocol::T_CALL, cseqid);
+uint32_t Airavata_getAllWorkflows_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllWorkflows_args");
 
-  Airavata_createProject_pargs args;
-  args.project = &project;
-  args.write(oprot_);
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
 
-  oprot_->writeMessageEnd();
-  oprot_->getTransport()->writeEnd();
-  oprot_->getTransport()->flush();
+uint32_t Airavata_getAllWorkflows_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllWorkflows_pargs");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
 }
 
-void AiravataClient::recv_createProject(std::string& _return)
-{
+uint32_t Airavata_getAllWorkflows_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
-  int32_t rseqid = 0;
+  uint32_t xfer = 0;
   std::string fname;
-  ::apache::thrift::protocol::TMessageType mtype;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
 
-  iprot_->readMessageBegin(fname, mtype, rseqid);
-  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
-    ::apache::thrift::TApplicationException x;
-    x.read(iprot_);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
-    throw x;
-  }
-  if (mtype != ::apache::thrift::protocol::T_REPLY) {
-    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
-  }
-  if (fname.compare("createProject") != 0) {
-    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
-  }
-  Airavata_createProject_presult result;
-  result.success = &_return;
-  result.read(iprot_);
-  iprot_->readMessageEnd();
-  iprot_->getTransport()->readEnd();
+  xfer += iprot->readStructBegin(fname);
 
-  if (result.__isset.success) {
-    // _return pointer has now been filled
-    return;
-  }
-  if (result.__isset.ire) {
-    throw result.ire;
-  }
-  if (result.__isset.ace) {
-    throw result.ace;
-  }
-  if (result.__isset.ase) {
-    throw result.ase;
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size288;
+            ::apache::thrift::protocol::TType _etype291;
+            xfer += iprot->readListBegin(_etype291, _size288);
+            this->success.resize(_size288);
+            uint32_t _i292;
+            for (_i292 = 0; _i292 < _size288; ++_i292)
+            {
+              xfer += iprot->readString(this->success[_i292]);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
   }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "createProject failed: unknown result");
-}
 
-void AiravataClient::updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject)
-{
-  send_updateProject(projectId, updatedProject);
-  recv_updateProject();
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getAllWorkflows_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getAllWorkflows_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
+      std::vector<std::string> ::const_iterator _iter293;
+      for (_iter293 = this->success.begin(); _iter293 != this->success.end(); ++_iter293)
+      {
+        xfer += oprot->writeString((*_iter293));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllWorkflows_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size294;
+            ::apache::thrift::protocol::TType _etype297;
+            xfer += iprot->readListBegin(_etype297, _size294);
+            (*(this->success)).resize(_size294);
+            uint32_t _i298;
+            for (_i298 = 0; _i298 < _size294; ++_i298)
+            {
+              xfer += iprot->readString((*(this->success))[_i298]);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflowTemplateId = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->workflowTemplateId);
+          isset_workflowTemplateId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflowTemplateId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getWorkflow_args");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->workflowTemplateId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getWorkflow_pargs");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->workflowTemplateId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getWorkflow_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflow_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflowTemplateId = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->workflowTemplateId);
+          isset_workflowTemplateId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflowTemplateId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteWorkflow_args");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->workflowTemplateId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteWorkflow_pargs");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->workflowTemplateId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_deleteWorkflow_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteWorkflow_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflow = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->workflow.read(iprot);
+          isset_workflow = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflow)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_registerWorkflow_args");
+
+  xfer += oprot->writeFieldBegin("workflow", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->workflow.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_registerWorkflow_pargs");
+
+  xfer += oprot->writeFieldBegin("workflow", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->workflow)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_registerWorkflow_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_registerWorkflow_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflowTemplateId = false;
+  bool isset_workflow = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->workflowTemplateId);
+          isset_workflowTemplateId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->workflow.read(iprot);
+          isset_workflow = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflowTemplateId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_workflow)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_updateWorkflow_args");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->workflowTemplateId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("workflow", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->workflow.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_updateWorkflow_pargs");
+
+  xfer += oprot->writeFieldBegin("workflowTemplateId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->workflowTemplateId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("workflow", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->workflow)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_updateWorkflow_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateWorkflow_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflowName = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->workflowName);
+          isset_workflowName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflowName)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getWorkflowTemplateId_args");
+
+  xfer += oprot->writeFieldBegin("workflowName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->workflowName);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getWorkflowTemplateId_pargs");
+
+  xfer += oprot->writeFieldBegin("workflowName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->workflowName)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getWorkflowTemplateId_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getWorkflowTemplateId_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_workflowName = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->workflowName);
+          isset_workflowName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_workflowName)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_isWorkflowExistWithName_args");
+
+  xfer += oprot->writeFieldBegin("workflowName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->workflowName);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_isWorkflowExistWithName_pargs");
+
+  xfer += oprot->writeFieldBegin("workflowName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->workflowName)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_isWorkflowExistWithName_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_isWorkflowExistWithName_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+void AiravataClient::getAPIVersion(std::string& _return)
+{
+  send_getAPIVersion();
+  recv_getAPIVersion(_return);
+}
+
+void AiravataClient::send_getAPIVersion()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getAPIVersion", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Airavata_getAPIVersion_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void AiravataClient::recv_getAPIVersion(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getAPIVersion") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Airavata_getAPIVersion_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  ipr

<TRUNCATED>

[30/44] git commit: Changing gfac-core to use app catalog

Posted by ch...@apache.org.
Changing gfac-core to use app catalog


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a1e0ec81
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a1e0ec81
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a1e0ec81

Branch: refs/heads/gfac_appcatalog_int
Commit: a1e0ec813969000d755e47ee77c2be5fbb401f2b
Parents: 8abe8dc
Author: chathuriw <ka...@gmail.com>
Authored: Thu Oct 30 10:11:19 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:14 2014 -0500

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/Scheduler.java     | 35 ++++-----
 .../gfac/core/context/JobExecutionContext.java  | 21 ++++++
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 47 ++++++++++++
 .../core/handler/AppDescriptorCheckHandler.java | 17 -----
 .../airavata/gfac/core/monitor/MonitorID.java   |  1 +
 .../apache/airavata/job/GFacConfigXmlTest.java  | 78 ++++++++++++++++----
 6 files changed, 148 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 9b70fae..8f5847f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -21,30 +21,26 @@
 
 package org.apache.airavata.gfac;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderConfig;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
 
 /**
  * Scheduler decides the execution order of handlers based on application description. In addition
@@ -76,7 +72,6 @@ public class Scheduler {
      * @return GFacProvider instance.
      */
     private static GFacProvider getProvider(JobExecutionContext jobExecutionContext) throws GFacException {
-        ComputeResourceDescription hostDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
         String applicationName = jobExecutionContext.getServiceName();
 
         URL resource = Scheduler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
@@ -113,8 +108,8 @@ public class Scheduler {
             // We give higher preference to applications specific provider if configured
             if (provider == null) {
 
-                jobExecutionContext.getApplicationContext().getComputeResourcePreference().getPreferredJobSubmissionProtocol()
-                String hostClass = hostDescription.getType().getClass().getName();
+                List<JobSubmissionInterface> jobSubmissionInterfaces = jobExecutionContext.getApplicationContext().getComputeResourceDescription().getJobSubmissionInterfaces();
+                String hostClass = jobExecutionContext.getPrefferedJobSubmissionProtocal();
                 providerClassName = GFacConfiguration.getAttributeValue(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_ON_HOST + hostClass + "']", Constants.GFAC_CONFIG_CLASS_ATTRIBUTE);
                 Class<? extends GFacProvider> aClass1 = Class.forName(providerClassName).asSubclass(GFacProvider.class);
                 provider = aClass1.newInstance();
@@ -144,9 +139,7 @@ public class Scheduler {
         return provider;
     }
     public static ExecutionMode getExecutionMode(JobExecutionContext jobExecutionContext)throws GFacException{
-       HostDescription hostDescription = jobExecutionContext.getApplicationContext().getHostDescription();
-        String applicationName = jobExecutionContext.getServiceName();
-
+        String applicationName = jobExecutionContext.getApplicationContext().getApplicationInterfaceDescription().getApplicationName();
         URL resource = Scheduler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = null;
@@ -169,7 +162,7 @@ public class Scheduler {
             // This should be have a single element only.
 
             if (executionMode == null || "".equals(executionMode)) {
-                String hostClass = hostDescription.getType().getClass().getName();
+                String hostClass = jobExecutionContext.getPrefferedJobSubmissionProtocal();
                 executionMode = GFacConfiguration.getAttributeValue(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_ON_HOST + hostClass + "']", Constants.GFAC_CONFIG_EXECUTION_MODE_ATTRIBUTE);
             }
         } catch (XPathExpressionException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index da716c5..2b2255f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -52,12 +52,14 @@ public class JobExecutionContext extends AbstractContext implements Serializable
 
     private GFacNotifier notifier;
 
+    //FIXME : not needed for gfac
     private Experiment experiment;
 
     private TaskDetails taskData;
 
     private JobDetails jobDetails;
 
+    // FIXME : not needed for gfac
     private WorkflowNodeDetails workflowNodeDetails;
 
     private GFac gfac;
@@ -72,6 +74,9 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     private String outputDir;
     private String standaredOutput;
     private String standaredError;
+    private String prefferedJobSubmissionProtocal;
+    private String prefferedDataMovementProtocal;
+
 
 //    private ContextHeaderDocument.ContextHeader contextHeader;
 
@@ -364,4 +369,20 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     public void setStandaredError(String standaredError) {
         this.standaredError = standaredError;
     }
+
+    public String getPrefferedJobSubmissionProtocal() {
+        return prefferedJobSubmissionProtocal;
+    }
+
+    public void setPrefferedJobSubmissionProtocal(String prefferedJobSubmissionProtocal) {
+        this.prefferedJobSubmissionProtocal = prefferedJobSubmissionProtocal;
+    }
+
+    public String getPrefferedDataMovementProtocal() {
+        return prefferedDataMovementProtocal;
+    }
+
+    public void setPrefferedDataMovementProtocal(String prefferedDataMovementProtocal) {
+        this.prefferedDataMovementProtocal = prefferedDataMovementProtocal;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/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 16c49e6..fd43c65 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
@@ -52,6 +52,7 @@ import org.apache.airavata.messaging.core.PublisherFactory;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.messaging.event.*;
 import org.apache.airavata.model.workspace.experiment.*;
@@ -298,6 +299,52 @@ public class BetterGfacImpl implements GFac,Watcher {
         jobExecutionContext.setGfac(this);
         jobExecutionContext.setZk(zk);
         jobExecutionContext.setCredentialStoreToken(AiravataZKUtils.getExpTokenId(zk, experimentID, taskID));
+        if (gatewayResourcePreferences != null ) {
+            if (gatewayResourcePreferences.getScratchLocation() == null) {
+                gatewayResourcePreferences.setScratchLocation("/tmp");
+            }
+
+            /**
+             * Working dir
+             */
+            String workingDir = gatewayResourcePreferences.getScratchLocation() + File.separator + jobExecutionContext.getExperimentID();
+            jobExecutionContext.setWorkingDir(workingDir);
+
+            /*
+            * Input and Output Directory
+            */
+            jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
+            jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
+
+            /*
+            * Stdout and Stderr for Shell
+            */
+            jobExecutionContext.setStandaredOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
+            jobExecutionContext.setStandaredError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+        }
+
+        List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
+        String preferredJobSubmissionProtocol = gatewayResourcePreferences.getPreferredJobSubmissionProtocol();
+        String hostClass;
+        if (preferredJobSubmissionProtocol != null){
+            hostClass = preferredJobSubmissionProtocol;
+        }else {
+            if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
+                int lowestPriority = jobSubmissionInterfaces.get(0).getPriorityOrder();
+                String selectedHost = null;
+                for (int i = 0; i < jobSubmissionInterfaces.size() - 1; i++){
+                    if (jobSubmissionInterfaces.get(i+1).getPriorityOrder() < lowestPriority ){
+                        lowestPriority = jobSubmissionInterfaces.get(i+1).getPriorityOrder();
+                        selectedHost = jobSubmissionInterfaces.get(i+1).getJobSubmissionProtocol().toString();
+                    }
+                }
+                hostClass = selectedHost;
+            }else {
+                throw new GFacException("Compute resource should have atleast one job submission interface defined...");
+            }
+        }
+        jobExecutionContext.setPrefferedJobSubmissionProtocal(hostClass);
+
         return jobExecutionContext;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
index 676a15a..4627bf5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
@@ -20,16 +20,13 @@
 */
 package org.apache.airavata.gfac.core.handler;
 
-import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
 import java.util.Properties;
 
 public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
@@ -43,33 +40,19 @@ public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
             logger.info("Error saving plugin status to ZK");
         }
         StringBuffer data = new StringBuffer();
-        ApplicationInterfaceDescription appInterface = jobExecutionContext.getApplicationContext().getApplicationInterfaceDescription();
         ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
 
-        if (computeResourcePreference.getScratchLocation() == null) {
-            computeResourcePreference.setScratchLocation("/tmp");
-        }
-        /*
-        * Working dir
-        */
-
-        String workingDir = computeResourcePreference.getScratchLocation() + File.separator+ jobExecutionContext.getExperimentID();
-        jobExecutionContext.setWorkingDir(workingDir);
         data.append(computeResourcePreference.getScratchLocation());
         data.append(",").append(jobExecutionContext.getWorkingDir());
 
         /*
         * Input and Output Directory
         */
-        jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME );
-        jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
         data.append(",").append(jobExecutionContext.getInputDir()).append(",").append(jobExecutionContext.getOutputDir());
 
         /*
         * Stdout and Stderr for Shell
         */
-        jobExecutionContext.setStandaredOutput(workingDir + File.separator + appInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
-        jobExecutionContext.setStandaredError(workingDir + File.separator + appInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
         data.append(",").append(jobExecutionContext.getStandaredOutput()).append(",").append(jobExecutionContext.getStandaredError());
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
index fa4ecd2..6ea1839 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
@@ -24,6 +24,7 @@ import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.workspace.experiment.JobState;
 
 import java.sql.Timestamp;

http://git-wip-us.apache.org/repos/asf/airavata/blob/a1e0ec81/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
index e32bd9b..7e6bc0d 100644
--- a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
+++ b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
@@ -21,6 +21,9 @@
 package org.apache.airavata.job;
 
 import junit.framework.Assert;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.ExecutionMode;
 import org.apache.airavata.gfac.GFacConfiguration;
@@ -29,6 +32,7 @@ import org.apache.airavata.gfac.Scheduler;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -53,12 +57,34 @@ public class GFacConfigXmlTest {
         try {
             JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "testService");
             ApplicationContext applicationContext = new ApplicationContext();
-            HostDescription host = new HostDescription(GsisshHostType.type);
-            host.getType().setHostAddress("trestles.sdsc.edu");
-            host.getType().setHostName("trestles");
-            ((GsisshHostType) host.getType()).setPort(22);
-            ((GsisshHostType) host.getType()).setInstalledPath("/opt/torque/bin/");
-            applicationContext.setHostDescription(host);
+            ComputeResourceDescription computeResourceDescription = new ComputeResourceDescription();
+            computeResourceDescription.setHostName("trestles.sdsc.xsede.org");
+            computeResourceDescription.setResourceDescription("SDSC Trestles Cluster");
+
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+
+            ResourceJobManager resourceJobManager = new ResourceJobManager();
+            resourceJobManager.setResourceJobManagerType(ResourceJobManagerType.PBS);
+            resourceJobManager.setPushMonitoringEndpoint("push");
+            resourceJobManager.setJobManagerBinPath("/opt/torque/bin/");
+
+            SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+            sshJobSubmission.setResourceJobManager(resourceJobManager);
+            sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+            sshJobSubmission.setSshPort(22);
+            sshJobSubmission.setResourceJobManager(resourceJobManager);
+
+            String jobSubmissionId = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
+
+            JobSubmissionInterface submissionInterface = new JobSubmissionInterface();
+            submissionInterface.setJobSubmissionInterfaceId(jobSubmissionId);
+            submissionInterface.setJobSubmissionProtocol(JobSubmissionProtocol.SSH);
+            submissionInterface.setPriorityOrder(0);
+
+            computeResourceDescription.addToJobSubmissionInterfaces(submissionInterface);
+
+            appCatalog.getComputeResource().addComputeResource(computeResourceDescription);
+            applicationContext.setComputeResourceDescription(computeResourceDescription);
             jec.setApplicationContext(applicationContext);
             Scheduler.schedule(jec);
             Assert.assertEquals(ExecutionMode.ASYNCHRONOUS, jec.getGFacConfiguration().getExecutionMode());
@@ -73,6 +99,8 @@ public class GFacConfigXmlTest {
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         } catch (GFacException e) {
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        } catch (AppCatalogException e) {
+            e.printStackTrace();
         }
     }
     @Test
@@ -82,12 +110,34 @@ public class GFacConfigXmlTest {
             try {
                 JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "UltraScan");
                 ApplicationContext applicationContext = new ApplicationContext();
-                HostDescription host = new HostDescription(GsisshHostType.type);
-                host.getType().setHostAddress("trestles.sdsc.edu");
-                host.getType().setHostName("trestles");
-                ((GsisshHostType) host.getType()).setPort(22);
-                ((GsisshHostType) host.getType()).setInstalledPath("/opt/torque/bin/");
-                applicationContext.setHostDescription(host);
+                ComputeResourceDescription computeResourceDescription = new ComputeResourceDescription();
+                computeResourceDescription.setHostName("trestles.sdsc.xsede.org");
+                computeResourceDescription.setResourceDescription("SDSC Trestles Cluster");
+
+                AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+
+                ResourceJobManager resourceJobManager = new ResourceJobManager();
+                resourceJobManager.setResourceJobManagerType(ResourceJobManagerType.PBS);
+                resourceJobManager.setPushMonitoringEndpoint("push");
+                resourceJobManager.setJobManagerBinPath("/opt/torque/bin/");
+
+                SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+                sshJobSubmission.setResourceJobManager(resourceJobManager);
+                sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+                sshJobSubmission.setSshPort(22);
+                sshJobSubmission.setResourceJobManager(resourceJobManager);
+
+                String jobSubmissionId = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
+
+                JobSubmissionInterface submissionInterface = new JobSubmissionInterface();
+                submissionInterface.setJobSubmissionInterfaceId(jobSubmissionId);
+                submissionInterface.setJobSubmissionProtocol(JobSubmissionProtocol.SSH);
+                submissionInterface.setPriorityOrder(0);
+
+                computeResourceDescription.addToJobSubmissionInterfaces(submissionInterface);
+
+                appCatalog.getComputeResource().addComputeResource(computeResourceDescription);
+                applicationContext.setComputeResourceDescription(computeResourceDescription);
                 jec.setApplicationContext(applicationContext);
                 Scheduler.schedule(jec);
                 Assert.assertEquals(3, jec.getGFacConfiguration().getInHandlers().size());
@@ -106,8 +156,10 @@ public class GFacConfigXmlTest {
                 e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
             } catch (GFacException e) {
                 e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            } catch (AppCatalogException e) {
+                e.printStackTrace();
             }
-        }
+    }
 
 
 }


[36/44] git commit: Ingegrated appCatalog thrift model with GSISSH input and output handlers and inprove job execution context

Posted by ch...@apache.org.
Ingegrated appCatalog thrift model with GSISSH input and output handlers and inprove job execution context


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5a28f745
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5a28f745
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5a28f745

Branch: refs/heads/gfac_appcatalog_int
Commit: 5a28f745193e0cbab43dac26e018cc31ded1d26d
Parents: 3f953e0
Author: shamrath <sh...@gmail.com>
Authored: Fri Oct 31 17:41:22 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:23:05 2014 -0500

----------------------------------------------------------------------
 .../model/workspace/experiment/JobDetails.java  | 11 ++-
 .../gfac/core/context/JobExecutionContext.java  | 27 +++++-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 91 ++++++++++++++++----
 .../handler/GSISSHDirectorySetupHandler.java    |  7 +-
 .../gfac/gsissh/handler/GSISSHInputHandler.java | 18 ++--
 .../gsissh/handler/GSISSHOutputHandler.java     | 53 +++---------
 .../airavata/gsi/ssh/api/job/JobDescriptor.java |  7 ++
 7 files changed, 143 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
index d1cbe5e..c1034a0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
@@ -271,9 +271,14 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  public String getJobDescription() {
-    return this.jobDescription;
-  }
+    /**
+     * this method is deprecated after we introduce new thirft model with appcatalog
+     * @return
+     */
+    @Deprecated
+    public String getJobDescription() {
+        return this.jobDescription;
+    }
 
   public void setJobDescription(String jobDescription) {
     this.jobDescription = jobDescription;

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index cade06b..dcae96a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -33,6 +33,7 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.cpi.GFac;
 import org.apache.airavata.gfac.core.notification.GFacNotifier;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
 import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
@@ -100,12 +101,20 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     private DataMovementProtocol preferredDataMovementProtocol;
     /**
      * List of job submission protocols sorted by priority order.
-      */
+     */
     private List<JobSubmissionInterface> hostPrioritizedJobSubmissionInterfaces;
     /**
      * use preferred job submission protocol.
      */
     private JobSubmissionInterface preferredJobSubmissionInterface;
+    /**
+     * List of job submission protocols sorted by priority order.
+     */
+    private List<DataMovementInterface> hostPrioritizedDataMovementInterfaces;
+    /**
+     * use preferred job submission protocol.
+     */
+    private DataMovementInterface preferredDataMovementInterface;
 
 //    private ContextHeaderDocument.ContextHeader contextHeader;
 
@@ -434,4 +443,20 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     public String getHostName() {
         return applicationContext.getComputeResourceDescription().getHostName();
     }
+
+    public List<DataMovementInterface> getHostPrioritizedDataMovementInterfaces() {
+        return hostPrioritizedDataMovementInterfaces;
+    }
+
+    public void setHostPrioritizedDataMovementInterfaces(List<DataMovementInterface> hostPrioritizedDataMovementInterfaces) {
+        this.hostPrioritizedDataMovementInterfaces = hostPrioritizedDataMovementInterfaces;
+    }
+
+    public DataMovementInterface getPreferredDataMovementInterface() {
+        return preferredDataMovementInterface;
+    }
+
+    public void setPreferredDataMovementInterface(DataMovementInterface preferredDataMovementInterface) {
+        this.preferredDataMovementInterface = preferredDataMovementInterface;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/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 e8e4c66..656a291 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
@@ -52,8 +52,9 @@ import org.apache.airavata.messaging.core.PublisherFactory;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.FileSystems;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.messaging.event.*;
 import org.apache.airavata.model.workspace.experiment.*;
@@ -74,6 +75,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -303,6 +305,7 @@ public class BetterGfacImpl implements GFac,Watcher {
         jobExecutionContext.setZk(zk);
         jobExecutionContext.setCredentialStoreToken(AiravataZKUtils.getExpTokenId(zk, experimentID, taskID));
 
+        // handle job submission protocol
         List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
         if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()){
             Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
@@ -316,36 +319,92 @@ public class BetterGfacImpl implements GFac,Watcher {
         }else {
             throw new GFacException("Compute resource should have at least one job submission interface defined...");
         }
+        // handle data movement protocol
+        List<DataMovementInterface> dataMovementInterfaces = computeResource.getDataMovementInterfaces();
+        if (dataMovementInterfaces != null && !dataMovementInterfaces.isEmpty()) {
+            Collections.sort(dataMovementInterfaces, new Comparator<DataMovementInterface>() {
+                @Override
+                public int compare(DataMovementInterface dataMovementInterface, DataMovementInterface dataMovementInterface2) {
+                    return dataMovementInterface.getPriorityOrder() - dataMovementInterface2.getPriorityOrder();
+                }
+            });
+            jobExecutionContext.setHostPrioritizedDataMovementInterfaces(dataMovementInterfaces);
+        }
+
+        // set compute resource configuration as default preferred values, after that replace those with gateway user preferences.
+        populateDefaultComputeResourceConfiguration(jobExecutionContext, applicationInterface, computeResource);
+        // if gateway resource preference is set
         if (gatewayResourcePreferences != null ) {
             if (gatewayResourcePreferences.getScratchLocation() == null) {
                 gatewayResourcePreferences.setScratchLocation("/tmp");
             }
+            setUpWorkingLocation(jobExecutionContext, applicationInterface, gatewayResourcePreferences.getScratchLocation());
 
-            /**
-             * Working dir
-             */
-            String workingDir = gatewayResourcePreferences.getScratchLocation() + File.separator + jobExecutionContext.getExperimentID();
-            jobExecutionContext.setWorkingDir(workingDir);
+            jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
+            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+                jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
+                jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
+            } else {
+                for (JobSubmissionInterface jobSubmissionInterface : jobSubmissionInterfaces) {
+                    if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == jobSubmissionInterface.getJobSubmissionProtocol()) {
+                        jobExecutionContext.setPreferredJobSubmissionInterface(jobSubmissionInterface);
+                        break;
+                    }
+                }
+            }
+
+            // set gatewayUserPreferred data movement protocol and interface
+            jobExecutionContext.setPreferredDataMovementProtocol(gatewayResourcePreferences.getPreferredDataMovementProtocol());
+            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+                jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
+                jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
+            } else {
+                for (DataMovementInterface dataMovementInterface : dataMovementInterfaces) {
+                    if (gatewayResourcePreferences.getPreferredDataMovementProtocol() == dataMovementInterface.getDataMovementProtocol()) {
+                        jobExecutionContext.setPreferredDataMovementInterface(dataMovementInterface);
+                        break;
+                    }
+                }
+            }
+        }
+        return jobExecutionContext;
+    }
+
+    private void setUpWorkingLocation(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, String scratchLocation) {
+
+        /**
+         * Working dir
+         */
+        String workingDir = scratchLocation + File.separator + jobExecutionContext.getExperimentID();
+        jobExecutionContext.setWorkingDir(workingDir);
 
             /*
             * Input and Output Directory
             */
-            jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
-            jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
+        jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
+        jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
 
             /*
             * Stdout and Stderr for Shell
             */
-            jobExecutionContext.setStandardOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
-            jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+        jobExecutionContext.setStandardOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
+        jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+    }
 
-            jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
-            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
-                jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
-                jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
-            }
+    private void populateDefaultComputeResourceConfiguration(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, ComputeResourceDescription computeResource) {
+        Map<FileSystems, String> fileSystems = computeResource.getFileSystems();
+        String scratchLocation = fileSystems.get(FileSystems.SCRATCH);
+        if (scratchLocation != null) {
+            setUpWorkingLocation(jobExecutionContext, applicationInterface, scratchLocation);
+        }
+
+        jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
+        jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
+
+        if (jobExecutionContext.getHostPrioritizedDataMovementInterfaces() != null) {
+            jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
+            jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
         }
-        return jobExecutionContext;
     }
 
     private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
index b87f99a..b2790c9 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
@@ -77,12 +77,11 @@ public class GSISSHDirectorySetupHandler extends AbstractRecoverableHandler {
         } else {
             log.info("Successfully retrieved the Security Context");
         }
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
 
-            String workingDirectory = app.getScratchWorkingDirectory();
+            String workingDirectory = jobExecutionContext.getWorkingDir();
             cluster.makeDirectory(workingDirectory);
-            cluster.makeDirectory(app.getInputDataDirectory());
-            cluster.makeDirectory(app.getOutputDataDirectory());
+            cluster.makeDirectory(jobExecutionContext.getInputDir());
+            cluster.makeDirectory(jobExecutionContext.getOutputDir());
             DataTransferDetails detail = new DataTransferDetails();
             TransferStatus status = new TransferStatus();
             status.setTransferState(TransferState.DIRECTORY_SETUP);

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
index 5665b5b..b882be6 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
@@ -27,17 +27,18 @@ import org.apache.airavata.commons.gfac.type.MappingFactory;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.AbstractRecoverableHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
 import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TransferState;
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
 import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.apache.airavata.schemas.gfac.URIParameterType;
 import org.slf4j.Logger;
@@ -45,7 +46,11 @@ import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
 
 /**
  * Recoverability for this handler assumes the same input values will come in the second
@@ -171,11 +176,10 @@ public class GSISSHInputHandler extends AbstractRecoverableHandler {
     }
 
     private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
         int i = paramValue.lastIndexOf(File.separator);
         String substring = paramValue.substring(i + 1);
         try {
-            String targetFile = app.getInputDataDirectory() + File.separator + substring;
+            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
             if (paramValue.startsWith("file")) {
                 paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
index ac9bf3c..a714099 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
@@ -27,6 +27,7 @@ import java.util.*;
 import net.schmizz.sshj.connection.ConnectionException;
 import net.schmizz.sshj.transport.TransportException;
 
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
@@ -46,6 +47,10 @@ import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.messaging.event.TaskIdentifier;
 import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
 import org.apache.airavata.model.workspace.experiment.*;
@@ -67,36 +72,6 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
         int oldIndex = 0;
         List<String> oldFiles = new ArrayList<String>();
         StringBuffer data = new StringBuffer("|");
-        if (jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof GsisshHostType) { // this is because we don't have the right jobexecution context
-            // so attempting to get it from the registry
-            if (Constants.PUSH.equals(((GsisshHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType()).getMonitorMode())) {
-                log.warn("During the out handler chain jobExecution context came null, so trying to handler");
-                ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-                TaskDetails taskData = null;
-                try {
-                    taskData = (TaskDetails) jobExecutionContext.getRegistry().get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
-                } catch (RegistryException e) {
-                    log.error("Error retrieving job details from Registry");
-                    throw new GFacHandlerException("Error retrieving job details from Registry", e);
-                }
-                JobDetails jobDetails = taskData.getJobDetailsList().get(0);
-                String jobDescription = jobDetails.getJobDescription();
-                if (jobDescription != null) {
-                    JobDescriptor jobDescriptor = null;
-                    try {
-                        jobDescriptor = JobDescriptor.fromXML(jobDescription);
-                    } catch (XmlException e1) {
-                        e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                    }
-                    applicationDeploymentDescription.getType().setScratchWorkingDirectory(
-                            jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory());
-                    applicationDeploymentDescription.getType().setInputDataDirectory(jobDescriptor.getInputDirectory());
-                    applicationDeploymentDescription.getType().setOutputDataDirectory(jobDescriptor.getOutputDirectory());
-                    applicationDeploymentDescription.getType().setStandardError(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile());
-                    applicationDeploymentDescription.getType().setStandardOutput(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile());
-                }
-            }
-        }
         try {
             if (jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT) == null) {
 
@@ -114,8 +89,6 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
         DataTransferDetails detail = new DataTransferDetails();
         TransferStatus status = new TransferStatus();
 
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext()
-                .getApplicationDeploymentDescription().getType();
         Cluster cluster = null;
         
         try {
@@ -174,7 +147,7 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                 localStdOutFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stdout");
                 while(stdOutStr.isEmpty()){
                 try {
-                	cluster.scpFrom(app.getStandardOutput(), localStdOutFile.getAbsolutePath());
+                	cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
                 	stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
 				} catch (Exception e) {
 					log.error(e.getLocalizedMessage());
@@ -192,7 +165,7 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                 data.append(oldFiles.get(index++)).append(",");
             } else {
                 localStdErrFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stderr");
-                cluster.scpFrom(app.getStandardError(), localStdErrFile.getAbsolutePath());
+                cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
                 StringBuffer temp = new StringBuffer(data.append(localStdErrFile.getAbsolutePath()).append(",").toString());
                 GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
             }
@@ -219,7 +192,7 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                     List<String> outputList = null;
                     int retry=3;
                     while(retry>0){
-                    	 outputList = cluster.listDirectory(app.getOutputDataDirectory());
+                    	 outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
                         if (outputList.size() == 1 && outputList.get(0).isEmpty()) {
                             Thread.sleep(10000);
                         } else if (outputList.size() > 0) {
@@ -229,7 +202,6 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                         }
                         retry--;
                         if(retry==0){
-//                            log.info("Ohhhhhhh shitttttttOhhhhhhh shitttttttOhhhhhhh shitttttttOhhhhhhh shitttttttOhhhhhhh shitttttttOhhhhhhh shittttttt");
                         }
                     	 Thread.sleep(10000);
                     }
@@ -269,7 +241,7 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                             outputFile = oldFiles.get(index);
                             data.append(oldFiles.get(index++)).append(",");
                         } else {
-                            cluster.scpFrom(app.getOutputDataDirectory() + File.separator + valueList, outputDataDir);
+                            cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
                             outputFile = outputDataDir + File.separator + valueList;
                             jobExecutionContext.addOutputFile(outputFile);
                             StringBuffer temp = new StringBuffer(data.append(outputFile).append(",").toString());
@@ -296,9 +268,10 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler {
                 );
                 }
             }
-            app.setStandardError(localStdErrFile.getAbsolutePath());
-            app.setStandardOutput(localStdOutFile.getAbsolutePath());
-            app.setOutputDataDirectory(outputDataDir);
+            // Why we set following?
+//            app.setStandardError(localStdErrFile.getAbsolutePath());
+//            app.setStandardOutput(localStdOutFile.getAbsolutePath());
+//            app.setOutputDataDirectory(outputDataDir);
             status.setTransferState(TransferState.DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription(outputDataDir);

http://git-wip-us.apache.org/repos/asf/airavata/blob/5a28f745/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
index 9a0639b..9b7102b 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
@@ -60,6 +60,13 @@ public class JobDescriptor {
         return this.jobDescriptionDocument;
     }
 
+    /**
+     * With new app catalog thrift object integration, we don't use this
+     * @param xml
+     * @return
+     * @throws XmlException
+     */
+    @Deprecated
     public static JobDescriptor fromXML(String xml)
             throws XmlException {
         JobDescriptorDocument parse = JobDescriptorDocument.Factory


[12/44] fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 132c420..acd303a 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -992,8 +992,8 @@ import org.slf4j.LoggerFactory;
     /**
      * Update the given Local data movement details
      * 
-     * @param jobSubmissionInterfaceId
-     *   The identifier of the JobSubmission Interface to be updated.
+     * @param dataMovementInterfaceId
+     *   The identifier of the data movement Interface to be updated.
      * 
      * @param localDataMovement
      *   The LOCALDataMovement object to be updated.
@@ -1002,10 +1002,10 @@ import org.slf4j.LoggerFactory;
      *   Returns a success/failure of the update.
      * 
      * 
-     * @param jobSubmissionInterfaceId
+     * @param dataMovementInterfaceId
      * @param localDataMovement
      */
-    public boolean updateLocalDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public boolean updateLocalDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
      *         * This method returns local datamovement object
@@ -1045,8 +1045,8 @@ import org.slf4j.LoggerFactory;
      * Update the given scp data movement details
      *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
      * 
-     * @param jobSubmissionInterfaceId
-     *   The identifier of the JobSubmission Interface to be updated.
+     * @param dataMovementInterfaceId
+     *   The identifier of the data movement Interface to be updated.
      * 
      * @param scpDataMovement
      *   The SCPDataMovement object to be updated.
@@ -1055,10 +1055,10 @@ import org.slf4j.LoggerFactory;
      *   Returns a success/failure of the update.
      * 
      * 
-     * @param jobSubmissionInterfaceId
+     * @param dataMovementInterfaceId
      * @param scpDataMovement
      */
-    public boolean updateSCPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public boolean updateSCPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
      *   * This method returns SCP datamovement object
@@ -1098,8 +1098,8 @@ import org.slf4j.LoggerFactory;
      * Update the given GridFTP data movement details to a compute resource
      *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
      * 
-     * @param jobSubmissionInterfaceId
-     *   The identifier of the JobSubmission Interface to be updated.
+     * @param dataMovementInterfaceId
+     *   The identifier of the data movement Interface to be updated.
      * 
      * @param gridFTPDataMovement
      *   The GridFTPDataMovement object to be updated.
@@ -1108,10 +1108,10 @@ import org.slf4j.LoggerFactory;
      *   Returns a success/failure of the updation.
      * 
      * 
-     * @param jobSubmissionInterfaceId
+     * @param dataMovementInterfaceId
      * @param gridFTPDataMovement
      */
-    public boolean updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public boolean updateGridFTPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
      *   * This method returns GridFTP datamovement object
@@ -1198,9 +1198,10 @@ import org.slf4j.LoggerFactory;
      *   Returns a success/failure of the deletion.
      * 
      * 
+     * @param computeResourceId
      * @param jobSubmissionInterfaceId
      */
-    public boolean deleteJobSubmissionInterface(String jobSubmissionInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public boolean deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
      * Delete a given data movement interface
@@ -1212,9 +1213,10 @@ import org.slf4j.LoggerFactory;
      *   Returns a success/failure of the deletion.
      * 
      * 
+     * @param computeResourceId
      * @param dataMovementInterfaceId
      */
-    public boolean deleteDataMovementInterface(String dataMovementInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public boolean deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     public String registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
@@ -1511,19 +1513,19 @@ import org.slf4j.LoggerFactory;
 
     public void addLocalDataMovementDetails(String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void updateLocalDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void updateLocalDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getLocalDataMovement(String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void addSCPDataMovementDetails(String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void updateSCPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void updateSCPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getSCPDataMovement(String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void addGridFTPDataMovementDetails(String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void updateGridFTPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getGridFTPDataMovement(String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -1535,9 +1537,9 @@ import org.slf4j.LoggerFactory;
 
     public void changeDataMovementPriorities(Map<String,Integer> dataMovementPriorityMap, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void deleteJobSubmissionInterface(String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void deleteDataMovementInterface(String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -3639,16 +3641,16 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addLocalDataMovementDetails failed: unknown result");
     }
 
-    public boolean updateLocalDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public boolean updateLocalDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_updateLocalDataMovementDetails(jobSubmissionInterfaceId, localDataMovement);
+      send_updateLocalDataMovementDetails(dataMovementInterfaceId, localDataMovement);
       return recv_updateLocalDataMovementDetails();
     }
 
-    public void send_updateLocalDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.thrift.TException
+    public void send_updateLocalDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement) throws org.apache.thrift.TException
     {
       updateLocalDataMovementDetails_args args = new updateLocalDataMovementDetails_args();
-      args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+      args.setDataMovementInterfaceId(dataMovementInterfaceId);
       args.setLocalDataMovement(localDataMovement);
       sendBase("updateLocalDataMovementDetails", args);
     }
@@ -3738,16 +3740,16 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSCPDataMovementDetails failed: unknown result");
     }
 
-    public boolean updateSCPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public boolean updateSCPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_updateSCPDataMovementDetails(jobSubmissionInterfaceId, scpDataMovement);
+      send_updateSCPDataMovementDetails(dataMovementInterfaceId, scpDataMovement);
       return recv_updateSCPDataMovementDetails();
     }
 
-    public void send_updateSCPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.thrift.TException
+    public void send_updateSCPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement) throws org.apache.thrift.TException
     {
       updateSCPDataMovementDetails_args args = new updateSCPDataMovementDetails_args();
-      args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+      args.setDataMovementInterfaceId(dataMovementInterfaceId);
       args.setScpDataMovement(scpDataMovement);
       sendBase("updateSCPDataMovementDetails", args);
     }
@@ -3837,16 +3839,16 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGridFTPDataMovementDetails failed: unknown result");
     }
 
-    public boolean updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public boolean updateGridFTPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_updateGridFTPDataMovementDetails(jobSubmissionInterfaceId, gridFTPDataMovement);
+      send_updateGridFTPDataMovementDetails(dataMovementInterfaceId, gridFTPDataMovement);
       return recv_updateGridFTPDataMovementDetails();
     }
 
-    public void send_updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.thrift.TException
+    public void send_updateGridFTPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement) throws org.apache.thrift.TException
     {
       updateGridFTPDataMovementDetails_args args = new updateGridFTPDataMovementDetails_args();
-      args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+      args.setDataMovementInterfaceId(dataMovementInterfaceId);
       args.setGridFTPDataMovement(gridFTPDataMovement);
       sendBase("updateGridFTPDataMovementDetails", args);
     }
@@ -4032,15 +4034,16 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "changeDataMovementPriorities failed: unknown result");
     }
 
-    public boolean deleteJobSubmissionInterface(String jobSubmissionInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public boolean deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_deleteJobSubmissionInterface(jobSubmissionInterfaceId);
+      send_deleteJobSubmissionInterface(computeResourceId, jobSubmissionInterfaceId);
       return recv_deleteJobSubmissionInterface();
     }
 
-    public void send_deleteJobSubmissionInterface(String jobSubmissionInterfaceId) throws org.apache.thrift.TException
+    public void send_deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws org.apache.thrift.TException
     {
       deleteJobSubmissionInterface_args args = new deleteJobSubmissionInterface_args();
+      args.setComputeResourceId(computeResourceId);
       args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
       sendBase("deleteJobSubmissionInterface", args);
     }
@@ -4064,15 +4067,16 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteJobSubmissionInterface failed: unknown result");
     }
 
-    public boolean deleteDataMovementInterface(String dataMovementInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public boolean deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_deleteDataMovementInterface(dataMovementInterfaceId);
+      send_deleteDataMovementInterface(computeResourceId, dataMovementInterfaceId);
       return recv_deleteDataMovementInterface();
     }
 
-    public void send_deleteDataMovementInterface(String dataMovementInterfaceId) throws org.apache.thrift.TException
+    public void send_deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws org.apache.thrift.TException
     {
       deleteDataMovementInterface_args args = new deleteDataMovementInterface_args();
+      args.setComputeResourceId(computeResourceId);
       args.setDataMovementInterfaceId(dataMovementInterfaceId);
       sendBase("deleteDataMovementInterface", args);
     }
@@ -6635,26 +6639,26 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void updateLocalDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void updateLocalDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateLocalDataMovementDetails_call method_call = new updateLocalDataMovementDetails_call(jobSubmissionInterfaceId, localDataMovement, resultHandler, this, ___protocolFactory, ___transport);
+      updateLocalDataMovementDetails_call method_call = new updateLocalDataMovementDetails_call(dataMovementInterfaceId, localDataMovement, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateLocalDataMovementDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String jobSubmissionInterfaceId;
+      private String dataMovementInterfaceId;
       private org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement;
-      public updateLocalDataMovementDetails_call(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public updateLocalDataMovementDetails_call(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
-        this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+        this.dataMovementInterfaceId = dataMovementInterfaceId;
         this.localDataMovement = localDataMovement;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLocalDataMovementDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateLocalDataMovementDetails_args args = new updateLocalDataMovementDetails_args();
-        args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+        args.setDataMovementInterfaceId(dataMovementInterfaceId);
         args.setLocalDataMovement(localDataMovement);
         args.write(prot);
         prot.writeMessageEnd();
@@ -6740,26 +6744,26 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void updateSCPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void updateSCPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateSCPDataMovementDetails_call method_call = new updateSCPDataMovementDetails_call(jobSubmissionInterfaceId, scpDataMovement, resultHandler, this, ___protocolFactory, ___transport);
+      updateSCPDataMovementDetails_call method_call = new updateSCPDataMovementDetails_call(dataMovementInterfaceId, scpDataMovement, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateSCPDataMovementDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String jobSubmissionInterfaceId;
+      private String dataMovementInterfaceId;
       private org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement;
-      public updateSCPDataMovementDetails_call(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public updateSCPDataMovementDetails_call(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
-        this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+        this.dataMovementInterfaceId = dataMovementInterfaceId;
         this.scpDataMovement = scpDataMovement;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSCPDataMovementDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateSCPDataMovementDetails_args args = new updateSCPDataMovementDetails_args();
-        args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+        args.setDataMovementInterfaceId(dataMovementInterfaceId);
         args.setScpDataMovement(scpDataMovement);
         args.write(prot);
         prot.writeMessageEnd();
@@ -6845,26 +6849,26 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void updateGridFTPDataMovementDetails(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateGridFTPDataMovementDetails_call method_call = new updateGridFTPDataMovementDetails_call(jobSubmissionInterfaceId, gridFTPDataMovement, resultHandler, this, ___protocolFactory, ___transport);
+      updateGridFTPDataMovementDetails_call method_call = new updateGridFTPDataMovementDetails_call(dataMovementInterfaceId, gridFTPDataMovement, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateGridFTPDataMovementDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String jobSubmissionInterfaceId;
+      private String dataMovementInterfaceId;
       private org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement;
-      public updateGridFTPDataMovementDetails_call(String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public updateGridFTPDataMovementDetails_call(String dataMovementInterfaceId, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
-        this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+        this.dataMovementInterfaceId = dataMovementInterfaceId;
         this.gridFTPDataMovement = gridFTPDataMovement;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGridFTPDataMovementDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateGridFTPDataMovementDetails_args args = new updateGridFTPDataMovementDetails_args();
-        args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+        args.setDataMovementInterfaceId(dataMovementInterfaceId);
         args.setGridFTPDataMovement(gridFTPDataMovement);
         args.write(prot);
         prot.writeMessageEnd();
@@ -7046,23 +7050,26 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void deleteJobSubmissionInterface(String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      deleteJobSubmissionInterface_call method_call = new deleteJobSubmissionInterface_call(jobSubmissionInterfaceId, resultHandler, this, ___protocolFactory, ___transport);
+      deleteJobSubmissionInterface_call method_call = new deleteJobSubmissionInterface_call(computeResourceId, jobSubmissionInterfaceId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class deleteJobSubmissionInterface_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
       private String jobSubmissionInterfaceId;
-      public deleteJobSubmissionInterface_call(String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public deleteJobSubmissionInterface_call(String computeResourceId, String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
         this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteJobSubmissionInterface", org.apache.thrift.protocol.TMessageType.CALL, 0));
         deleteJobSubmissionInterface_args args = new deleteJobSubmissionInterface_args();
+        args.setComputeResourceId(computeResourceId);
         args.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -7078,23 +7085,26 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void deleteDataMovementInterface(String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteDataMovementInterface(String computeResourceId, String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      deleteDataMovementInterface_call method_call = new deleteDataMovementInterface_call(dataMovementInterfaceId, resultHandler, this, ___protocolFactory, ___transport);
+      deleteDataMovementInterface_call method_call = new deleteDataMovementInterface_call(computeResourceId, dataMovementInterfaceId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class deleteDataMovementInterface_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
       private String dataMovementInterfaceId;
-      public deleteDataMovementInterface_call(String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public deleteDataMovementInterface_call(String computeResourceId, String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
         this.dataMovementInterfaceId = dataMovementInterfaceId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDataMovementInterface", org.apache.thrift.protocol.TMessageType.CALL, 0));
         deleteDataMovementInterface_args args = new deleteDataMovementInterface_args();
+        args.setComputeResourceId(computeResourceId);
         args.setDataMovementInterfaceId(dataMovementInterfaceId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -9462,7 +9472,7 @@ import org.slf4j.LoggerFactory;
       public updateLocalDataMovementDetails_result getResult(I iface, updateLocalDataMovementDetails_args args) throws org.apache.thrift.TException {
         updateLocalDataMovementDetails_result result = new updateLocalDataMovementDetails_result();
         try {
-          result.success = iface.updateLocalDataMovementDetails(args.jobSubmissionInterfaceId, args.localDataMovement);
+          result.success = iface.updateLocalDataMovementDetails(args.dataMovementInterfaceId, args.localDataMovement);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -9547,7 +9557,7 @@ import org.slf4j.LoggerFactory;
       public updateSCPDataMovementDetails_result getResult(I iface, updateSCPDataMovementDetails_args args) throws org.apache.thrift.TException {
         updateSCPDataMovementDetails_result result = new updateSCPDataMovementDetails_result();
         try {
-          result.success = iface.updateSCPDataMovementDetails(args.jobSubmissionInterfaceId, args.scpDataMovement);
+          result.success = iface.updateSCPDataMovementDetails(args.dataMovementInterfaceId, args.scpDataMovement);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -9632,7 +9642,7 @@ import org.slf4j.LoggerFactory;
       public updateGridFTPDataMovementDetails_result getResult(I iface, updateGridFTPDataMovementDetails_args args) throws org.apache.thrift.TException {
         updateGridFTPDataMovementDetails_result result = new updateGridFTPDataMovementDetails_result();
         try {
-          result.success = iface.updateGridFTPDataMovementDetails(args.jobSubmissionInterfaceId, args.gridFTPDataMovement);
+          result.success = iface.updateGridFTPDataMovementDetails(args.dataMovementInterfaceId, args.gridFTPDataMovement);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -9805,7 +9815,7 @@ import org.slf4j.LoggerFactory;
       public deleteJobSubmissionInterface_result getResult(I iface, deleteJobSubmissionInterface_args args) throws org.apache.thrift.TException {
         deleteJobSubmissionInterface_result result = new deleteJobSubmissionInterface_result();
         try {
-          result.success = iface.deleteJobSubmissionInterface(args.jobSubmissionInterfaceId);
+          result.success = iface.deleteJobSubmissionInterface(args.computeResourceId, args.jobSubmissionInterfaceId);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -9834,7 +9844,7 @@ import org.slf4j.LoggerFactory;
       public deleteDataMovementInterface_result getResult(I iface, deleteDataMovementInterface_args args) throws org.apache.thrift.TException {
         deleteDataMovementInterface_result result = new deleteDataMovementInterface_result();
         try {
-          result.success = iface.deleteDataMovementInterface(args.dataMovementInterfaceId);
+          result.success = iface.deleteDataMovementInterface(args.computeResourceId, args.dataMovementInterfaceId);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -14658,7 +14668,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, updateLocalDataMovementDetails_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateLocalDataMovementDetails(args.jobSubmissionInterfaceId, args.localDataMovement,resultHandler);
+        iface.updateLocalDataMovementDetails(args.dataMovementInterfaceId, args.localDataMovement,resultHandler);
       }
     }
 
@@ -14860,7 +14870,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, updateSCPDataMovementDetails_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateSCPDataMovementDetails(args.jobSubmissionInterfaceId, args.scpDataMovement,resultHandler);
+        iface.updateSCPDataMovementDetails(args.dataMovementInterfaceId, args.scpDataMovement,resultHandler);
       }
     }
 
@@ -15062,7 +15072,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, updateGridFTPDataMovementDetails_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateGridFTPDataMovementDetails(args.jobSubmissionInterfaceId, args.gridFTPDataMovement,resultHandler);
+        iface.updateGridFTPDataMovementDetails(args.dataMovementInterfaceId, args.gridFTPDataMovement,resultHandler);
       }
     }
 
@@ -15469,7 +15479,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, deleteJobSubmissionInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteJobSubmissionInterface(args.jobSubmissionInterfaceId,resultHandler);
+        iface.deleteJobSubmissionInterface(args.computeResourceId, args.jobSubmissionInterfaceId,resultHandler);
       }
     }
 
@@ -15537,7 +15547,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, deleteDataMovementInterface_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteDataMovementInterface(args.dataMovementInterfaceId,resultHandler);
+        iface.deleteDataMovementInterface(args.computeResourceId, args.dataMovementInterfaceId,resultHandler);
       }
     }
 
@@ -84061,7 +84071,7 @@ import org.slf4j.LoggerFactory;
   public static class updateLocalDataMovementDetails_args implements org.apache.thrift.TBase<updateLocalDataMovementDetails_args, updateLocalDataMovementDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLocalDataMovementDetails_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLocalDataMovementDetails_args");
 
-    private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
     private static final org.apache.thrift.protocol.TField LOCAL_DATA_MOVEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("localDataMovement", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -84070,12 +84080,12 @@ import org.slf4j.LoggerFactory;
       schemes.put(TupleScheme.class, new updateLocalDataMovementDetails_argsTupleSchemeFactory());
     }
 
-    public String jobSubmissionInterfaceId; // required
+    public String dataMovementInterfaceId; // required
     public org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+      DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
       LOCAL_DATA_MOVEMENT((short)2, "localDataMovement");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -84091,8 +84101,8 @@ import org.slf4j.LoggerFactory;
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // JOB_SUBMISSION_INTERFACE_ID
-            return JOB_SUBMISSION_INTERFACE_ID;
+          case 1: // DATA_MOVEMENT_INTERFACE_ID
+            return DATA_MOVEMENT_INTERFACE_ID;
           case 2: // LOCAL_DATA_MOVEMENT
             return LOCAL_DATA_MOVEMENT;
           default:
@@ -84138,7 +84148,7 @@ import org.slf4j.LoggerFactory;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+      tmpMap.put(_Fields.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.LOCAL_DATA_MOVEMENT, new org.apache.thrift.meta_data.FieldMetaData("localDataMovement", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement.class)));
@@ -84150,11 +84160,11 @@ import org.slf4j.LoggerFactory;
     }
 
     public updateLocalDataMovementDetails_args(
-      String jobSubmissionInterfaceId,
+      String dataMovementInterfaceId,
       org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement localDataMovement)
     {
       this();
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       this.localDataMovement = localDataMovement;
     }
 
@@ -84162,8 +84172,8 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public updateLocalDataMovementDetails_args(updateLocalDataMovementDetails_args other) {
-      if (other.isSetJobSubmissionInterfaceId()) {
-        this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+      if (other.isSetDataMovementInterfaceId()) {
+        this.dataMovementInterfaceId = other.dataMovementInterfaceId;
       }
       if (other.isSetLocalDataMovement()) {
         this.localDataMovement = new org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement(other.localDataMovement);
@@ -84176,31 +84186,31 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public void clear() {
-      this.jobSubmissionInterfaceId = null;
+      this.dataMovementInterfaceId = null;
       this.localDataMovement = null;
     }
 
-    public String getJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId;
+    public String getDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId;
     }
 
-    public updateLocalDataMovementDetails_args setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+    public updateLocalDataMovementDetails_args setDataMovementInterfaceId(String dataMovementInterfaceId) {
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       return this;
     }
 
-    public void unsetJobSubmissionInterfaceId() {
-      this.jobSubmissionInterfaceId = null;
+    public void unsetDataMovementInterfaceId() {
+      this.dataMovementInterfaceId = null;
     }
 
-    /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
-    public boolean isSetJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId != null;
+    /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+    public boolean isSetDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId != null;
     }
 
-    public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+    public void setDataMovementInterfaceIdIsSet(boolean value) {
       if (!value) {
-        this.jobSubmissionInterfaceId = null;
+        this.dataMovementInterfaceId = null;
       }
     }
 
@@ -84230,11 +84240,11 @@ import org.slf4j.LoggerFactory;
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
+      case DATA_MOVEMENT_INTERFACE_ID:
         if (value == null) {
-          unsetJobSubmissionInterfaceId();
+          unsetDataMovementInterfaceId();
         } else {
-          setJobSubmissionInterfaceId((String)value);
+          setDataMovementInterfaceId((String)value);
         }
         break;
 
@@ -84251,8 +84261,8 @@ import org.slf4j.LoggerFactory;
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return getJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return getDataMovementInterfaceId();
 
       case LOCAL_DATA_MOVEMENT:
         return getLocalDataMovement();
@@ -84268,8 +84278,8 @@ import org.slf4j.LoggerFactory;
       }
 
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return isSetJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return isSetDataMovementInterfaceId();
       case LOCAL_DATA_MOVEMENT:
         return isSetLocalDataMovement();
       }
@@ -84289,12 +84299,12 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
-      boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
-      if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
-        if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+      boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+      boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+      if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+        if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
           return false;
-        if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+        if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
           return false;
       }
 
@@ -84323,12 +84333,12 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+      lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetJobSubmissionInterfaceId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+      if (isSetDataMovementInterfaceId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -84363,11 +84373,11 @@ import org.slf4j.LoggerFactory;
       StringBuilder sb = new StringBuilder("updateLocalDataMovementDetails_args(");
       boolean first = true;
 
-      sb.append("jobSubmissionInterfaceId:");
-      if (this.jobSubmissionInterfaceId == null) {
+      sb.append("dataMovementInterfaceId:");
+      if (this.dataMovementInterfaceId == null) {
         sb.append("null");
       } else {
-        sb.append(this.jobSubmissionInterfaceId);
+        sb.append(this.dataMovementInterfaceId);
       }
       first = false;
       if (!first) sb.append(", ");
@@ -84384,8 +84394,8 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (jobSubmissionInterfaceId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' was not present! Struct: " + toString());
+      if (dataMovementInterfaceId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' was not present! Struct: " + toString());
       }
       if (localDataMovement == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'localDataMovement' was not present! Struct: " + toString());
@@ -84430,10 +84440,10 @@ import org.slf4j.LoggerFactory;
             break;
           }
           switch (schemeField.id) {
-            case 1: // JOB_SUBMISSION_INTERFACE_ID
+            case 1: // DATA_MOVEMENT_INTERFACE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.jobSubmissionInterfaceId = iprot.readString();
-                struct.setJobSubmissionInterfaceIdIsSet(true);
+                struct.dataMovementInterfaceId = iprot.readString();
+                struct.setDataMovementInterfaceIdIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -84462,9 +84472,9 @@ import org.slf4j.LoggerFactory;
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.jobSubmissionInterfaceId != null) {
-          oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
-          oprot.writeString(struct.jobSubmissionInterfaceId);
+        if (struct.dataMovementInterfaceId != null) {
+          oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+          oprot.writeString(struct.dataMovementInterfaceId);
           oprot.writeFieldEnd();
         }
         if (struct.localDataMovement != null) {
@@ -84489,15 +84499,15 @@ import org.slf4j.LoggerFactory;
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, updateLocalDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.jobSubmissionInterfaceId);
+        oprot.writeString(struct.dataMovementInterfaceId);
         struct.localDataMovement.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, updateLocalDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.jobSubmissionInterfaceId = iprot.readString();
-        struct.setJobSubmissionInterfaceIdIsSet(true);
+        struct.dataMovementInterfaceId = iprot.readString();
+        struct.setDataMovementInterfaceIdIsSet(true);
         struct.localDataMovement = new org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement();
         struct.localDataMovement.read(iprot);
         struct.setLocalDataMovementIsSet(true);
@@ -87384,7 +87394,7 @@ import org.slf4j.LoggerFactory;
   public static class updateSCPDataMovementDetails_args implements org.apache.thrift.TBase<updateSCPDataMovementDetails_args, updateSCPDataMovementDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateSCPDataMovementDetails_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSCPDataMovementDetails_args");
 
-    private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
     private static final org.apache.thrift.protocol.TField SCP_DATA_MOVEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("scpDataMovement", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -87393,12 +87403,12 @@ import org.slf4j.LoggerFactory;
       schemes.put(TupleScheme.class, new updateSCPDataMovementDetails_argsTupleSchemeFactory());
     }
 
-    public String jobSubmissionInterfaceId; // required
+    public String dataMovementInterfaceId; // required
     public org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+      DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
       SCP_DATA_MOVEMENT((short)2, "scpDataMovement");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -87414,8 +87424,8 @@ import org.slf4j.LoggerFactory;
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // JOB_SUBMISSION_INTERFACE_ID
-            return JOB_SUBMISSION_INTERFACE_ID;
+          case 1: // DATA_MOVEMENT_INTERFACE_ID
+            return DATA_MOVEMENT_INTERFACE_ID;
           case 2: // SCP_DATA_MOVEMENT
             return SCP_DATA_MOVEMENT;
           default:
@@ -87461,7 +87471,7 @@ import org.slf4j.LoggerFactory;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+      tmpMap.put(_Fields.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.SCP_DATA_MOVEMENT, new org.apache.thrift.meta_data.FieldMetaData("scpDataMovement", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement.class)));
@@ -87473,11 +87483,11 @@ import org.slf4j.LoggerFactory;
     }
 
     public updateSCPDataMovementDetails_args(
-      String jobSubmissionInterfaceId,
+      String dataMovementInterfaceId,
       org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement scpDataMovement)
     {
       this();
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       this.scpDataMovement = scpDataMovement;
     }
 
@@ -87485,8 +87495,8 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public updateSCPDataMovementDetails_args(updateSCPDataMovementDetails_args other) {
-      if (other.isSetJobSubmissionInterfaceId()) {
-        this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+      if (other.isSetDataMovementInterfaceId()) {
+        this.dataMovementInterfaceId = other.dataMovementInterfaceId;
       }
       if (other.isSetScpDataMovement()) {
         this.scpDataMovement = new org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement(other.scpDataMovement);
@@ -87499,31 +87509,31 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public void clear() {
-      this.jobSubmissionInterfaceId = null;
+      this.dataMovementInterfaceId = null;
       this.scpDataMovement = null;
     }
 
-    public String getJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId;
+    public String getDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId;
     }
 
-    public updateSCPDataMovementDetails_args setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+    public updateSCPDataMovementDetails_args setDataMovementInterfaceId(String dataMovementInterfaceId) {
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       return this;
     }
 
-    public void unsetJobSubmissionInterfaceId() {
-      this.jobSubmissionInterfaceId = null;
+    public void unsetDataMovementInterfaceId() {
+      this.dataMovementInterfaceId = null;
     }
 
-    /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
-    public boolean isSetJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId != null;
+    /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+    public boolean isSetDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId != null;
     }
 
-    public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+    public void setDataMovementInterfaceIdIsSet(boolean value) {
       if (!value) {
-        this.jobSubmissionInterfaceId = null;
+        this.dataMovementInterfaceId = null;
       }
     }
 
@@ -87553,11 +87563,11 @@ import org.slf4j.LoggerFactory;
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
+      case DATA_MOVEMENT_INTERFACE_ID:
         if (value == null) {
-          unsetJobSubmissionInterfaceId();
+          unsetDataMovementInterfaceId();
         } else {
-          setJobSubmissionInterfaceId((String)value);
+          setDataMovementInterfaceId((String)value);
         }
         break;
 
@@ -87574,8 +87584,8 @@ import org.slf4j.LoggerFactory;
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return getJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return getDataMovementInterfaceId();
 
       case SCP_DATA_MOVEMENT:
         return getScpDataMovement();
@@ -87591,8 +87601,8 @@ import org.slf4j.LoggerFactory;
       }
 
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return isSetJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return isSetDataMovementInterfaceId();
       case SCP_DATA_MOVEMENT:
         return isSetScpDataMovement();
       }
@@ -87612,12 +87622,12 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
-      boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
-      if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
-        if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+      boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+      boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+      if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+        if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
           return false;
-        if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+        if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
           return false;
       }
 
@@ -87646,12 +87656,12 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+      lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetJobSubmissionInterfaceId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+      if (isSetDataMovementInterfaceId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -87686,11 +87696,11 @@ import org.slf4j.LoggerFactory;
       StringBuilder sb = new StringBuilder("updateSCPDataMovementDetails_args(");
       boolean first = true;
 
-      sb.append("jobSubmissionInterfaceId:");
-      if (this.jobSubmissionInterfaceId == null) {
+      sb.append("dataMovementInterfaceId:");
+      if (this.dataMovementInterfaceId == null) {
         sb.append("null");
       } else {
-        sb.append(this.jobSubmissionInterfaceId);
+        sb.append(this.dataMovementInterfaceId);
       }
       first = false;
       if (!first) sb.append(", ");
@@ -87707,8 +87717,8 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (jobSubmissionInterfaceId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' was not present! Struct: " + toString());
+      if (dataMovementInterfaceId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' was not present! Struct: " + toString());
       }
       if (scpDataMovement == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'scpDataMovement' was not present! Struct: " + toString());
@@ -87753,10 +87763,10 @@ import org.slf4j.LoggerFactory;
             break;
           }
           switch (schemeField.id) {
-            case 1: // JOB_SUBMISSION_INTERFACE_ID
+            case 1: // DATA_MOVEMENT_INTERFACE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.jobSubmissionInterfaceId = iprot.readString();
-                struct.setJobSubmissionInterfaceIdIsSet(true);
+                struct.dataMovementInterfaceId = iprot.readString();
+                struct.setDataMovementInterfaceIdIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -87785,9 +87795,9 @@ import org.slf4j.LoggerFactory;
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.jobSubmissionInterfaceId != null) {
-          oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
-          oprot.writeString(struct.jobSubmissionInterfaceId);
+        if (struct.dataMovementInterfaceId != null) {
+          oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+          oprot.writeString(struct.dataMovementInterfaceId);
           oprot.writeFieldEnd();
         }
         if (struct.scpDataMovement != null) {
@@ -87812,15 +87822,15 @@ import org.slf4j.LoggerFactory;
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, updateSCPDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.jobSubmissionInterfaceId);
+        oprot.writeString(struct.dataMovementInterfaceId);
         struct.scpDataMovement.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, updateSCPDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.jobSubmissionInterfaceId = iprot.readString();
-        struct.setJobSubmissionInterfaceIdIsSet(true);
+        struct.dataMovementInterfaceId = iprot.readString();
+        struct.setDataMovementInterfaceIdIsSet(true);
         struct.scpDataMovement = new org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement();
         struct.scpDataMovement.read(iprot);
         struct.setScpDataMovementIsSet(true);
@@ -90707,7 +90717,7 @@ import org.slf4j.LoggerFactory;
   public static class updateGridFTPDataMovementDetails_args implements org.apache.thrift.TBase<updateGridFTPDataMovementDetails_args, updateGridFTPDataMovementDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateGridFTPDataMovementDetails_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGridFTPDataMovementDetails_args");
 
-    private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
     private static final org.apache.thrift.protocol.TField GRID_FTPDATA_MOVEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("gridFTPDataMovement", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -90716,12 +90726,12 @@ import org.slf4j.LoggerFactory;
       schemes.put(TupleScheme.class, new updateGridFTPDataMovementDetails_argsTupleSchemeFactory());
     }
 
-    public String jobSubmissionInterfaceId; // required
+    public String dataMovementInterfaceId; // required
     public org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+      DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
       GRID_FTPDATA_MOVEMENT((short)2, "gridFTPDataMovement");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -90737,8 +90747,8 @@ import org.slf4j.LoggerFactory;
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // JOB_SUBMISSION_INTERFACE_ID
-            return JOB_SUBMISSION_INTERFACE_ID;
+          case 1: // DATA_MOVEMENT_INTERFACE_ID
+            return DATA_MOVEMENT_INTERFACE_ID;
           case 2: // GRID_FTPDATA_MOVEMENT
             return GRID_FTPDATA_MOVEMENT;
           default:
@@ -90784,7 +90794,7 @@ import org.slf4j.LoggerFactory;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+      tmpMap.put(_Fields.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.GRID_FTPDATA_MOVEMENT, new org.apache.thrift.meta_data.FieldMetaData("gridFTPDataMovement", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement.class)));
@@ -90796,11 +90806,11 @@ import org.slf4j.LoggerFactory;
     }
 
     public updateGridFTPDataMovementDetails_args(
-      String jobSubmissionInterfaceId,
+      String dataMovementInterfaceId,
       org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement gridFTPDataMovement)
     {
       this();
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       this.gridFTPDataMovement = gridFTPDataMovement;
     }
 
@@ -90808,8 +90818,8 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public updateGridFTPDataMovementDetails_args(updateGridFTPDataMovementDetails_args other) {
-      if (other.isSetJobSubmissionInterfaceId()) {
-        this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+      if (other.isSetDataMovementInterfaceId()) {
+        this.dataMovementInterfaceId = other.dataMovementInterfaceId;
       }
       if (other.isSetGridFTPDataMovement()) {
         this.gridFTPDataMovement = new org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement(other.gridFTPDataMovement);
@@ -90822,31 +90832,31 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public void clear() {
-      this.jobSubmissionInterfaceId = null;
+      this.dataMovementInterfaceId = null;
       this.gridFTPDataMovement = null;
     }
 
-    public String getJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId;
+    public String getDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId;
     }
 
-    public updateGridFTPDataMovementDetails_args setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
-      this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+    public updateGridFTPDataMovementDetails_args setDataMovementInterfaceId(String dataMovementInterfaceId) {
+      this.dataMovementInterfaceId = dataMovementInterfaceId;
       return this;
     }
 
-    public void unsetJobSubmissionInterfaceId() {
-      this.jobSubmissionInterfaceId = null;
+    public void unsetDataMovementInterfaceId() {
+      this.dataMovementInterfaceId = null;
     }
 
-    /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
-    public boolean isSetJobSubmissionInterfaceId() {
-      return this.jobSubmissionInterfaceId != null;
+    /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+    public boolean isSetDataMovementInterfaceId() {
+      return this.dataMovementInterfaceId != null;
     }
 
-    public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+    public void setDataMovementInterfaceIdIsSet(boolean value) {
       if (!value) {
-        this.jobSubmissionInterfaceId = null;
+        this.dataMovementInterfaceId = null;
       }
     }
 
@@ -90876,11 +90886,11 @@ import org.slf4j.LoggerFactory;
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
+      case DATA_MOVEMENT_INTERFACE_ID:
         if (value == null) {
-          unsetJobSubmissionInterfaceId();
+          unsetDataMovementInterfaceId();
         } else {
-          setJobSubmissionInterfaceId((String)value);
+          setDataMovementInterfaceId((String)value);
         }
         break;
 
@@ -90897,8 +90907,8 @@ import org.slf4j.LoggerFactory;
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return getJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return getDataMovementInterfaceId();
 
       case GRID_FTPDATA_MOVEMENT:
         return getGridFTPDataMovement();
@@ -90914,8 +90924,8 @@ import org.slf4j.LoggerFactory;
       }
 
       switch (field) {
-      case JOB_SUBMISSION_INTERFACE_ID:
-        return isSetJobSubmissionInterfaceId();
+      case DATA_MOVEMENT_INTERFACE_ID:
+        return isSetDataMovementInterfaceId();
       case GRID_FTPDATA_MOVEMENT:
         return isSetGridFTPDataMovement();
       }
@@ -90935,12 +90945,12 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
-      boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
-      if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
-        if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+      boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+      boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+      if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+        if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
           return false;
-        if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+        if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
           return false;
       }
 
@@ -90969,12 +90979,12 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+      lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetJobSubmissionInterfaceId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+      if (isSetDataMovementInterfaceId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -91009,11 +91019,11 @@ import org.slf4j.LoggerFactory;
       StringBuilder sb = new StringBuilder("updateGridFTPDataMovementDetails_args(");
       boolean first = true;
 
-      sb.append("jobSubmissionInterfaceId:");
-      if (this.jobSubmissionInterfaceId == null) {
+      sb.append("dataMovementInterfaceId:");
+      if (this.dataMovementInterfaceId == null) {
         sb.append("null");
       } else {
-        sb.append(this.jobSubmissionInterfaceId);
+        sb.append(this.dataMovementInterfaceId);
       }
       first = false;
       if (!first) sb.append(", ");
@@ -91030,8 +91040,8 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (jobSubmissionInterfaceId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' was not present! Struct: " + toString());
+      if (dataMovementInterfaceId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' was not present! Struct: " + toString());
       }
       if (gridFTPDataMovement == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'gridFTPDataMovement' was not present! Struct: " + toString());
@@ -91076,10 +91086,10 @@ import org.slf4j.LoggerFactory;
             break;
           }
           switch (schemeField.id) {
-            case 1: // JOB_SUBMISSION_INTERFACE_ID
+            case 1: // DATA_MOVEMENT_INTERFACE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.jobSubmissionInterfaceId = iprot.readString();
-                struct.setJobSubmissionInterfaceIdIsSet(true);
+                struct.dataMovementInterfaceId = iprot.readString();
+                struct.setDataMovementInterfaceIdIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -91108,9 +91118,9 @@ import org.slf4j.LoggerFactory;
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.jobSubmissionInterfaceId != null) {
-          oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
-          oprot.writeString(struct.jobSubmissionInterfaceId);
+        if (struct.dataMovementInterfaceId != null) {
+          oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+          oprot.writeString(struct.dataMovementInterfaceId);
           oprot.writeFieldEnd();
         }
         if (struct.gridFTPDataMovement != null) {
@@ -91135,15 +91145,15 @@ import org.slf4j.LoggerFactory;
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, updateGridFTPDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.jobSubmissionInterfaceId);
+        oprot.writeString(struct.dataMovementInterfaceId);
         struct.gridFTPDataMovement.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, updateGridFTPDataMovementDetails_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.jobSubmissionInterfaceId = iprot.readString();
-        struct.setJobSubmissionInterfaceIdIsSet(true);
+        struct.dataMovementInterfaceId = iprot.readString();
+        struct.setDataMovementInterfaceIdIsSet(true);
         struct.gridFTPDataMovement = new org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement();
         struct.gridFTPDataMovement.read(iprot);
         struct.setGridFTPDataMovementIsSet(true);
@@ -97149,7 +97159,8 @@ import org.slf4j.LoggerFactory;
   public static class deleteJobSubmissionInterface_args implements org.apache.thrift.TBase<deleteJobSubmissionInterface_args, deleteJobSubmissionInterface_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteJobSubmissionInterface_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteJobSubmissionInterface_args");
 
-    private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -97157,11 +97168,13 @@ import org.slf4j.LoggerFactory;
       schemes.put(TupleScheme.class, new deleteJobSubmissionInterface_argsTupleSchemeFactory());
     }
 
+    public String computeResourceId; // required
     public String jobSubmissionInterfaceId; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId");
+      COMPUTE_RESOURCE_ID((short)1, "computeResourceId"),
+      JOB_SUBMISSION_INTERFACE_ID((short)2, "jobSubmissionInterfaceId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -97176,7 +97189,9 @@ import org.slf4j.LoggerFactory;
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // JOB_SUBMISSION_INTERFACE_ID
+          case 1: // COMPUTE_RESOURCE_ID
+            return COMPUTE_RESOURCE_ID;
+          case 2: // JOB_SUBMISSION_INTERFACE_ID
             return JOB_SUBMISSION_INTERFACE_ID;
           default:
             return null;
@@ -97221,6 +97236,8 @@ import org.slf4j.LoggerFactory;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -97231,9 +97248,11 @@ import org.slf4j.LoggerFactory;
     }
 
     public deleteJobSubmissionInterface_args(
+      String computeResourceId,
       String jobSubmissionInterfaceId)
     {
       this();
+      this.computeResourceId = computeResourceId;
       this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
     }
 
@@ -97241,6 +97260,9 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public deleteJobSubmissionInterface_args(deleteJobSubmissionInterface_args other) {
+      if (other.isSetComputeResourceId()) {
+        this.computeResourceId = other.computeResourceId;
+      }
       if (other.isSetJobSubmissionInterfaceId()) {
         this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
       }
@@ -97252,9 +97274,34 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public void clear() {
+      this.computeResourceId = null;
       this.jobSubmissionInterfaceId = null;
     }
 
+    public String getComputeResourceId() {
+      return this.computeResourceId;
+    }
+
+    public deleteJobSubmissionInterface_args setComputeResourceId(String computeResourceId) {
+      this.computeResourceId = computeResourceId;
+      return this;
+    }
+
+    public void unsetComputeResourceId() {
+      this.computeResourceId = null;
+    }
+
+    /** Returns true if field computeResourceId is set (has been assigned a value) and false otherwise */
+    public boolean isSetComputeResourceId() {
+      return this.computeResourceId != null;
+    }
+
+    public void setComputeResourceIdIsSet(boolean value) {
+      if (!value) {
+        this.computeResourceId = null;
+      }
+    }
+
     public String getJobSubmissionInterfaceId() {
       return this.jobSubmissionInterfaceId;
     }
@@ -97281,6 +97328,14 @@ import org.slf4j.LoggerFactory;
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case COMPUTE_RESOURCE_ID:
+        if (value == null) {
+          unsetComputeResourceId();
+        } else {
+          setComputeResourceId((String)value);
+        }
+        break;
+
       case JOB_SUBMISSION_INTERFACE_ID:
         if (value == null) {
           unsetJobSubmissionInterfaceId();
@@ -97294,6 +97349,9 @@ import org.slf4j.LoggerFactory;
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case COMPUTE_RESOURCE_ID:
+        return getComputeResourceId();
+
       case JOB_SUBMISSION_INTERFACE_ID:
         return getJobSubmissionInterfaceId();
 
@@ -97308,6 +97366,8 @@ import org.slf4j.LoggerFactory;
       }
 
       switch (field) {
+      case COMPUTE_RESOURCE_ID:
+        return isSetComputeResourceId();
       case JOB_SUBMISSION_INTERFACE_ID:
         return isSetJobSubmissionInterfaceId();
       }
@@ -97327,6 +97387,15 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
+      boolean this_present_computeResourceId = true && this.isSetComputeResourceId();
+      boolean that_present_computeResourceId = true && that.isSetComputeResourceId();
+      if (this_present_computeResourceId || that_present_computeResourceId) {
+        if (!(this_present_computeResourceId && that_present_computeResourceId))
+          return false;
+        if (!this.computeResourceId.equals(that.computeResourceId))
+          return false;
+      }
+
       boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
       boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
       if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
@@ -97352,6 +97421,16 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
+      lastComparison = Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetComputeResourceId()) {
+        lastCompar

<TRUNCATED>

[05/44] git commit: fixing AIRAVATA-1494

Posted by ch...@apache.org.
fixing AIRAVATA-1494


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8b82bee9
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8b82bee9
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8b82bee9

Branch: refs/heads/gfac_appcatalog_int
Commit: 8b82bee96cc6e16b7f9c24b072f9c7cf76738d6c
Parents: b376951
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Oct 30 12:16:59 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Oct 30 12:16:59 2014 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    58 +
 .../java/org/apache/airavata/api/Airavata.java  | 25217 ++++++++++-------
 .../main/resources/lib/airavata/Airavata.cpp    |  4008 ++-
 .../src/main/resources/lib/airavata/Airavata.h  |   612 +
 .../lib/airavata/Airavata_server.skeleton.cpp   |    20 +
 .../resources/lib/Airavata/API/Airavata.php     |  1120 +
 .../airavataAPI.thrift                          |    19 +
 .../appcatalog/cpi/ComputeResource.java         |     7 +
 .../catalog/data/impl/ComputeResourceImpl.java  |    51 +-
 9 files changed, 19622 insertions(+), 11490 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index f329cfd..693ff14 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -2447,6 +2447,64 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public String registerResourceJobManager(ResourceJobManager resourceJobManager) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().addResourceJobManager(resourceJobManager);
+        } catch (AppCatalogException e) {
+            logger.errorId(resourceJobManager.getResourceJobManagerId(), "Error while adding resource job manager...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while adding resource job manager. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
+    public boolean updateResourceJobManager(String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            appCatalog.getComputeResource().updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager);
+            return true;
+        } catch (AppCatalogException e) {
+            logger.errorId(resourceJobManagerId, "Error while updating resource job manager...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while updating resource job manager. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
+    public ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getResourceJobManager(resourceJobManagerId);
+        } catch (AppCatalogException e) {
+            logger.errorId(resourceJobManagerId, "Error while retrieving resource job manager...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while retrieving resource job manager. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
+    public boolean deleteResourceJobManager(String resourceJobManagerId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            appCatalog.getComputeResource().deleteResourceJobManager(resourceJobManagerId);
+            return true;
+        } catch (AppCatalogException e) {
+            logger.errorId(resourceJobManagerId, "Error while deleting resource job manager...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while deleting resource job manager. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Register a Gateway Resource Profile.
      *


[03/44] fixing AIRAVATA-1494

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index 1aa8caa..7f5e807 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -18811,7 +18811,7 @@ uint32_t Airavata_deleteDataMovementInterface_presult::read(::apache::thrift::pr
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerResourceJobManager_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -18822,7 +18822,7 @@ uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::pr
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_gatewayResourceProfile = false;
+  bool isset_resourceJobManager = false;
 
   while (true)
   {
@@ -18834,8 +18834,8 @@ uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::pr
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += this->gatewayResourceProfile.read(iprot);
-          isset_gatewayResourceProfile = true;
+          xfer += this->resourceJobManager.read(iprot);
+          isset_resourceJobManager = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -18849,17 +18849,17 @@ uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::pr
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_gatewayResourceProfile)
+  if (!isset_resourceJobManager)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerResourceJobManager_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_args");
+  xfer += oprot->writeStructBegin("Airavata_registerResourceJobManager_args");
 
-  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 1);
-  xfer += this->gatewayResourceProfile.write(oprot);
+  xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->resourceJobManager.write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -18867,12 +18867,12 @@ uint32_t Airavata_registerGatewayResourceProfile_args::write(::apache::thrift::p
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerResourceJobManager_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_pargs");
+  xfer += oprot->writeStructBegin("Airavata_registerResourceJobManager_pargs");
 
-  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 1);
-  xfer += (*(this->gatewayResourceProfile)).write(oprot);
+  xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->resourceJobManager)).write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -18880,7 +18880,7 @@ uint32_t Airavata_registerGatewayResourceProfile_pargs::write(::apache::thrift::
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerResourceJobManager_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -18944,11 +18944,11 @@ uint32_t Airavata_registerGatewayResourceProfile_result::read(::apache::thrift::
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerResourceJobManager_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_result");
+  xfer += oprot->writeStructBegin("Airavata_registerResourceJobManager_result");
 
   if (this->__isset.success) {
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
@@ -18972,7 +18972,7 @@ uint32_t Airavata_registerGatewayResourceProfile_result::write(::apache::thrift:
   return xfer;
 }
 
-uint32_t Airavata_registerGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerResourceJobManager_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19036,7 +19036,7 @@ uint32_t Airavata_registerGatewayResourceProfile_presult::read(::apache::thrift:
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateResourceJobManager_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19047,7 +19047,8 @@ uint32_t Airavata_getGatewayResourceProfile_args::read(::apache::thrift::protoco
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_gatewayID = false;
+  bool isset_resourceJobManagerId = false;
+  bool isset_updatedResourceJobManager = false;
 
   while (true)
   {
@@ -19059,8 +19060,16 @@ uint32_t Airavata_getGatewayResourceProfile_args::read(::apache::thrift::protoco
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->gatewayID);
-          isset_gatewayID = true;
+          xfer += iprot->readString(this->resourceJobManagerId);
+          isset_resourceJobManagerId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->updatedResourceJobManager.read(iprot);
+          isset_updatedResourceJobManager = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -19074,17 +19083,23 @@ uint32_t Airavata_getGatewayResourceProfile_args::read(::apache::thrift::protoco
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_gatewayID)
+  if (!isset_resourceJobManagerId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_updatedResourceJobManager)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateResourceJobManager_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_args");
+  xfer += oprot->writeStructBegin("Airavata_updateResourceJobManager_args");
 
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->resourceJobManagerId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("updatedResourceJobManager", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->updatedResourceJobManager.write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19092,12 +19107,16 @@ uint32_t Airavata_getGatewayResourceProfile_args::write(::apache::thrift::protoc
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateResourceJobManager_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_pargs");
+  xfer += oprot->writeStructBegin("Airavata_updateResourceJobManager_pargs");
 
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->resourceJobManagerId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("updatedResourceJobManager", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->updatedResourceJobManager)).write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19105,7 +19124,7 @@ uint32_t Airavata_getGatewayResourceProfile_pargs::write(::apache::thrift::proto
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateResourceJobManager_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19126,8 +19145,8 @@ uint32_t Airavata_getGatewayResourceProfile_result::read(::apache::thrift::proto
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += this->success.read(iprot);
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19169,15 +19188,15 @@ uint32_t Airavata_getGatewayResourceProfile_result::read(::apache::thrift::proto
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateResourceJobManager_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_result");
+  xfer += oprot->writeStructBegin("Airavata_updateResourceJobManager_result");
 
   if (this->__isset.success) {
-    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
-    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
     xfer += oprot->writeFieldEnd();
   } else if (this->__isset.ire) {
     xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
@@ -19197,7 +19216,7 @@ uint32_t Airavata_getGatewayResourceProfile_result::write(::apache::thrift::prot
   return xfer;
 }
 
-uint32_t Airavata_getGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateResourceJobManager_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19218,8 +19237,8 @@ uint32_t Airavata_getGatewayResourceProfile_presult::read(::apache::thrift::prot
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += (*(this->success)).read(iprot);
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19261,7 +19280,7 @@ uint32_t Airavata_getGatewayResourceProfile_presult::read(::apache::thrift::prot
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getResourceJobManager_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19272,8 +19291,7 @@ uint32_t Airavata_updateGatewayResourceProfile_args::read(::apache::thrift::prot
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_gatewayID = false;
-  bool isset_gatewayResourceProfile = false;
+  bool isset_resourceJobManagerId = false;
 
   while (true)
   {
@@ -19285,16 +19303,8 @@ uint32_t Airavata_updateGatewayResourceProfile_args::read(::apache::thrift::prot
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->gatewayID);
-          isset_gatewayID = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
-      case 2:
-        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += this->gatewayResourceProfile.read(iprot);
-          isset_gatewayResourceProfile = true;
+          xfer += iprot->readString(this->resourceJobManagerId);
+          isset_resourceJobManagerId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -19308,23 +19318,17 @@ uint32_t Airavata_updateGatewayResourceProfile_args::read(::apache::thrift::prot
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_gatewayID)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_gatewayResourceProfile)
+  if (!isset_resourceJobManagerId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getResourceJobManager_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_args");
-
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->gatewayID);
-  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeStructBegin("Airavata_getResourceJobManager_args");
 
-  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 2);
-  xfer += this->gatewayResourceProfile.write(oprot);
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->resourceJobManagerId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19332,16 +19336,12 @@ uint32_t Airavata_updateGatewayResourceProfile_args::write(::apache::thrift::pro
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getResourceJobManager_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_pargs");
-
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->gatewayID)));
-  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeStructBegin("Airavata_getResourceJobManager_pargs");
 
-  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 2);
-  xfer += (*(this->gatewayResourceProfile)).write(oprot);
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->resourceJobManagerId)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19349,7 +19349,7 @@ uint32_t Airavata_updateGatewayResourceProfile_pargs::write(::apache::thrift::pr
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getResourceJobManager_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19370,8 +19370,8 @@ uint32_t Airavata_updateGatewayResourceProfile_result::read(::apache::thrift::pr
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_BOOL) {
-          xfer += iprot->readBool(this->success);
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19413,15 +19413,15 @@ uint32_t Airavata_updateGatewayResourceProfile_result::read(::apache::thrift::pr
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getResourceJobManager_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_result");
+  xfer += oprot->writeStructBegin("Airavata_getResourceJobManager_result");
 
   if (this->__isset.success) {
-    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
-    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
     xfer += oprot->writeFieldEnd();
   } else if (this->__isset.ire) {
     xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
@@ -19441,7 +19441,7 @@ uint32_t Airavata_updateGatewayResourceProfile_result::write(::apache::thrift::p
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getResourceJobManager_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19462,8 +19462,8 @@ uint32_t Airavata_updateGatewayResourceProfile_presult::read(::apache::thrift::p
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_BOOL) {
-          xfer += iprot->readBool((*(this->success)));
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19505,7 +19505,7 @@ uint32_t Airavata_updateGatewayResourceProfile_presult::read(::apache::thrift::p
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteResourceJobManager_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19516,7 +19516,7 @@ uint32_t Airavata_deleteGatewayResourceProfile_args::read(::apache::thrift::prot
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_gatewayID = false;
+  bool isset_resourceJobManagerId = false;
 
   while (true)
   {
@@ -19528,8 +19528,8 @@ uint32_t Airavata_deleteGatewayResourceProfile_args::read(::apache::thrift::prot
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->gatewayID);
-          isset_gatewayID = true;
+          xfer += iprot->readString(this->resourceJobManagerId);
+          isset_resourceJobManagerId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -19543,17 +19543,17 @@ uint32_t Airavata_deleteGatewayResourceProfile_args::read(::apache::thrift::prot
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_gatewayID)
+  if (!isset_resourceJobManagerId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteResourceJobManager_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_args");
+  xfer += oprot->writeStructBegin("Airavata_deleteResourceJobManager_args");
 
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->resourceJobManagerId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19561,12 +19561,12 @@ uint32_t Airavata_deleteGatewayResourceProfile_args::write(::apache::thrift::pro
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteResourceJobManager_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_pargs");
+  xfer += oprot->writeStructBegin("Airavata_deleteResourceJobManager_pargs");
 
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldBegin("resourceJobManagerId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->resourceJobManagerId)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19574,7 +19574,7 @@ uint32_t Airavata_deleteGatewayResourceProfile_pargs::write(::apache::thrift::pr
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteResourceJobManager_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19638,11 +19638,11 @@ uint32_t Airavata_deleteGatewayResourceProfile_result::read(::apache::thrift::pr
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteResourceJobManager_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_result");
+  xfer += oprot->writeStructBegin("Airavata_deleteResourceJobManager_result");
 
   if (this->__isset.success) {
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
@@ -19666,7 +19666,7 @@ uint32_t Airavata_deleteGatewayResourceProfile_result::write(::apache::thrift::p
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteResourceJobManager_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19730,7 +19730,7 @@ uint32_t Airavata_deleteGatewayResourceProfile_presult::read(::apache::thrift::p
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19741,9 +19741,7 @@ uint32_t Airavata_addGatewayComputeResourcePreference_args::read(::apache::thrif
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_gatewayID = false;
-  bool isset_computeResourceId = false;
-  bool isset_computeResourcePreference = false;
+  bool isset_gatewayResourceProfile = false;
 
   while (true)
   {
@@ -19754,25 +19752,9 @@ uint32_t Airavata_addGatewayComputeResourcePreference_args::read(::apache::thrif
     switch (fid)
     {
       case 1:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->gatewayID);
-          isset_gatewayID = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
-      case 2:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->computeResourceId);
-          isset_computeResourceId = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
-      case 3:
         if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += this->computeResourcePreference.read(iprot);
-          isset_computeResourcePreference = true;
+          xfer += this->gatewayResourceProfile.read(iprot);
+          isset_gatewayResourceProfile = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -19786,29 +19768,17 @@ uint32_t Airavata_addGatewayComputeResourcePreference_args::read(::apache::thrif
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_gatewayID)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_computeResourceId)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_computeResourcePreference)
+  if (!isset_gatewayResourceProfile)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_args");
-
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->gatewayID);
-  xfer += oprot->writeFieldEnd();
-
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString(this->computeResourceId);
-  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_args");
 
-  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
-  xfer += this->computeResourcePreference.write(oprot);
+  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->gatewayResourceProfile.write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19816,20 +19786,12 @@ uint32_t Airavata_addGatewayComputeResourcePreference_args::write(::apache::thri
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_pargs");
-
-  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->gatewayID)));
-  xfer += oprot->writeFieldEnd();
-
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString((*(this->computeResourceId)));
-  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_pargs");
 
-  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
-  xfer += (*(this->computeResourcePreference)).write(oprot);
+  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->gatewayResourceProfile)).write(oprot);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -19837,7 +19799,7 @@ uint32_t Airavata_addGatewayComputeResourcePreference_pargs::write(::apache::thr
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19858,8 +19820,8 @@ uint32_t Airavata_addGatewayComputeResourcePreference_result::read(::apache::thr
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_BOOL) {
-          xfer += iprot->readBool(this->success);
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19901,15 +19863,15 @@ uint32_t Airavata_addGatewayComputeResourcePreference_result::read(::apache::thr
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_registerGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_result");
+  xfer += oprot->writeStructBegin("Airavata_registerGatewayResourceProfile_result");
 
   if (this->__isset.success) {
-    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
-    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
     xfer += oprot->writeFieldEnd();
   } else if (this->__isset.ire) {
     xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
@@ -19929,7 +19891,7 @@ uint32_t Airavata_addGatewayComputeResourcePreference_result::write(::apache::th
   return xfer;
 }
 
-uint32_t Airavata_addGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_registerGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -19950,8 +19912,8 @@ uint32_t Airavata_addGatewayComputeResourcePreference_presult::read(::apache::th
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_BOOL) {
-          xfer += iprot->readBool((*(this->success)));
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -19993,7 +19955,7 @@ uint32_t Airavata_addGatewayComputeResourcePreference_presult::read(::apache::th
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20005,7 +19967,6 @@ uint32_t Airavata_getGatewayComputeResourcePreference_args::read(::apache::thrif
   using ::apache::thrift::protocol::TProtocolException;
 
   bool isset_gatewayID = false;
-  bool isset_computeResourceId = false;
 
   while (true)
   {
@@ -20023,14 +19984,6 @@ uint32_t Airavata_getGatewayComputeResourcePreference_args::read(::apache::thrif
           xfer += iprot->skip(ftype);
         }
         break;
-      case 2:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->computeResourceId);
-          isset_computeResourceId = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -20042,46 +19995,36 @@ uint32_t Airavata_getGatewayComputeResourcePreference_args::read(::apache::thrif
 
   if (!isset_gatewayID)
     throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_computeResourceId)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_args");
+  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_args");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->gatewayID);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString(this->computeResourceId);
-  xfer += oprot->writeFieldEnd();
-
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_pargs");
+  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_pargs");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->gatewayID)));
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString((*(this->computeResourceId)));
-  xfer += oprot->writeFieldEnd();
-
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20145,11 +20088,11 @@ uint32_t Airavata_getGatewayComputeResourcePreference_result::read(::apache::thr
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_getGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_result");
+  xfer += oprot->writeStructBegin("Airavata_getGatewayResourceProfile_result");
 
   if (this->__isset.success) {
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
@@ -20173,7 +20116,7 @@ uint32_t Airavata_getGatewayComputeResourcePreference_result::write(::apache::th
   return xfer;
 }
 
-uint32_t Airavata_getGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_getGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20237,7 +20180,7 @@ uint32_t Airavata_getGatewayComputeResourcePreference_presult::read(::apache::th
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20249,6 +20192,7 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::read(::apache::t
   using ::apache::thrift::protocol::TProtocolException;
 
   bool isset_gatewayID = false;
+  bool isset_gatewayResourceProfile = false;
 
   while (true)
   {
@@ -20266,6 +20210,14 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::read(::apache::t
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->gatewayResourceProfile.read(iprot);
+          isset_gatewayResourceProfile = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -20277,36 +20229,46 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::read(::apache::t
 
   if (!isset_gatewayID)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_gatewayResourceProfile)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_args");
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_args");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->gatewayID);
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->gatewayResourceProfile.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_pargs");
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_pargs");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->gatewayID)));
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("gatewayResourceProfile", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->gatewayResourceProfile)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20327,20 +20289,8 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::read(::apache:
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_LIST) {
-          {
-            this->success.clear();
-            uint32_t _size266;
-            ::apache::thrift::protocol::TType _etype269;
-            xfer += iprot->readListBegin(_etype269, _size266);
-            this->success.resize(_size266);
-            uint32_t _i270;
-            for (_i270 = 0; _i270 < _size266; ++_i270)
-            {
-              xfer += this->success[_i270].read(iprot);
-            }
-            xfer += iprot->readListEnd();
-          }
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -20382,23 +20332,15 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::read(::apache:
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_updateGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_result");
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayResourceProfile_result");
 
   if (this->__isset.success) {
-    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
-    {
-      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
-      std::vector< ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference> ::const_iterator _iter271;
-      for (_iter271 = this->success.begin(); _iter271 != this->success.end(); ++_iter271)
-      {
-        xfer += (*_iter271).write(oprot);
-      }
-      xfer += oprot->writeListEnd();
-    }
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
     xfer += oprot->writeFieldEnd();
   } else if (this->__isset.ire) {
     xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
@@ -20418,7 +20360,7 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::write(::apache
   return xfer;
 }
 
-uint32_t Airavata_getAllGatewayComputeResourcePreferences_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_updateGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20439,20 +20381,8 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_presult::read(::apache
     switch (fid)
     {
       case 0:
-        if (ftype == ::apache::thrift::protocol::T_LIST) {
-          {
-            (*(this->success)).clear();
-            uint32_t _size272;
-            ::apache::thrift::protocol::TType _etype275;
-            xfer += iprot->readListBegin(_etype275, _size272);
-            (*(this->success)).resize(_size272);
-            uint32_t _i276;
-            for (_i276 = 0; _i276 < _size272; ++_i276)
-            {
-              xfer += (*(this->success))[_i276].read(iprot);
-            }
-            xfer += iprot->readListEnd();
-          }
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
           this->__isset.success = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -20494,7 +20424,7 @@ uint32_t Airavata_getAllGatewayComputeResourcePreferences_presult::read(::apache
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20506,8 +20436,6 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_args::read(::apache::th
   using ::apache::thrift::protocol::TProtocolException;
 
   bool isset_gatewayID = false;
-  bool isset_computeResourceId = false;
-  bool isset_computeResourcePreference = false;
 
   while (true)
   {
@@ -20525,22 +20453,6 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_args::read(::apache::th
           xfer += iprot->skip(ftype);
         }
         break;
-      case 2:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->computeResourceId);
-          isset_computeResourceId = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
-      case 3:
-        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
-          xfer += this->computeResourcePreference.read(iprot);
-          isset_computeResourcePreference = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -20552,56 +20464,36 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_args::read(::apache::th
 
   if (!isset_gatewayID)
     throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_computeResourceId)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_computeResourcePreference)
-    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteGatewayResourceProfile_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_args");
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_args");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->gatewayID);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString(this->computeResourceId);
-  xfer += oprot->writeFieldEnd();
-
-  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
-  xfer += this->computeResourcePreference.write(oprot);
-  xfer += oprot->writeFieldEnd();
-
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteGatewayResourceProfile_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_pargs");
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_pargs");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->gatewayID)));
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString((*(this->computeResourceId)));
-  xfer += oprot->writeFieldEnd();
-
-  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
-  xfer += (*(this->computeResourcePreference)).write(oprot);
-  xfer += oprot->writeFieldEnd();
-
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteGatewayResourceProfile_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20665,11 +20557,11 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_result::read(::apache::
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_deleteGatewayResourceProfile_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_result");
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayResourceProfile_result");
 
   if (this->__isset.success) {
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
@@ -20693,7 +20585,7 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_result::write(::apache:
   return xfer;
 }
 
-uint32_t Airavata_updateGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_deleteGatewayResourceProfile_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20757,7 +20649,7 @@ uint32_t Airavata_updateGatewayComputeResourcePreference_presult::read(::apache:
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_addGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20770,6 +20662,7 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_args::read(::apache::th
 
   bool isset_gatewayID = false;
   bool isset_computeResourceId = false;
+  bool isset_computeResourcePreference = false;
 
   while (true)
   {
@@ -20795,6 +20688,14 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_args::read(::apache::th
           xfer += iprot->skip(ftype);
         }
         break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->computeResourcePreference.read(iprot);
+          isset_computeResourcePreference = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -20808,12 +20709,14 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_args::read(::apache::th
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_computeResourceId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_computeResourcePreference)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_addGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_args");
+  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_args");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->gatewayID);
@@ -20823,14 +20726,18 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_args::write(::apache::t
   xfer += oprot->writeString(this->computeResourceId);
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->computeResourcePreference.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_addGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_pargs");
+  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_pargs");
 
   xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->gatewayID)));
@@ -20840,12 +20747,16 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_pargs::write(::apache::
   xfer += oprot->writeString((*(this->computeResourceId)));
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->computeResourcePreference)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_addGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -20909,11 +20820,11 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_result::read(::apache::
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Airavata_addGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
   uint32_t xfer = 0;
 
-  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_result");
+  xfer += oprot->writeStructBegin("Airavata_addGatewayComputeResourcePreference_result");
 
   if (this->__isset.success) {
     xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
@@ -20937,7 +20848,7 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_result::write(::apache:
   return xfer;
 }
 
-uint32_t Airavata_deleteGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Airavata_addGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
@@ -21001,38 +20912,1113 @@ uint32_t Airavata_deleteGatewayComputeResourcePreference_presult::read(::apache:
   return xfer;
 }
 
-void AiravataClient::getAPIVersion(std::string& _return)
-{
-  send_getAPIVersion();
-  recv_getAPIVersion(_return);
+uint32_t Airavata_getGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_gatewayID = false;
+  bool isset_computeResourceId = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayID);
+          isset_gatewayID = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_gatewayID)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
 }
 
-void AiravataClient::send_getAPIVersion()
-{
-  int32_t cseqid = 0;
-  oprot_->writeMessageBegin("getAPIVersion", ::apache::thrift::protocol::T_CALL, cseqid);
+uint32_t Airavata_getGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_args");
 
-  Airavata_getAPIVersion_pargs args;
-  args.write(oprot_);
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldEnd();
 
-  oprot_->writeMessageEnd();
-  oprot_->getTransport()->writeEnd();
-  oprot_->getTransport()->flush();
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
 }
 
-void AiravataClient::recv_getAPIVersion(std::string& _return)
-{
+uint32_t Airavata_getGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_pargs");
 
-  int32_t rseqid = 0;
-  std::string fname;
-  ::apache::thrift::protocol::TMessageType mtype;
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldEnd();
 
-  iprot_->readMessageBegin(fname, mtype, rseqid);
-  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
-    ::apache::thrift::TApplicationException x;
-    x.read(iprot_);
-    iprot_->readMessageEnd();
-    iprot_->getTransport()->readEnd();
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getGatewayComputeResourcePreference_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_gatewayID = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayID);
+          isset_gatewayID = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_gatewayID)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_args");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_pargs");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size266;
+            ::apache::thrift::protocol::TType _etype269;
+            xfer += iprot->readListBegin(_etype269, _size266);
+            this->success.resize(_size266);
+            uint32_t _i270;
+            for (_i270 = 0; _i270 < _size266; ++_i270)
+            {
+              xfer += this->success[_i270].read(iprot);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_getAllGatewayComputeResourcePreferences_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
+      std::vector< ::apache::airavata::model::appcatalog::gatewayprofile::ComputeResourcePreference> ::const_iterator _iter271;
+      for (_iter271 = this->success.begin(); _iter271 != this->success.end(); ++_iter271)
+      {
+        xfer += (*_iter271).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_getAllGatewayComputeResourcePreferences_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size272;
+            ::apache::thrift::protocol::TType _etype275;
+            xfer += iprot->readListBegin(_etype275, _size272);
+            (*(this->success)).resize(_size272);
+            uint32_t _i276;
+            for (_i276 = 0; _i276 < _size272; ++_i276)
+            {
+              xfer += (*(this->success))[_i276].read(iprot);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_gatewayID = false;
+  bool isset_computeResourceId = false;
+  bool isset_computeResourcePreference = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayID);
+          isset_gatewayID = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->computeResourcePreference.read(iprot);
+          isset_computeResourcePreference = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_gatewayID)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_computeResourcePreference)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_args");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->computeResourcePreference.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_pargs");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourcePreference", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->computeResourcePreference)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_updateGatewayComputeResourcePreference_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_updateGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_gatewayID = false;
+  bool isset_computeResourceId = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayID);
+          isset_gatewayID = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_gatewayID)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_args");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->gatewayID);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_pargs");
+
+  xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->gatewayID)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_deleteGatewayComputeResourcePreference_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteGatewayComputeResourcePreference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+void AiravataClient::getAPIVersion(std::string& _return)
+{
+  send_getAPIVersion();
+  recv_getAPIVersion(_return);
+}
+
+void AiravataClient::send_getAPIVersion()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getAPIVersion", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Airavata_getAPIVersion_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void AiravataClient::recv_getAPIVersion(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("getAPIVersion") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Airavata_getAPIVersion_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ace) {
+    throw result.ace;
+  }
+  if (result.__isset.ase) {
+    throw result.ase;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getAPIVersion failed: unknown result");
+}
+
+void AiravataClient::createProject(std::string& _return, const  ::apache::airavata::model::workspace::Project& project)
+{
+  send_createProject(project);
+  recv_createProject(_return);
+}
+
+void AiravataClient::send_createProject(const  ::apache::airavata::model::workspace::Project& project)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("createProject", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Airavata_createProject_pargs args;
+  args.project = &project;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void AiravataClient::recv_createProject(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
     throw x;
   }
   if (mtype != ::apache::thrift::protocol::T_REPLY) {
@@ -21040,12 +22026,12 @@ void AiravataClient::recv_getAPIVersion(std::string& _return)
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  if (fname.compare("getAPIVersion") != 0) {
+  if (fname.compare("createProject") != 0) {
     iprot_->skip(::apache::thrift::protocol::T_STRUCT);
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  Airavata_getAPIVersion_presult result;
+  Airavata_createProject_presult result;
   result.success = &_return;
   result.read(iprot_);
   iprot_->readMessageEnd();
@@ -21064,22 +22050,23 @@ void AiravataClient::recv_getAPIVersion(std::string& _return)
   if (result.__isset.ase) {
     throw result.ase;
   }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getAPIVersion failed: unknown result");
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "createProject failed: unknown result");
 }
 
-void AiravataClient::createProject(std::string& _return, const  ::apache::airavata::model::workspace::Project& project)
+void AiravataClient::updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject)
 {
-  send_createProject(project);
-  recv_createProject(_return);
+  send_updateProject(projectId, updatedProject);
+  recv_updateProject();
 }
 
-void AiravataClient::send_createProject(const  ::apache::airavata::model::workspace::Project& project)
+void AiravataClient::send_updateProject(const std::string& projectId, const  ::apache::airavata::model::workspace::Project& updatedProject)
 {
   int32_t cseqid = 0;
-  oprot_->writeMessageBegin("createProject", ::apache::thrift::protocol::T_CALL, cseqid);
+  oprot_->writeMessageBegin("updateProject", ::apache::thrift::protocol::T_CALL, cseqid);
 
-  Airavata_createProject_pargs args;
-  arg

<TRUNCATED>

[38/44] Integrated appCatalog for ssh and gsi modules, commented out old test classes, need to fix this

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index ad2731a..f726024 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -20,11 +20,13 @@
 */
 package org.apache.airavata.gfac.ssh.util;
 
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.MappingFactory;
 import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
 import org.apache.airavata.gfac.Constants;
@@ -38,21 +40,20 @@ import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
 import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
 import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.schemas.gfac.*;
+import org.apache.airavata.schemas.gfac.FileArrayType;
+import org.apache.airavata.schemas.gfac.StringArrayType;
+import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -72,77 +73,84 @@ public class GFACSSHUtils {
      * @throws ApplicationSettingsException
      */
     public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
-        HostDescription registeredHost = jobExecutionContext.getApplicationContext().getHostDescription();
-        if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType() instanceof UnicoreHostType) {
+        JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+        if (preferredJobSubmissionProtocol == JobSubmissionProtocol.GLOBUS || preferredJobSubmissionProtocol == JobSubmissionProtocol.UNICORE) {
             logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
-        } else if (registeredHost.getType() instanceof SSHHostType
-                || registeredHost.getType() instanceof GsisshHostType) {
-            SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
-            String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
-            RequestData requestData = new RequestData(ServerSettings.getDefaultUserGateway());
-            requestData.setTokenId(credentialStoreToken);
-
-            ServerInfo serverInfo = new ServerInfo(null, registeredHost.getType().getHostAddress());
-            Cluster pbsCluster = null;
+        } else if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH) {
             try {
-                TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
-                String installedParentPath = ((HpcApplicationDeploymentType)
-                        jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType()).getInstalledParentPath();
-                if (installedParentPath == null) {
-                    installedParentPath = "/";
-                }
+                AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+                SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
+                if (sshJobSubmission.getSecurityProtocol() == SecurityProtocol.GSI) {
+                    SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+                    String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
+                    RequestData requestData = new RequestData(ServerSettings.getDefaultUserGateway());
+                    requestData.setTokenId(credentialStoreToken);
 
-                SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();// this is just a call to get and set credentials in to this object,data will be used
-                serverInfo.setUserName(credentials.getPortalUserName());
-                jobExecutionContext.getExperiment().setUserName(credentials.getPortalUserName());
-                // inside the pbsCluser object
+                    ServerInfo serverInfo = new ServerInfo(null, jobExecutionContext.getHostName());
 
-                String key = credentials.getPortalUserName() + registeredHost.getType().getHostAddress() +
-                        serverInfo.getPort();
-                boolean recreate = false;
-                synchronized (clusters) {
-                    if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
-                        recreate = true;
-                    } else if (clusters.containsKey(key)) {
-                        int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
-                        if (clusters.get(key).get(i).getSession().isConnected()) {
-                            pbsCluster = clusters.get(key).get(i);
-                        } else {
-                            clusters.get(key).remove(i);
-                            recreate = true;
+                    Cluster pbsCluster = null;
+                    try {
+                        TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
+                        String installedParentPath = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getExecutablePath();
+                        if (installedParentPath == null) {
+                            installedParentPath = "/";
                         }
-                        if (!recreate) {
-                            try {
-                                pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
-                            } catch (Exception e) {
-                                clusters.get(key).remove(i);
-                                logger.info("Connection found the connection map is expired, so we create from the scratch");
-                                maxClusterCount++;
-                                recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+
+                        SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();// this is just a call to get and set credentials in to this object,data will be used
+                        serverInfo.setUserName(credentials.getPortalUserName());
+                        jobExecutionContext.getExperiment().setUserName(credentials.getPortalUserName());
+                        // inside the pbsCluser object
+
+                        String key = credentials.getPortalUserName() + jobExecutionContext.getHostName() + serverInfo.getPort();
+                        boolean recreate = false;
+                        synchronized (clusters) {
+                            if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                                recreate = true;
+                            } else if (clusters.containsKey(key)) {
+                                int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                                if (clusters.get(key).get(i).getSession().isConnected()) {
+                                    pbsCluster = clusters.get(key).get(i);
+                                } else {
+                                    clusters.get(key).remove(i);
+                                    recreate = true;
+                                }
+                                if (!recreate) {
+                                    try {
+                                        pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                                    } catch (Exception e) {
+                                        clusters.get(key).remove(i);
+                                        logger.info("Connection found the connection map is expired, so we create from the scratch");
+                                        maxClusterCount++;
+                                        recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                                    }
+                                }
+                                logger.info("Re-using the same connection used with the connection string:" + key);
+                            } else {
+                                recreate = true;
+                            }
+                            if (recreate) {
+                                pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,
+                                        CommonUtils.getPBSJobManager(installedParentPath));
+                                List<Cluster> pbsClusters = null;
+                                if (!(clusters.containsKey(key))) {
+                                    pbsClusters = new ArrayList<Cluster>();
+                                } else {
+                                    pbsClusters = clusters.get(key);
+                                }
+                                pbsClusters.add(pbsCluster);
+                                clusters.put(key, pbsClusters);
                             }
                         }
-                        logger.info("Re-using the same connection used with the connection string:" + key);
-                    } else {
-                        recreate = true;
-                    }
-                    if (recreate) {
-                        pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,
-                                    CommonUtils.getPBSJobManager(installedParentPath));
-                        List<Cluster> pbsClusters = null;
-                        if (!(clusters.containsKey(key))) {
-                            pbsClusters = new ArrayList<Cluster>();
-                        } else {
-                            pbsClusters = clusters.get(key);
-                        }
-                        pbsClusters.add(pbsCluster);
-                        clusters.put(key, pbsClusters);
+                    } catch (Exception e) {
+                        throw new GFacException("Error occurred...", e);
                     }
+                    sshSecurityContext.setPbsCluster(pbsCluster);
+                    jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT, sshSecurityContext);
                 }
-            } catch (Exception e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            } catch (AppCatalogException e) {
+                throw new GFacException("Error while getting SSH Submission object from app catalog", e);
             }
-            sshSecurityContext.setPbsCluster(pbsCluster);
-            jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+"-"+registeredHost.getType().getHostAddress(), sshSecurityContext);
         }
     }
 
@@ -154,76 +162,75 @@ public class GFACSSHUtils {
      * @throws ApplicationSettingsException
      */
     public static void addSecurityContext(JobExecutionContext jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException, ApplicationSettingsException {
-            try {
-                if(sshAuth== null) {
-                    throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
-                }
-                SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
-                Cluster pbsCluster = null;
-                String key=sshAuth.getKey();
-                boolean recreate = false;
-                synchronized (clusters) {
-                    if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
-                        recreate = true;
-                    } else if (clusters.containsKey(key)) {
-                        int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
-                        if (clusters.get(key).get(i).getSession().isConnected()) {
-                            pbsCluster = clusters.get(key).get(i);
-                        } else {
-                            clusters.get(key).remove(i);
-                            recreate = true;
-                        }
-                        if (!recreate) {
-                            try {
-                                pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
-                            } catch (Exception e) {
-                                clusters.get(key).remove(i);
-                                logger.info("Connection found the connection map is expired, so we create from the scratch");
-                                maxClusterCount++;
-                                recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
-                            }
-                        }
-                        logger.info("Re-using the same connection used with the connection string:" + key);
+        try {
+            if(sshAuth== null) {
+                throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
+            }
+            SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+            Cluster pbsCluster = null;
+            String key=sshAuth.getKey();
+            boolean recreate = false;
+            synchronized (clusters) {
+                if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                    recreate = true;
+                } else if (clusters.containsKey(key)) {
+                    int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                    if (clusters.get(key).get(i).getSession().isConnected()) {
+                        pbsCluster = clusters.get(key).get(i);
                     } else {
+                        clusters.get(key).remove(i);
                         recreate = true;
                     }
-                    if (recreate) {
-                        pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null);
-                        key = sshAuth.getKey();
-                        List<Cluster> pbsClusters = null;
-                        if (!(clusters.containsKey(key))) {
-                            pbsClusters = new ArrayList<Cluster>();
-                        } else {
-                            pbsClusters = clusters.get(key);
+                    if (!recreate) {
+                        try {
+                            pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                        } catch (Exception e) {
+                            clusters.get(key).remove(i);
+                            logger.info("Connection found the connection map is expired, so we create from the scratch");
+                            maxClusterCount++;
+                            recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
                         }
-                        pbsClusters.add(pbsCluster);
-                        clusters.put(key, pbsClusters);
                     }
+                    logger.info("Re-using the same connection used with the connection string:" + key);
+                } else {
+                    recreate = true;
+                }
+                if (recreate) {
+                    pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null);
+                    key = sshAuth.getKey();
+                    List<Cluster> pbsClusters = null;
+                    if (!(clusters.containsKey(key))) {
+                        pbsClusters = new ArrayList<Cluster>();
+                    } else {
+                        pbsClusters = clusters.get(key);
+                    }
+                    pbsClusters.add(pbsCluster);
+                    clusters.put(key, pbsClusters);
                 }
-                sshSecurityContext.setPbsCluster(pbsCluster);
-                jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+key, sshSecurityContext);
-            } catch (Exception e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
             }
+            sshSecurityContext.setPbsCluster(pbsCluster);
+            jobExecutionContext.addSecurityContext(Constants.SSH_SECURITY_CONTEXT+key, sshSecurityContext);
+        } catch (Exception e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
     }
 
-    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext,
-                                                    ApplicationDeploymentDescriptionType app, Cluster cluster) {
+
+    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) {
         JobDescriptor jobDescriptor = new JobDescriptor();
         // this is common for any application descriptor
         jobDescriptor.setCallBackIp(ServerSettings.getIp());
         jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
-        jobDescriptor.setInputDirectory(app.getInputDataDirectory());
-        jobDescriptor.setOutputDirectory(app.getOutputDataDirectory());
-        jobDescriptor.setExecutablePath(app.getExecutableLocation());
-        jobDescriptor.setStandardOutFile(app.getStandardOutput());
-        jobDescriptor.setStandardErrorFile(app.getStandardError());
+        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
+        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
+        jobDescriptor.setExecutablePath(jobExecutionContext.getApplicationContext()
+                .getApplicationDeploymentDescription().getExecutablePath());
+        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
+        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
         Random random = new Random();
         int i = random.nextInt(Integer.MAX_VALUE);
         jobDescriptor.setJobName(String.valueOf(i + 99999999));
-        jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
-
-
+        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
         List<String> inputValues = new ArrayList<String>();
         MessageContext input = jobExecutionContext.getInMessageContext();
         Map<String, Object> inputs = input.getParameters();
@@ -249,51 +256,6 @@ public class GFACSSHUtils {
         }
         jobDescriptor.setInputValues(inputValues);
 
-        // this part will fill out the hpcApplicationDescriptor
-        if (app instanceof HpcApplicationDeploymentType) {
-            HpcApplicationDeploymentType applicationDeploymentType
-                    = (HpcApplicationDeploymentType) app;
-            jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
-            jobDescriptor.setShellName("/bin/bash");
-            jobDescriptor.setAllEnvExport(true);
-            jobDescriptor.setMailOptions("n");
-            jobDescriptor.setNodes(applicationDeploymentType.getNodeCount());
-            jobDescriptor.setProcessesPerNode(applicationDeploymentType.getProcessorsPerNode());
-            jobDescriptor.setMaxWallTime(String.valueOf(applicationDeploymentType.getMaxWallTime()));
-            jobDescriptor.setJobSubmitter(applicationDeploymentType.getJobSubmitterCommand());
-            jobDescriptor.setCPUCount(applicationDeploymentType.getCpuCount());
-            if (applicationDeploymentType.getProjectAccount() != null) {
-                if (applicationDeploymentType.getProjectAccount().getProjectAccountNumber() != null) {
-                    jobDescriptor.setAcountString(applicationDeploymentType.getProjectAccount().getProjectAccountNumber());
-                }
-            }
-            if (applicationDeploymentType.getQueue() != null) {
-                if (applicationDeploymentType.getQueue().getQueueName() != null) {
-                    jobDescriptor.setQueueName(applicationDeploymentType.getQueue().getQueueName());
-                }
-            }
-            jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
-            TaskDetails taskData = jobExecutionContext.getTaskData();
-            if (taskData != null && taskData.isSetTaskScheduling()) {
-                ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
-                if (computionnalResource.getNodeCount() > 0) {
-                    jobDescriptor.setNodes(computionnalResource.getNodeCount());
-                }
-                if (computionnalResource.getComputationalProjectAccount() != null) {
-                    jobDescriptor.setAcountString(computionnalResource.getComputationalProjectAccount());
-                }
-                if (computionnalResource.getQueueName() != null) {
-                    jobDescriptor.setQueueName(computionnalResource.getQueueName());
-                }
-                if (computionnalResource.getTotalCPUCount() > 0) {
-                    jobDescriptor.setProcessesPerNode(computionnalResource.getTotalCPUCount());
-                }
-                if (computionnalResource.getWallTimeLimit() > 0) {
-                    jobDescriptor.setMaxWallTime(String.valueOf(computionnalResource.getWallTimeLimit()));
-                }
-            }
-
-        }
         return jobDescriptor;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index e84848c..c65f386 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -1,252 +1,252 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.core.gfac.services.impl;
-
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.schemas.gfac.*;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-public class BigRed2TestWithSSHAuth {
-    private JobExecutionContext jobExecutionContext;
-
-    private String userName;
-    private String password;
-    private String passPhrase;
-    private String hostName;
-    private String workingDirectory;
-    private String privateKeyPath;
-    private String publicKeyPath;
-
-    @BeforeClass
-    public void setUp() throws Exception {
-
-        System.out.println("Test case name " + this.getClass().getName());
-//        System.setProperty("ssh.host","bigred2.uits.iu.edu");        //default ssh host
-//        System.setProperty("ssh.user", "lginnali");
-//        System.setProperty("ssh.private.key.path", "/Users/lahirugunathilake/.ssh/id_dsa");
-//        System.setProperty("ssh.public.key.path", "/Users/lahirugunathilake/.ssh/id_dsa.pub");
-//        System.setProperty("ssh.working.directory", "/tmp");
-
-        this.hostName = "bigred2.uits.iu.edu";
-        this.hostName = System.getProperty("ssh.host");
-        this.userName = System.getProperty("ssh.username");
-        this.password = System.getProperty("ssh.password");
-        this.privateKeyPath = System.getProperty("private.ssh.key");
-        this.publicKeyPath = System.getProperty("public.ssh.key");
-        this.passPhrase = System.getProperty("ssh.keypass");
-        this.workingDirectory = System.getProperty("ssh.working.directory");
-
-
-         if (this.userName == null
-                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
-            System.out.println("########### In order to test you have to either username password or private,public keys");
-            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
-                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
-        }
-        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        assert resource != null;
-        System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
-
-//        gFacConfiguration.setMyProxyLifeCycle(3600);
-//        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
-//        gFacConfiguration.setMyProxyUser("*****");
-//        gFacConfiguration.setMyProxyPassphrase("*****");
-//        gFacConfiguration.setTrustedCertLocation("./certificates");
-//        //have to set InFlwo Handlers and outFlowHandlers
-//        gFacConfiguration.setInHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GramDirectorySetupHandler","org.apache.airavata.gfac.handler.GridFTPInputHandler"}));
-//        gFacConfiguration.setOutHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GridFTPOutputHandler"}));
-
-        /*
-        * Host
-        */
-        HostDescription host = new HostDescription(SSHHostType.type);
-        host.getType().setHostAddress(hostName);
-        host.getType().setHostName(hostName);
-        ((SSHHostType)host.getType()).setHpcResource(true);
-        /*
-        * App
-        */
-        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-        name.setStringValue("EchoLocal");
-        app.setApplicationName(name);
-
-        app.setCpuCount(1);
-        app.setJobType(JobTypeType.SERIAL);
-        app.setNodeCount(1);
-        app.setProcessorsPerNode(1);
-
-        /*
-        * Use bat file if it is compiled on Windows
-        */
-        app.setExecutableLocation("/bin/echo");
-
-        /*
-        * Default tmp location
-        */
-        String tempDir = "/tmp";
-        String date = (new Date()).toString();
-        date = date.replaceAll(" ", "_");
-        date = date.replaceAll(":", "_");
-
-        tempDir = tempDir + File.separator
-                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-
-        System.out.println(tempDir);
-        app.setScratchWorkingDirectory(tempDir);
-        app.setStaticWorkingDirectory(tempDir);
-        app.setInputDataDirectory(tempDir + File.separator + "inputData");
-        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
-        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
-        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
-        app.setMaxWallTime(5);
-        app.setJobSubmitterCommand("aprun -n 1");
-        app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
-
-        /*
-        * Service
-        */
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("SimpleEcho");
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-
-        InputParameterType input = InputParameterType.Factory.newInstance();
-        input.setParameterName("echo_input");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input);
-
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-
-                .size()]);
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("echo_output");
-        output.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-
-        OutputParameterType[] outputParamList = outputList
-                .toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-        // Adding security context
-        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
-        ApplicationContext applicationContext = new ApplicationContext();
-        jobExecutionContext.setApplicationContext(applicationContext);
-        applicationContext.setServiceDescription(serv);
-        applicationContext.setApplicationDeploymentDescription(appDesc);
-        applicationContext.setHostDescription(host);
-
-        MessageContext inMessage = new MessageContext();
-        ActualParameter echo_input = new ActualParameter();
-        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-        inMessage.addParameter("echo_input", echo_input);
-
-
-        jobExecutionContext.setInMessageContext(inMessage);
-
-        MessageContext outMessage = new MessageContext();
-        ActualParameter echo_out = new ActualParameter();
-//		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-        outMessage.addParameter("echo_output", echo_out);
-        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
-        jobExecutionContext.setTaskData(new TaskDetails("11323"));
-        jobExecutionContext.setOutMessageContext(outMessage);
-
-    }
-
-
-    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
-         try {
-
-        AuthenticationInfo authenticationInfo = null;
-        if (password != null) {
-            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-        } else {
-            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                    this.passPhrase);
-        }
-        // Server info
-        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-
-        Cluster pbsCluster = null;
-        SSHSecurityContext sshSecurityContext = null;
-
-            JobManagerConfiguration pbsJobManager = CommonUtils.getPBSJobManager(app.getInstalledParentPath());
-            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, pbsJobManager);
-
-
-            sshSecurityContext = new SSHSecurityContext();
-            sshSecurityContext.setPbsCluster(pbsCluster);
-            sshSecurityContext.setUsername(userName);
-            sshSecurityContext.setKeyPass(passPhrase);
-            sshSecurityContext.setPrivateKeyLoc(privateKeyPath);
-             return sshSecurityContext;
-        } catch (SSHApiException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        return null;
-    }
-
-    @Test
-    public void testSSHProvider() throws GFacException {
-        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
-        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
-    }
-
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.core.gfac.services.impl;
+//
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.SecurityContext;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+//import org.apache.airavata.gsi.ssh.api.Cluster;
+//import org.apache.airavata.gsi.ssh.api.SSHApiException;
+//import org.apache.airavata.gsi.ssh.api.ServerInfo;
+//import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
+//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+//import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+//import org.apache.airavata.gsi.ssh.util.CommonUtils;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+//import org.apache.airavata.schemas.gfac.*;
+//import org.testng.annotations.BeforeClass;
+//import org.testng.annotations.Test;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//public class BigRed2TestWithSSHAuth {
+//    private JobExecutionContext jobExecutionContext;
+//
+//    private String userName;
+//    private String password;
+//    private String passPhrase;
+//    private String hostName;
+//    private String workingDirectory;
+//    private String privateKeyPath;
+//    private String publicKeyPath;
+//
+//    @BeforeClass
+//    public void setUp() throws Exception {
+//
+//        System.out.println("Test case name " + this.getClass().getName());
+////        System.setProperty("ssh.host","bigred2.uits.iu.edu");        //default ssh host
+////        System.setProperty("ssh.user", "lginnali");
+////        System.setProperty("ssh.private.key.path", "/Users/lahirugunathilake/.ssh/id_dsa");
+////        System.setProperty("ssh.public.key.path", "/Users/lahirugunathilake/.ssh/id_dsa.pub");
+////        System.setProperty("ssh.working.directory", "/tmp");
+//
+//        this.hostName = "bigred2.uits.iu.edu";
+//        this.hostName = System.getProperty("ssh.host");
+//        this.userName = System.getProperty("ssh.username");
+//        this.password = System.getProperty("ssh.password");
+//        this.privateKeyPath = System.getProperty("private.ssh.key");
+//        this.publicKeyPath = System.getProperty("public.ssh.key");
+//        this.passPhrase = System.getProperty("ssh.keypass");
+//        this.workingDirectory = System.getProperty("ssh.working.directory");
+//
+//
+//         if (this.userName == null
+//                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
+//            System.out.println("########### In order to test you have to either username password or private,public keys");
+//            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
+//                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
+//        }
+//        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        assert resource != null;
+//        System.out.println(resource.getFile());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+//
+////        gFacConfiguration.setMyProxyLifeCycle(3600);
+////        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
+////        gFacConfiguration.setMyProxyUser("*****");
+////        gFacConfiguration.setMyProxyPassphrase("*****");
+////        gFacConfiguration.setTrustedCertLocation("./certificates");
+////        //have to set InFlwo Handlers and outFlowHandlers
+////        gFacConfiguration.setInHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GramDirectorySetupHandler","org.apache.airavata.gfac.handler.GridFTPInputHandler"}));
+////        gFacConfiguration.setOutHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GridFTPOutputHandler"}));
+//
+//        /*
+//        * Host
+//        */
+//        HostDescription host = new HostDescription(SSHHostType.type);
+//        host.getType().setHostAddress(hostName);
+//        host.getType().setHostName(hostName);
+//        ((SSHHostType)host.getType()).setHpcResource(true);
+//        /*
+//        * App
+//        */
+//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//
+//        app.setCpuCount(1);
+//        app.setJobType(JobTypeType.SERIAL);
+//        app.setNodeCount(1);
+//        app.setProcessorsPerNode(1);
+//
+//        /*
+//        * Use bat file if it is compiled on Windows
+//        */
+//        app.setExecutableLocation("/bin/echo");
+//
+//        /*
+//        * Default tmp location
+//        */
+//        String tempDir = "/tmp";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = tempDir + File.separator
+//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+//
+//        System.out.println(tempDir);
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+//        app.setMaxWallTime(5);
+//        app.setJobSubmitterCommand("aprun -n 1");
+//        app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
+//
+//        /*
+//        * Service
+//        */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//
+//                .size()]);
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        // Adding security context
+//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        applicationContext.setServiceDescription(serv);
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//        applicationContext.setHostDescription(host);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//
+//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+//         try {
+//
+//        AuthenticationInfo authenticationInfo = null;
+//        if (password != null) {
+//            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+//        } else {
+//            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+//                    this.passPhrase);
+//        }
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+//
+//        Cluster pbsCluster = null;
+//        SSHSecurityContext sshSecurityContext = null;
+//
+//            JobManagerConfiguration pbsJobManager = CommonUtils.getPBSJobManager(app.getInstalledParentPath());
+//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, pbsJobManager);
+//
+//
+//            sshSecurityContext = new SSHSecurityContext();
+//            sshSecurityContext.setPbsCluster(pbsCluster);
+//            sshSecurityContext.setUsername(userName);
+//            sshSecurityContext.setKeyPass(passPhrase);
+//            sshSecurityContext.setPrivateKeyLoc(privateKeyPath);
+//             return sshSecurityContext;
+//        } catch (SSHApiException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        return null;
+//    }
+//
+//    @Test
+//    public void testSSHProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
+//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d94e8c95/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
index 5cb1200..b115b6c 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -1,172 +1,172 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.core.gfac.services.impl;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.MappingFactory;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.SSHHostType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
-import org.apache.commons.lang.SystemUtils;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SSHProviderTestWithSSHAuth {
-	private JobExecutionContext jobExecutionContext;
-    @Before
-    public void setUp() throws Exception {
-
-    	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
-//        gFacConfiguration.s
-        //have to set InFlwo Handlers and outFlowHandlers
-        ApplicationContext applicationContext = new ApplicationContext();
-        HostDescription host = new HostDescription(SSHHostType.type);
-        host.getType().setHostName("bigred");
-        host.getType().setHostAddress("bigred2.uits.iu.edu");
-        applicationContext.setHostDescription(host);
-        /*
-           * App
-           */
-        ApplicationDescription appDesc = new ApplicationDescription();
-        ApplicationDeploymentDescriptionType app = appDesc.getType();
-        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-        name.setStringValue("EchoSSH");
-        app.setApplicationName(name);
-
-        /*
-           * Use bat file if it is compiled on Windows
-           */
-        if (SystemUtils.IS_OS_WINDOWS) {
-            URL url = this.getClass().getClassLoader().getResource("echo.bat");
-            app.setExecutableLocation(url.getFile());
-        } else {
-            //for unix and Mac
-            app.setExecutableLocation("/bin/echo");
-        }
-
-        /*
-         * Job location
-        */
-        String tempDir = "/tmp";
-        String date = (new Date()).toString();
-        date = date.replaceAll(" ", "_");
-        date = date.replaceAll(":", "_");
-
-        tempDir = tempDir + File.separator
-                + "EchoSSH" + "_" + date + "_" + UUID.randomUUID();
-
-        app.setScratchWorkingDirectory(tempDir);
-        app.setStaticWorkingDirectory(tempDir);
-        app.setInputDataDirectory(tempDir + File.separator + "input");
-        app.setOutputDataDirectory(tempDir + File.separator + "output");
-        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
-        app.setStandardError(tempDir + File.separator + "echo.stderr");
-
-        applicationContext.setApplicationDeploymentDescription(appDesc);
-
-        /*
-           * Service
-           */
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("EchoSSH");
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-        InputParameterType input = InputParameterType.Factory.newInstance();
-        input.setParameterName("echo_input");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input);
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-                .size()]);
-
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("echo_output");
-        output.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-        OutputParameterType[] outputParamList = outputList
-                .toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
-        jobExecutionContext.setApplicationContext(applicationContext);
-
-        // Add security context
-        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext());
-        /*
-        * Host
-        */
-        applicationContext.setServiceDescription(serv);
-
-        MessageContext inMessage = new MessageContext();
-        ActualParameter echo_input = new ActualParameter();
-		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-        inMessage.addParameter("echo_input", echo_input);
-
-        jobExecutionContext.setInMessageContext(inMessage);
-
-        MessageContext outMessage = new MessageContext();
-        ActualParameter echo_out = new ActualParameter();
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.MappingFactory;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//import org.apache.airavata.schemas.gfac.InputParameterType;
+//import org.apache.airavata.schemas.gfac.OutputParameterType;
+//import org.apache.airavata.schemas.gfac.SSHHostType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.apache.commons.lang.SystemUtils;
+//import org.junit.Assert;
+//import org.junit.Before;
+//import org.junit.Test;
+//
+//public class SSHProviderTestWithSSHAuth {
+//	private JobExecutionContext jobExecutionContext;
+//    @Before
+//    public void setUp() throws Exception {
+//
+//    	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
+////        gFacConfiguration.s
+//        //have to set InFlwo Handlers and outFlowHandlers
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        HostDescription host = new HostDescription(SSHHostType.type);
+//        host.getType().setHostName("bigred");
+//        host.getType().setHostAddress("bigred2.uits.iu.edu");
+//        applicationContext.setHostDescription(host);
+//        /*
+//           * App
+//           */
+//        ApplicationDescription appDesc = new ApplicationDescription();
+//        ApplicationDeploymentDescriptionType app = appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoSSH");
+//        app.setApplicationName(name);
+//
+//        /*
+//           * Use bat file if it is compiled on Windows
+//           */
+//        if (SystemUtils.IS_OS_WINDOWS) {
+//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
+//            app.setExecutableLocation(url.getFile());
+//        } else {
+//            //for unix and Mac
+//            app.setExecutableLocation("/bin/echo");
+//        }
+//
+//        /*
+//         * Job location
+//        */
+//        String tempDir = "/tmp";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = tempDir + File.separator
+//                + "EchoSSH" + "_" + date + "_" + UUID.randomUUID();
+//
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "input");
+//        app.setOutputDataDirectory(tempDir + File.separator + "output");
+//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
+//        app.setStandardError(tempDir + File.separator + "echo.stderr");
+//
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//
+//        /*
+//           * Service
+//           */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("EchoSSH");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//                .size()]);
+//
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//
+//        // Add security context
+//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext());
+//        /*
+//        * Host
+//        */
+//        applicationContext.setServiceDescription(serv);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
 //		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-        outMessage.addParameter("echo_output", echo_out);
-
-        jobExecutionContext.setOutMessageContext(outMessage);
-
-    }
-
-	private SSHSecurityContext getSecurityContext() {
-		SSHSecurityContext context = new SSHSecurityContext();
-        context.setUsername("lginnali");
-        context.setPrivateKeyLoc("~/.ssh/id_dsa");
-        context.setKeyPass("i want to be free");
-		return context;
-	}
-
-    @Test
-    public void testLocalProvider() throws GFacException {
-        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
-        Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");
-    }
-}
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//	private SSHSecurityContext getSecurityContext() {
+//		SSHSecurityContext context = new SSHSecurityContext();
+//        context.setUsername("lginnali");
+//        context.setPrivateKeyLoc("~/.ssh/id_dsa");
+//        context.setKeyPass("i want to be free");
+//		return context;
+//	}
+//
+//    @Test
+//    public void testLocalProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
+//        Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");
+//    }
+//}


[08/44] fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index 7ece54d..b64903e 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -226,14 +226,14 @@ public interface ComputeResource {
      * @param jobSubmissionInterfaceId unique job submission interface id
      * @throws AppCatalogException
      */
-    void removeJobSubmissionInterface(String jobSubmissionInterfaceId) throws AppCatalogException;
+    void removeJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws AppCatalogException;
 
     /**
      * This method will remove data movement interface
      * @param dataMovementInterfaceId unique data movement id
      * @throws AppCatalogException
      */
-    void removeDataMovementInterface(String dataMovementInterfaceId)  throws AppCatalogException;
+    void removeDataMovementInterface(String computeResourceId, String dataMovementInterfaceId)  throws AppCatalogException;
 
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index dd1982e..6b9b841 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -698,10 +698,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public void removeJobSubmissionInterface(String jobSubmissionInterfaceId) throws AppCatalogException {
+    public void removeJobSubmissionInterface(String computeResourceId, String jobSubmissionInterfaceId) throws AppCatalogException {
         try {
             JobSubmissionInterfaceResource resource = new JobSubmissionInterfaceResource();
-            resource.remove(jobSubmissionInterfaceId);
+            Map<String, String> ids = new HashMap<String, String>();
+            ids.put(AbstractResource.JobSubmissionInterfaceConstants.COMPUTE_RESOURCE_ID, computeResourceId);
+            ids.put(AbstractResource.JobSubmissionInterfaceConstants.JOB_SUBMISSION_INTERFACE_ID, jobSubmissionInterfaceId);
+            resource.remove(ids);
         }catch (Exception e){
             logger.error("Error while removing job submission interface..", e);
             throw new AppCatalogException(e);
@@ -709,10 +712,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public void removeDataMovementInterface(String dataMovementInterfaceId) throws AppCatalogException {
+    public void removeDataMovementInterface(String computeResourceId, String dataMovementInterfaceId) throws AppCatalogException {
         try {
             DataMovementInterfaceResource resource = new DataMovementInterfaceResource();
-            resource.remove(dataMovementInterfaceId);
+            Map<String, String> ids = new HashMap<String, String>();
+            ids.put(AbstractResource.DataMovementInterfaceConstants.COMPUTE_RESOURCE_ID, computeResourceId);
+            ids.put(AbstractResource.DataMovementInterfaceConstants.DATA_MOVEMENT_INTERFACE_ID, dataMovementInterfaceId);
+            resource.remove(ids);
         }catch (Exception e){
             logger.error("Error while removing data movement interface..", e);
             throw new AppCatalogException(e);


[09/44] fixing typos in Airavata API and generate code for AIRAVATA-1471

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a3cef493/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 2a051af..6b00d24 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -1,1565 +1,1604 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/**
- * Application Programming Interface definition for Apache Airavata Services.
- *   this parent thrift file is contains all service interfaces. The data models are 
- *   described in respective thrift files.
-*/
-
-include "airavataErrors.thrift"
-include "airavataDataModel.thrift"
-include "experimentModel.thrift"
-include "workspaceModel.thrift"
-include "computeResourceModel.thrift"
-include "applicationDeploymentModel.thrift"
-include "applicationInterfaceModel.thrift"
-include "gatewayResourceProfileModel.thrift"
-
-namespace java org.apache.airavata.api
-namespace php Airavata.API
-namespace cpp apache.airavata.api
-namespace perl ApacheAiravataAPI
-namespace py apache.airavata.api
-namespace js ApacheAiravataAPI
-
-/**
- * Airavata Interface Versions depend upon this Thrift Interface File. When Making changes, please edit the
- *  Version Constants according to Semantic Versioning Specification (SemVer) http://semver.org.
- *
- * Note: The Airavata API version may be different from the Airavata software release versions.
- *
- * The Airavata API version is composed as a dot delimited string with major, minor, and patch level components.
- *
- *  - Major: Incremented for backward incompatible changes. An example would be changes to interfaces.
- *  - Minor: Incremented for backward compatible changes. An example would be the addition of a new optional methods.
- *  - Patch: Incremented for bug fixes. The patch level should be increased for every edit that doesn't result
- *              in a change to major/minor version numbers.
- *
-*/
-const string AIRAVATA_API_VERSION = "0.14.0"
-
-service Airavata {
-
-/**
- * Apache Airavata API Service Methods. For data structures associated in the signatures, please see included thrift files
-*/
-
-  /**
-   * Fetch Apache Airavata API version
-  */
-  string getAPIVersion()
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-  
-  /**
-   * Create a Project
-   *
-  */
-  string createProject (1: required workspaceModel.Project project)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Project
-   *
-  */
-  void updateProject (1: required string projectId,
-                      2: required workspaceModel.Project updatedProject)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase,
-              4: airavataErrors.ProjectNotFoundException pnfe)
-
-/**
-   * Get a Project by ID
-   *
-  */
-  workspaceModel.Project getProject (1: required string projectId)
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase,
-                4: airavataErrors.ProjectNotFoundException pnfe)
-
-/**
-   * Get all Project by user
-   *
-  */
-  list<workspaceModel.Project> getAllUserProjects (1: required string userName)
-        throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-     * Get all Project for user by project name
-     *
-    */
-  list<workspaceModel.Project> searchProjectsByProjectName (1: required string userName, 2: required string projectName)
-          throws (1: airavataErrors.InvalidRequestException ire,
-                  2: airavataErrors.AiravataClientException ace,
-                  3: airavataErrors.AiravataSystemException ase)
-
-  /**
-    * Get all Project for user by project description
-    *
-  */
-  list<workspaceModel.Project> searchProjectsByProjectDesc (1: required string userName, 2: required string description)
-            throws (1: airavataErrors.InvalidRequestException ire,
-                    2: airavataErrors.AiravataClientException ace,
-                    3: airavataErrors.AiravataSystemException ase)
-
-
-  /**
-       * Search Experiments by experiment name
-       *
-    */
-  list<experimentModel.ExperimentSummary> searchExperimentsByName (1: required string userName, 2: required string expName)
-            throws (1: airavataErrors.InvalidRequestException ire,
-                    2: airavataErrors.AiravataClientException ace,
-                    3: airavataErrors.AiravataSystemException ase)
-
-  /**
-       * Search Experiments by experiment name
-       *
-  */
-  list<experimentModel.ExperimentSummary> searchExperimentsByDesc (1: required string userName, 2: required string description)
-              throws (1: airavataErrors.InvalidRequestException ire,
-                      2: airavataErrors.AiravataClientException ace,
-                      3: airavataErrors.AiravataSystemException ase)
-
-  /**
-       * Search Experiments by application id
-       *
-  */
-  list<experimentModel.ExperimentSummary> searchExperimentsByApplication (1: required string userName, 2: required string applicationId)
-              throws (1: airavataErrors.InvalidRequestException ire,
-                      2: airavataErrors.AiravataClientException ace,
-                      3: airavataErrors.AiravataSystemException ase)
-
-    /**
-         * Search Experiments by experiment status
-         *
-    */
-    list<experimentModel.ExperimentSummary> searchExperimentsByStatus (1: required string userName, 2: required experimentModel.ExperimentState experimentState)
-                throws (1: airavataErrors.InvalidRequestException ire,
-                        2: airavataErrors.AiravataClientException ace,
-                        3: airavataErrors.AiravataSystemException ase)
-
-    /**
-         * Search Experiments by experiment status
-         *
-    */
-    list<experimentModel.ExperimentSummary> searchExperimentsByCreationTime (1: required string userName, 2: required i64 fromTime, 3: required i64 toTime)
-                throws (1: airavataErrors.InvalidRequestException ire,
-                        2: airavataErrors.AiravataClientException ace,
-                        3: airavataErrors.AiravataSystemException ase)
-
-  /**
-     * Get all Experiments within a Project
-     *
-  */
-  list<experimentModel.Experiment> getAllExperimentsInProject(1: required string projectId)
-          throws (1: airavataErrors.InvalidRequestException ire,
-                  2: airavataErrors.AiravataClientException ace,
-                  3: airavataErrors.AiravataSystemException ase,
-                  4: airavataErrors.ProjectNotFoundException pnfe)
-
-  /**
-     * Get all Experiments by user
-     *
-  */
-  list<experimentModel.Experiment> getAllUserExperiments(1: required string userName)
-            throws (1: airavataErrors.InvalidRequestException ire,
-                    2: airavataErrors.AiravataClientException ace,
-                    3: airavataErrors.AiravataSystemException ase)
-
-  /**
-     * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
-     *   but inferred from the authentication header. This experiment is just a persistent place holder. The client
-     *   has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
-     *   registering the experiment in a persistent store.
-     *
-     * @param basicExperimentMetadata
-     *    The create experiment will require the basic experiment metadata like the name and description, intended user,
-     *      the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
-     *      the ExperimentMetadata is a required field.
-     *
-     * @return
-     *   The server-side generated airavata experiment globally unique identifier.
-     *
-     * @throws org.apache.airavata.model.error.InvalidRequestException
-     *    For any incorrect forming of the request itself.
-     *
-     * @throws org.apache.airavata.model.error.AiravataClientException
-     *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-     *
-     *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-     *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-     *         gateway registration steps and retry this request.
-     *
-     *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-     *         For now this is a place holder.
-     *
-     *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-     *         is implemented, the authorization will be more substantial.
-     *
-     * @throws org.apache.airavata.model.error.AiravataSystemException
-     *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-     *       rather an Airavata Administrator will be notified to take corrective action.
-     *
-    */
-
-  string createExperiment(1: required experimentModel.Experiment experiment)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch previously created experiment metadata.
-   *
-   * @param airavataExperimentId
-   *    The identifier for the requested experiment. This is returned during the create experiment step.
-   *
-   * @return experimentMetada
-   *   This method will return the previously stored experiment metadata.
-   *
-   * @throws org.apache.airavata.model.error.InvalidRequestException
-   *    For any incorrect forming of the request itself.
-   * 
-   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
-   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
-   * 
-   * @throws org.apache.airavata.model.error.AiravataClientException
-   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-   *      
-   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-   *         gateway registration steps and retry this request.
-   *
-   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-   *         For now this is a place holder.
-   *
-   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-   *         is implemented, the authorization will be more substantial.
-   *
-   * @throws org.apache.airavata.model.error.AiravataSystemException
-   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-   *       rather an Airavata Administrator will be notified to take corrective action.
-   *
-  */
-  experimentModel.Experiment getExperiment(1: required string airavataExperimentId)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.ExperimentNotFoundException enf,
-            3: airavataErrors.AiravataClientException ace,
-            4: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Configure a previously created experiment with required inputs, scheduling and other quality of service
-   *   parameters. This method only updates the experiment object within the registry. The experiment has to be launched
-   *   to make it actionable by the server.
-   *
-   * @param airavataExperimentId
-   *    The identifier for the requested experiment. This is returned during the create experiment step.
-   *
-   * @param experimentConfigurationData
-   *    The configuration information of the experiment with application input parameters, computational resource scheduling
-   *      information, special input output handling and additional quality of service parameters.
-   *
-   * @return
-   *   This method call does not have a return value.
-   *
-   * @throws org.apache.airavata.model.error.InvalidRequestException
-   *    For any incorrect forming of the request itself.
-   * 
-   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
-   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
-   * 
-   * @throws org.apache.airavata.model.error.AiravataClientException
-   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-   *      
-   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-   *         gateway registration steps and retry this request.
-   *
-   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-   *         For now this is a place holder.
-   *
-   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-   *         is implemented, the authorization will be more substantial.
-   *
-   * @throws org.apache.airavata.model.error.AiravataSystemException
-   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-   *       rather an Airavata Administrator will be notified to take corrective action.
-   *
-  */
-  void updateExperiment(1: required string airavataExperimentId,
-                        2: required experimentModel.Experiment experiment)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.ExperimentNotFoundException enf,
-            3: airavataErrors.AiravataClientException ace,
-            4: airavataErrors.AiravataSystemException ase)
-
-  void updateExperimentConfiguration(1: required string airavataExperimentId,
-                                       2: required experimentModel.UserConfigurationData userConfiguration)
-
-  void updateResourceScheduleing(1: required string airavataExperimentId,
-                                 2: required experimentModel.ComputationalResourceScheduling resourceScheduling)
-
-    /**
-     *
-     * Validate experiment configuration. A true in general indicates, the experiment is ready to be launched.
-     *
-     * @param experimentID
-     * @return sucess/failure
-     *
-    **/
-  bool validateExperiment(1: required string airavataExperimentId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.ExperimentNotFoundException enf,
-              3: airavataErrors.AiravataClientException ace,
-              4: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
-   *   notifications and intermediate and output data will be subsequently available for this experiment.
-   *
-   * @param airavataExperimentId
-   *    The identifier for the requested experiment. This is returned during the create experiment step.
-   *
-   * @param airavataCredStoreToken:
-   *   A requirement to execute experiments within Airavata is to first register the targeted remote computational account
-   *     credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
-   *     generated token associated with the registered credentials. The client has to security posses this token id and is
-   *     required to pass it to Airavata Server for all execution requests.
-   *   Note: At this point only the credential store token is required so the string is directly passed here. In future if 
-   *     if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
-   *   Note: This parameter is not persisted within Airavata Registry for security reasons.
-   *
-   * @return
-   *   This method call does not have a return value.
-   *
-   * @throws org.apache.airavata.model.error.InvalidRequestException
-   *    For any incorrect forming of the request itself.
-   * 
-   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
-   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
-   * 
-   * @throws org.apache.airavata.model.error.AiravataClientException
-   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-   *      
-   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-   *         gateway registration steps and retry this request.
-   *
-   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-   *         For now this is a place holder.
-   *
-   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-   *         is implemented, the authorization will be more substantial.
-   *
-   * @throws org.apache.airavata.model.error.AiravataSystemException
-   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-   *       rather an Airavata Administrator will be notified to take corrective action.
-   *
-  */
-  void launchExperiment(1: required string airavataExperimentId
-                        2: required string airavataCredStoreToken)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.ExperimentNotFoundException enf,
-            3: airavataErrors.AiravataClientException ace,
-            4: airavataErrors.AiravataSystemException ase,
-            5: airavataErrors.LaunchValidationException lve)
-
-
-    experimentModel.ExperimentStatus getExperimentStatus(1: required string airavataExperimentId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.ExperimentNotFoundException enf,
-              3: airavataErrors.AiravataClientException ace,
-              4: airavataErrors.AiravataSystemException ase)
-
-  list<experimentModel.DataObjectType> getExperimentOutputs (1: required string airavataExperimentId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.ExperimentNotFoundException enf,
-              3: airavataErrors.AiravataClientException ace,
-              4: airavataErrors.AiravataSystemException ase)
-
-
-  map<string, experimentModel.JobStatus> getJobStatuses(1: required string airavataExperimentId)
-              throws (1: airavataErrors.InvalidRequestException ire,
-                      2: airavataErrors.ExperimentNotFoundException enf,
-                      3: airavataErrors.AiravataClientException ace,
-                      4: airavataErrors.AiravataSystemException ase)
-
-  list<experimentModel.JobDetails> getJobDetails(1: required string airavataExperimentId)
-                throws (1: airavataErrors.InvalidRequestException ire,
-                        2: airavataErrors.ExperimentNotFoundException enf,
-                        3: airavataErrors.AiravataClientException ace,
-                        4: airavataErrors.AiravataSystemException ase)
-
-  list<experimentModel.DataTransferDetails> getDataTransferDetails(1: required string airavataExperimentId)
-                throws (1: airavataErrors.InvalidRequestException ire,
-                        2: airavataErrors.ExperimentNotFoundException enf,
-                        3: airavataErrors.AiravataClientException ace,
-                        4: airavataErrors.AiravataSystemException ase)
-
-
-
-
-  /**
-   * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
-   *   The client has to subsequently update this configuration if needed and launch the cloned experiment. 
-   *
-   * @param newExperimentName
-   *    experiment name that should be used in the cloned experiment
-   *
-   * @param updatedExperiment
-   *    Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
-   *      the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
-   *      should be shared public by default.
-   *
-   * @return
-   *   The server-side generated airavata experiment globally unique identifier for the newly cloned experiment.
-   *
-   * @throws org.apache.airavata.model.error.InvalidRequestException
-   *    For any incorrect forming of the request itself.
-   * 
-   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
-   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
-   * 
-   * @throws org.apache.airavata.model.error.AiravataClientException
-   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-   *      
-   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-   *         gateway registration steps and retry this request.
-   *
-   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-   *         For now this is a place holder.
-   *
-   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-   *         is implemented, the authorization will be more substantial.
-   *
-   * @throws org.apache.airavata.model.error.AiravataSystemException
-   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-   *       rather an Airavata Administrator will be notified to take corrective action.
-   *
-  */
-  string cloneExperiment(1: string existingExperimentID,
-                         2: string newExperimentName)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.ExperimentNotFoundException enf,
-            3: airavataErrors.AiravataClientException ace,
-            4: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Terminate a running experiment.
-   *
-   * @param airavataExperimentId
-   *    The identifier for the requested experiment. This is returned during the create experiment step.
-   *
-   * @return
-   *   This method call does not have a return value.
-   *
-   * @throws org.apache.airavata.model.error.InvalidRequestException
-   *    For any incorrect forming of the request itself.
-   * 
-   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
-   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
-   * 
-   * @throws org.apache.airavata.model.error.AiravataClientException
-   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
-   *      
-   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
-   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
-   *         gateway registration steps and retry this request.
-   *
-   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
-   *         For now this is a place holder.
-   *
-   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
-   *         is implemented, the authorization will be more substantial.
-   *
-   * @throws org.apache.airavata.model.error.AiravataSystemException
-   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
-   *       rather an Airavata Administrator will be notified to take corrective action.
-   *
-  */
-  void terminateExperiment(1: string airavataExperimentId)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.ExperimentNotFoundException enf,
-            3: airavataErrors.AiravataClientException ace,
-            4: airavataErrors.AiravataSystemException ase)
-
-/*
- * API definitions for App Catalog related operations
- *
-*/
-
-/*
- * Application Module is a specific computational application. Many applications, particularly scientific applications
- *  are really a suite of applications or encompass an ecosystem. For instance, Amber is referred to dozens of binaries.
- *  WRF is referred for an ecosystem of applications. In this context, we refer to module as a single binary.
- *
- * Note: A module has to be defined before a deployment can be registered.
- *
-*/
-
-  /**
-   * Register a Application Module.
-   *
-   * @param applicationModule
-   *    Application Module Object created from the datamodel.
-   *
-   * @return appModuleId
-   *   Returns a server-side generated airavata appModule globally unique identifier.
-   *
-  */
-  string registerApplicationModule(1: required applicationDeploymentModel.ApplicationModule applicationModule)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a Application Module.
-   *
-   * @param appModuleId
-   *   The identifier for the requested application module
-   *
-   * @return applicationModule
-   *   Returns a application Module Object.
-   *
-  */
-  applicationDeploymentModel.ApplicationModule getApplicationModule(1: required string appModuleId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Application Module.
-   *
-   * @param appModuleId
-   *   The identifier for the requested application module to be updated.
-   *
-   * @param applicationModule
-   *    Application Module Object created from the datamodel.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateApplicationModule(1: required string appModuleId,
-            2: required applicationDeploymentModel.ApplicationModule applicationModule)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a Application Module.
-   *
-   * @param appModuleId
-   *   The identifier for the requested application module to be deleted.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteApplicationModule(1: required string appModuleId)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-/*
- * Application Deployment registers a deployment of a application module on a compute resource
- *
-*/
-
-  /**
-   * Register a Application Deployment.
-   *
-   * @param applicationModule
-   *    Application Module Object created from the datamodel.
-   *
-   * @return appDeploymentId
-   *   Returns a server-side generated airavata appDeployment globally unique identifier.
-   *
-  */
-  string registerApplicationDeployment(1: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a Application Deployment.
-   *
-   * @param appDeploymentId
-   *   The identifier for the requested application module
-   *
-   * @return applicationDeployment
-   *   Returns a application Deployment Object.
-   *
-  */
-  applicationDeploymentModel.ApplicationDeploymentDescription getApplicationDeployment(1: required string appDeploymentId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Application Deployment.
-   *
-   * @param appDeploymentId
-   *   The identifier for the requested application deployment to be updated.
-   *
-   * @param appDeployment
-   *    Application Deployment Object created from the datamodel.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateApplicationDeployment(1: required string appDeploymentId,
-            2: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a Application deployment.
-   *
-   * @param appDeploymentId
-   *   The identifier for the requested application deployment to be deleted.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteApplicationDeployment(1: required string appDeploymentId)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a list of Deployed Compute Hosts.
-   *
-   * @param appModuleId
-   *   The identifier for the requested application module
-   *
-   * @return list<string>
-   *   Returns a list of Deployed Resources.
-   *
-  */
-  list<string> getAppModuleDeployedResources(1: required string appModuleId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-/*
- * Application Interface
- *
-*/
-
-  /**
-   * Register a Application Interface.
-   *
-   * @param applicationModule
-   *    Application Module Object created from the datamodel.
-   *
-   * @return appInterfaceId
-   *   Returns a server-side generated airavata application interface globally unique identifier.
-   *
-  */
-  string registerApplicationInterface(1: required applicationInterfaceModel.ApplicationInterfaceDescription
-                                            applicationInterface)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a Application Interface.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application module
-   *
-   * @return applicationInterface
-   *   Returns a application Interface Object.
-   *
-   *
-  */
-  applicationInterfaceModel.ApplicationInterfaceDescription getApplicationInterface(1: required string appInterfaceId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Application Interface.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application deployment to be updated.
-   *
-   * @param appInterface
-   *    Application Interface Object created from the datamodel.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-   *
-  */
-  bool updateApplicationInterface(1: required string appInterfaceId,
-            2: required applicationInterfaceModel.ApplicationInterfaceDescription applicationInterface)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a Application Interface.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application interface to be deleted.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-   *
-  */
-  bool deleteApplicationInterface(1: required string appInterfaceId)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch name and id of  Application Interface documents.
-   *
-   *
-   * @return map<applicationId, applicationInterfaceNames>
-   *   Returns a list of application interfaces with corresponsing id's
-   *
-  */
-  map<string, string> getAllApplicationInterfaceNames ()
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch all Application Interface documents.
-   *
-   *
-   * @return map<applicationId, applicationInterfaceNames>
-   *   Returns a list of application interfaces documents
-   *
-  */
-  list<applicationInterfaceModel.ApplicationInterfaceDescription> getAllApplicationInterfaces ()
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch the list of Application Inputs.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application interface
-   *
-   * @return list<applicationInterfaceModel.InputDataObjectType>
-   *   Returns a list of application inputs.
-   *
-  */
-  list<applicationInterfaceModel.InputDataObjectType> getApplicationInputs(1: required string appInterfaceId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch the list of Application Outputs.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application interface
-   *
-   * @return list<applicationInterfaceModel.OutputDataObjectType>
-   *   Returns a list of application outputs.
-   *
-  */
-  list<applicationInterfaceModel.OutputDataObjectType> getApplicationOutputs(1: required string appInterfaceId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a list of all deployed Compute Hosts for a given application interfaces.
-   *
-   * @param appInterfaceId
-   *   The identifier for the requested application interface
-   *
-   * @return map<computeResourceId, computeResourceName>
-   *   A map of registered compute resource id's and their corresponding hostnames.
-   *    Deployments of each modules listed within the interfaces will be listed.
-   *
-  */
-  map<string, string> getAvailableAppInterfaceComputeResources(1: required string appInterfaceId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-/*
- * Compute Resource
- *
-*/
-
-  /**
-   * Register a Compute Resource.
-   *
-   * @param computeResourceDescription
-   *    Compute Resource Object created from the datamodel.
-   *
-   * @return computeResourceId
-   *   Returns a server-side generated airavata compute resource globally unique identifier.
-   *
-  */
-  string registerComputeResource(1: required computeResourceModel.ComputeResourceDescription
-                                            computeResourceDescription)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch the given Compute Resource.
-   *
-   * @param computeResourceId
-   *   The identifier for the requested compute resource
-   *
-   * @return computeResourceDescription
-   *    Compute Resource Object created from the datamodel..
-   *
-  */
-  computeResourceModel.ComputeResourceDescription getComputeResource(1: required string computeResourceId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch all registered Compute Resources.
-   *
-   * @return A map of registered compute resource id's and thier corresponding hostnames.
-   *    Compute Resource Object created from the datamodel..
-   *
-  */
-  map<string, string> getAllComputeResourceNames()
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Compute Resource.
-   *
-   * @param computeResourceId
-   *   The identifier for the requested compute resource to be updated.
-   *
-   * @param computeResourceDescription
-   *    Compute Resource Object created from the datamodel.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateComputeResource(1: required string computeResourceId,
-            2: required computeResourceModel.ComputeResourceDescription computeResourceDescription)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a Compute Resource.
-   *
-   * @param computeResourceId
-   *   The identifier for the requested compute resource to be deleted.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteComputeResource(1: required string computeResourceId)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Add a Local Job Submission details to a compute resource
-   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param localSubmission
-   *   The LOCALSubmission object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-   *
-  */
-  string addLocalSubmissionDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.LOCALSubmission localSubmission)
-
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update the given Local Job Submission details
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param localSubmission
-   *   The LOCALSubmission object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool updateLocalSubmissionDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.LOCALSubmission localSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-  * This method returns localJobSubmission object
-  * @param jobSubmissionInterfaceId
-  *   The identifier of the JobSubmission Interface to be retrieved.
-  *  @return LOCALSubmission instance
-  **/
-  computeResourceModel.LOCALSubmission getLocalJobSubmission(1: required string jobSubmissionId)
-            throws (1: airavataErrors.InvalidRequestException ire,
-                    2: airavataErrors.AiravataClientException ace,
-                    3: airavataErrors.AiravataSystemException ase)
-
-
-
-  /**
-   * Add a SSH Job Submission details to a compute resource
-   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param sshJobSubmission
-   *   The SSHJobSubmission object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-   *
-  */
-
-
-  string addSSHJobSubmissionDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.SSHJobSubmission sshJobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-    /**
-    * This method returns SSHJobSubmission object
-    * @param jobSubmissionInterfaceId
-    *   The identifier of the JobSubmission Interface to be retrieved.
-    *  @return SSHJobSubmission instance
-    **/
-    computeResourceModel.SSHJobSubmission getSSHJobSubmission(1: required string jobSubmissionId)
-              throws (1: airavataErrors.InvalidRequestException ire,
-                      2: airavataErrors.AiravataClientException ace,
-                      3: airavataErrors.AiravataSystemException ase)
-
-
-
-  /**
-   * Add a UNICORE Job Submission details to a compute resource
-   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param unicoreJobSubmission
-   *   The UnicoreJobSubmission object to be added to the resource.
-   *
-   * @return status
-   *  Returns the unique job submission id.
-   *
-  */
-  string addUNICOREJobSubmissionDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.UnicoreJobSubmission unicoreJobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-
-  /**
-    * This method returns UnicoreJobSubmission object
-    * @param jobSubmissionInterfaceId
-    *   The identifier of the JobSubmission Interface to be retrieved.
-    *  @return UnicoreJobSubmission instance
-  **/
-  computeResourceModel.UnicoreJobSubmission getUnicoreJobSubmission(1: required string jobSubmissionId)
-                throws (1: airavataErrors.InvalidRequestException ire,
-                        2: airavataErrors.AiravataClientException ace,
-                        3: airavataErrors.AiravataSystemException ase)
-
-
- /**
-   * Add a Cloud Job Submission details to a compute resource
-   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param sshJobSubmission
-   *   The SSHJobSubmission object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-**/
- string addCloudJobSubmissionDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.CloudJobSubmission cloudSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- /**
-    * This method returns cloudJobSubmission object
-    * @param jobSubmissionInterfaceI
-        *   The identifier of the JobSubmission Interface to be retrieved.
-    *  @return CloudJobSubmission instance
- **/
- computeResourceModel.CloudJobSubmission getCloudJobSubmission(1: required string jobSubmissionId)
-                  throws (1: airavataErrors.InvalidRequestException ire,
-                          2: airavataErrors.AiravataClientException ace,
-                          3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update the given SSH Job Submission details
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param sshJobSubmission
-   *   The SSHJobSubmission object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool updateSSHJobSubmissionDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.SSHJobSubmission sshJobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-/**
-   * Update the given SSH Job Submission details
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param cloudJobSubmission
-   *   The CloudJobSubmission object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool updateCloudJobSubmissionDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.CloudJobSubmission sshJobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Add a Local data movement details to a compute resource
-   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param localDataMovement
-   *   The LOCALDataMovement object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-   *
-  */
-  string addLocalDataMovementDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.LOCALDataMovement localDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update the given Local data movement details
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param localDataMovement
-   *   The LOCALDataMovement object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateLocalDataMovementDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.LOCALDataMovement localDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-          * This method returns local datamovement object
-          * @param dataMovementId
-          *   The identifier of the datamovement Interface to be retrieved.
-          *  @return LOCALDataMovement instance
-  **/
-  computeResourceModel.LOCALDataMovement getLocalDataMovement(1: required string dataMovementId)
-                    throws (1: airavataErrors.InvalidRequestException ire,
-                            2: airavataErrors.AiravataClientException ace,
-                            3: airavataErrors.AiravataSystemException ase)
-
-
-  /**
-   * Add a SCP data movement details to a compute resource
-   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param scpDataMovement
-   *   The SCPDataMovement object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-   *
-  */
-  string addSCPDataMovementDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.SCPDataMovement scpDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update the given scp data movement details
-   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param scpDataMovement
-   *   The SCPDataMovement object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateSCPDataMovementDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.SCPDataMovement scpDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- /**
-    * This method returns SCP datamovement object
-    * @param dataMovementId
-       *   The identifier of the datamovement Interface to be retrieved.
-       *  @return SCPDataMovement instance
-  **/
-  computeResourceModel.SCPDataMovement getSCPDataMovement(1: required string dataMovementId)
-                    throws (1: airavataErrors.InvalidRequestException ire,
-                            2: airavataErrors.AiravataClientException ace,
-                            3: airavataErrors.AiravataSystemException ase)
-
-
-  /**
-   * Add a GridFTP data movement details to a compute resource
-   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
-   *
-   * @param computeResourceId
-   *   The identifier of the compute resource to which JobSubmission protocol to be added
-   *
-   * @param priorityOrder
-   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
-   *
-   * @param gridFTPDataMovement
-   *   The GridFTPDataMovement object to be added to the resource.
-   *
-   * @return status
-   *   Returns the unique job submission id.
-   *
-  */
-  string addGridFTPDataMovementDetails(1: required string computeResourceId,
-            2: required i32 priorityOrder,
-            3: required computeResourceModel.GridFTPDataMovement gridFTPDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update the given GridFTP data movement details to a compute resource
-   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be updated.
-   *
-   * @param gridFTPDataMovement
-   *   The GridFTPDataMovement object to be updated.
-   *
-   * @return status
-   *   Returns a success/failure of the updation.
-   *
-  */
-  bool updateGridFTPDataMovementDetails(1: required string jobSubmissionInterfaceId,
-            2: required computeResourceModel.GridFTPDataMovement gridFTPDataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- /**
-    * This method returns GridFTP datamovement object
-    * @param dataMovementId
-       *   The identifier of the datamovement Interface to be retrieved.
-    *  @return GridFTPDataMovement instance
-  **/
-  computeResourceModel.GridFTPDataMovement getGridFTPDataMovement(1: required string dataMovementId)
-                    throws (1: airavataErrors.InvalidRequestException ire,
-                            2: airavataErrors.AiravataClientException ace,
-                            3: airavataErrors.AiravataSystemException ase)
-
-
-  /**
-   * Change the priority of a given job submisison interface
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be changed
-   *
-   * @param priorityOrder
-   *   The new priority of the job manager interface.
-   *
-   * @return status
-   *   Returns a success/failure of the change.
-   *
-  */
-  bool changeJobSubmissionPriority(1: required string jobSubmissionInterfaceId,
-            2: required i32 newPriorityOrder)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Change the priority of a given data movement interface
-   *
-   * @param dataMovementInterfaceId
-   *   The identifier of the DataMovement Interface to be changed
-   *
-   * @param priorityOrder
-   *   The new priority of the data movement interface.
-   *
-   * @return status
-   *   Returns a success/failure of the change.
-   *
-  */
-  bool changeDataMovementPriority(1: required string dataMovementInterfaceId,
-            2: required i32 newPriorityOrder)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Change the priorities of a given set of job submission interfaces
-   *
-   * @param jobSubmissionPriorityMap
-   *   A Map of identifiers of the JobSubmission Interfaces and thier associated priorities to be set.
-   *
-   * @return status
-   *   Returns a success/failure of the changes.
-   *
-  */
-  bool changeJobSubmissionPriorities(1: required map<string, i32> jobSubmissionPriorityMap)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Change the priorities of a given set of data movement interfaces
-   *
-   * @param dataMovementPriorityMap
-   *   A Map of identifiers of the DataMovement Interfaces and thier associated priorities to be set.
-   *
-   * @return status
-   *   Returns a success/failure of the changes.
-   *
-  */
-  bool changeDataMovementPriorities(1: required map<string, i32> dataMovementPriorityMap)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a given job submisison interface
-   *
-   * @param jobSubmissionInterfaceId
-   *   The identifier of the JobSubmission Interface to be changed
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteJobSubmissionInterface(1: required string jobSubmissionInterfaceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete a given data movement interface
-   *
-   * @param dataMovementInterfaceId
-   *   The identifier of the DataMovement Interface to be changed
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteDataMovementInterface(1: required string dataMovementInterfaceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- string registerResourceJobManager(1: required computeResourceModel.ResourceJobManager resourceJobManager)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- bool updateResourceJobManager(1: required string resourceJobManagerId, 2: required computeResourceModel.ResourceJobManager updatedResourceJobManager)
-     throws (1: airavataErrors.InvalidRequestException ire,
-             2: airavataErrors.AiravataClientException ace,
-             3: airavataErrors.AiravataSystemException ase)
-
- computeResourceModel.ResourceJobManager getResourceJobManager(1: required string resourceJobManagerId)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
- bool deleteResourceJobManager(1: required string resourceJobManagerId)
-       throws (1: airavataErrors.InvalidRequestException ire,
-               2: airavataErrors.AiravataClientException ace,
-               3: airavataErrors.AiravataSystemException ase)
-/*
- * Gateway Resource Profile
- *
-*/
-
-  /**
-   * Register a Gateway Resource Profile.
-   *
-   * @param gatewayResourceProfile
-   *    Gateway Resource Profile Object.
-   *    The GatewayID should be obtained from Airavata gateway registration and passed to register a corresponding
-   *      resource profile.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  string registerGatewayResourceProfile(
-                    1: required gatewayResourceProfileModel.GatewayResourceProfile gatewayResourceProfile)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch the given Gateway Resource Profile.
-   *
-   * @param gatewayID
-   *   The identifier for the requested gateway resource
-   *
-   * @return gatewayResourceProfile
-   *    Gateway Resource Profile Object.
-   *
-  */
-  gatewayResourceProfileModel.GatewayResourceProfile getGatewayResourceProfile(1: required string gatewayID)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Gateway Resource Profile.
-   *
-   * @param gatewayID
-   *   The identifier for the requested gateway resource to be updated.
-   *
-   * @param gatewayResourceProfile
-   *    Gateway Resource Profile Object.
-   *
-   * @return status
-   *   Returns a success/failure of the update.
-   *
-  */
-  bool updateGatewayResourceProfile(1: required string gatewayID,
-            2: required gatewayResourceProfileModel.GatewayResourceProfile gatewayResourceProfile)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete the given Gateway Resource Profile.
-   *
-   * @param gatewayID
-   *   The identifier for the requested gateway resource to be deleted.
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteGatewayResourceProfile(1: required string gatewayID)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Add a Compute Resource Preference to a registered gateway profile.
-   *
-   * @param gatewayID
-   *   The identifier for the gateway profile to be added.
-   *
-   * @param computeResourceId
-   *   Preferences related to a particular compute resource
-   *
-   * @param computeResourcePreference
-   *   The ComputeResourcePreference object to be added to the resource profile.
-   *
-   * @return status
-   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
-   *    Instead an update should be used.
-   *
-  */
-  bool addGatewayComputeResourcePreference(1: required string gatewayID,
-            2: required string computeResourceId,
-            3: required gatewayResourceProfileModel.ComputeResourcePreference computeResourcePreference)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch a Compute Resource Preference of a registered gateway profile.
-   *
-   * @param gatewayID
-   *   The identifier for the gateway profile to be requested
-   *
-   * @param computeResourceId
-   *   Preferences related to a particular compute resource
-   *
-   * @return computeResourcePreference
-   *   Returns the ComputeResourcePreference object.
-   *
-  */
-  gatewayResourceProfileModel.ComputeResourcePreference getGatewayComputeResourcePreference(1: required string gatewayID,
-            2: required string computeResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Fetch all Compute Resource Preferences of a registered gateway profile.
-   *
-   * @param gatewayID
-   *   The identifier for the gateway profile to be requested
-   *
-   * @return computeResourcePreference
-   *   Returns the ComputeResourcePreference object.
-   *
-  */
-  list<gatewayResourceProfileModel.ComputeResourcePreference>
-            getAllGatewayComputeResourcePreferences(1: required string gatewayID)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Update a Compute Resource Preference to a registered gateway profile.
-   *
-   * @param gatewayID
-   *   The identifier for the gateway profile to be updated.
-   *
-   * @param computeResourceId
-   *   Preferences related to a particular compute resource
-   *
-   * @param computeResourcePreference
-   *   The ComputeResourcePreference object to be updated to the resource profile.
-   *
-   * @return status
-   *   Returns a success/failure of the updation.
-   *
-  */
-  bool updateGatewayComputeResourcePreference(1: required string gatewayID,
-            2: required string computeResourceId,
-            3: required gatewayResourceProfileModel.ComputeResourcePreference computeResourcePreference)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Delete the Compute Resource Preference of a registered gateway profile.
-   *
-   * @param gatewayID
-   *   The identifier for the gateway profile to be deleted.
-   *
-   * @param computeResourceId
-   *   Preferences related to a particular compute resource
-   *
-   * @return status
-   *   Returns a success/failure of the deletion.
-   *
-  */
-  bool deleteGatewayComputeResourcePreference(1: required string gatewayID,
-            2: required string computeResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
- //End of API
- }
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/**
+ * Application Programming Interface definition for Apache Airavata Services.
+ *   this parent thrift file is contains all service interfaces. The data models are 
+ *   described in respective thrift files.
+*/
+
+include "airavataErrors.thrift"
+include "airavataDataModel.thrift"
+include "experimentModel.thrift"
+include "workspaceModel.thrift"
+include "computeResourceModel.thrift"
+include "applicationDeploymentModel.thrift"
+include "applicationInterfaceModel.thrift"
+include "gatewayResourceProfileModel.thrift"
+include "workflowDataModel.thrift"
+
+namespace java org.apache.airavata.api
+namespace php Airavata.API
+namespace cpp apache.airavata.api
+namespace perl ApacheAiravataAPI
+namespace py apache.airavata.api
+namespace js ApacheAiravataAPI
+
+/**
+ * Airavata Interface Versions depend upon this Thrift Interface File. When Making changes, please edit the
+ *  Version Constants according to Semantic Versioning Specification (SemVer) http://semver.org.
+ *
+ * Note: The Airavata API version may be different from the Airavata software release versions.
+ *
+ * The Airavata API version is composed as a dot delimited string with major, minor, and patch level components.
+ *
+ *  - Major: Incremented for backward incompatible changes. An example would be changes to interfaces.
+ *  - Minor: Incremented for backward compatible changes. An example would be the addition of a new optional methods.
+ *  - Patch: Incremented for bug fixes. The patch level should be increased for every edit that doesn't result
+ *              in a change to major/minor version numbers.
+ *
+*/
+const string AIRAVATA_API_VERSION = "0.14.0"
+
+service Airavata {
+
+/**
+ * Apache Airavata API Service Methods. For data structures associated in the signatures, please see included thrift files
+*/
+
+  /**
+   * Fetch Apache Airavata API version
+  */
+  string getAPIVersion()
+        throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+  
+  /**
+   * Create a Project
+   *
+  */
+  string createProject (1: required workspaceModel.Project project)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.AiravataClientException ace,
+              3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Update a Project
+   *
+  */
+  void updateProject (1: required string projectId,
+                      2: required workspaceModel.Project updatedProject)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.AiravataClientException ace,
+              3: airavataErrors.AiravataSystemException ase,
+              4: airavataErrors.ProjectNotFoundException pnfe)
+
+/**
+   * Get a Project by ID
+   *
+  */
+  workspaceModel.Project getProject (1: required string projectId)
+        throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase,
+                4: airavataErrors.ProjectNotFoundException pnfe)
+
+/**
+   * Get all Project by user
+   *
+  */
+  list<workspaceModel.Project> getAllUserProjects (1: required string userName)
+        throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
+  /**
+     * Get all Project for user by project name
+     *
+    */
+  list<workspaceModel.Project> searchProjectsByProjectName (1: required string userName, 2: required string projectName)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
+
+  /**
+    * Get all Project for user by project description
+    *
+  */
+  list<workspaceModel.Project> searchProjectsByProjectDesc (1: required string userName, 2: required string description)
+            throws (1: airavataErrors.InvalidRequestException ire,
+                    2: airavataErrors.AiravataClientException ace,
+                    3: airavataErrors.AiravataSystemException ase)
+
+
+  /**
+       * Search Experiments by experiment name
+       *
+    */
+  list<experimentModel.ExperimentSummary> searchExperimentsByName (1: required string userName, 2: required string expName)
+            throws (1: airavataErrors.InvalidRequestException ire,
+                    2: airavataErrors.AiravataClientException ace,
+                    3: airavataErrors.AiravataSystemException ase)
+
+  /**
+       * Search Experiments by experiment name
+       *
+  */
+  list<experimentModel.ExperimentSummary> searchExperimentsByDesc (1: required string userName, 2: required string description)
+              throws (1: airavataErrors.InvalidRequestException ire,
+                      2: airavataErrors.AiravataClientException ace,
+                      3: airavataErrors.AiravataSystemException ase)
+
+  /**
+       * Search Experiments by application id
+       *
+  */
+  list<experimentModel.ExperimentSummary> searchExperimentsByApplication (1: required string userName, 2: required string applicationId)
+              throws (1: airavataErrors.InvalidRequestException ire,
+                      2: airavataErrors.AiravataClientException ace,
+                      3: airavataErrors.AiravataSystemException ase)
+
+    /**
+         * Search Experiments by experiment status
+         *
+    */
+    list<experimentModel.ExperimentSummary> searchExperimentsByStatus (1: required string userName, 2: required experimentModel.ExperimentState experimentState)
+                throws (1: airavataErrors.InvalidRequestException ire,
+                        2: airavataErrors.AiravataClientException ace,
+                        3: airavataErrors.AiravataSystemException ase)
+
+    /**
+         * Search Experiments by experiment status
+         *
+    */
+    list<experimentModel.ExperimentSummary> searchExperimentsByCreationTime (1: required string userName, 2: required i64 fromTime, 3: required i64 toTime)
+                throws (1: airavataErrors.InvalidRequestException ire,
+                        2: airavataErrors.AiravataClientException ace,
+                        3: airavataErrors.AiravataSystemException ase)
+
+  /**
+     * Get all Experiments within a Project
+     *
+  */
+  list<experimentModel.Experiment> getAllExperimentsInProject(1: required string projectId)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase,
+                  4: airavataErrors.ProjectNotFoundException pnfe)
+
+  /**
+     * Get all Experiments by user
+     *
+  */
+  list<experimentModel.Experiment> getAllUserExperiments(1: required string userName)
+            throws (1: airavataErrors.InvalidRequestException ire,
+                    2: airavataErrors.AiravataClientException ace,
+                    3: airavataErrors.AiravataSystemException ase)
+
+  /**
+     * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
+     *   but inferred from the authentication header. This experiment is just a persistent place holder. The client
+     *   has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
+     *   registering the experiment in a persistent store.
+     *
+     * @param basicExperimentMetadata
+     *    The create experiment will require the basic experiment metadata like the name and description, intended user,
+     *      the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
+     *      the ExperimentMetadata is a required field.
+     *
+     * @return
+     *   The server-side generated airavata experiment globally unique identifier.
+     *
+     * @throws org.apache.airavata.model.error.InvalidRequestException
+     *    For any incorrect forming of the request itself.
+     *
+     * @throws org.apache.airavata.model.error.AiravataClientException
+     *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+     *
+     *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+     *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
+     *         gateway registration steps and retry this request.
+     *
+     *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+     *         For now this is a place holder.
+     *
+     *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+     *         is implemented, the authorization will be more substantial.
+     *
+     * @throws org.apache.airavata.model.error.AiravataSystemException
+     *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+     *       rather an Airavata Administrator will be notified to take corrective action.
+     *
+    */
+
+  string createExperiment(1: required experimentModel.Experiment experiment)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Fetch previously created experiment metadata.
+   *
+   * @param airavataExperimentId
+   *    The identifier for the requested experiment. This is returned during the create experiment step.
+   *
+   * @return experimentMetada
+   *   This method will return the previously stored experiment metadata.
+   *
+   * @throws org.apache.airavata.model.error.InvalidRequestException
+   *    For any incorrect forming of the request itself.
+   * 
+   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+   * 
+   * @throws org.apache.airavata.model.error.AiravataClientException
+   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+   *      
+   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
+   *         gateway registration steps and retry this request.
+   *
+   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+   *         For now this is a place holder.
+   *
+   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+   *         is implemented, the authorization will be more substantial.
+   *
+   * @throws org.apache.airavata.model.error.AiravataSystemException
+   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+   *       rather an Airavata Administrator will be notified to take corrective action.
+   *
+  */
+  experimentModel.Experiment getExperiment(1: required string airavataExperimentId)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.ExperimentNotFoundException enf,
+            3: airavataErrors.AiravataClientException ace,
+            4: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Configure a previously created experiment with required inputs, scheduling and other quality of service
+   *   parameters. This method only updates the experiment object within the registry. The experiment has to be launched
+   *   to make it actionable by the server.
+   *
+   * @param airavataExperimentId
+   *    The identifier for the requested experiment. This is returned during the create experiment step.
+   *
+   * @param experimentConfigurationData
+   *    The configuration information of the experiment with application input parameters, computational resource scheduling
+   *      information, special input output handling and additional quality of service parameters.
+   *
+   * @return
+   *   This method call does not have a return value.
+   *
+   * @throws org.apache.airavata.model.error.InvalidRequestException
+   *    For any incorrect forming of the request itself.
+   * 
+   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+   * 
+   * @throws org.apache.airavata.model.error.AiravataClientException
+   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+   *      
+   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
+   *         gateway registration steps and retry this request.
+   *
+   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+   *         For now this is a place holder.
+   *
+   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+   *         is implemented, the authorization will be more substantial.
+   *
+   * @throws org.apache.airavata.model.error.AiravataSystemException
+   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+   *       rather an Airavata Administrator will be notified to take corrective action.
+   *
+  */
+  void updateExperiment(1: required string airavataExperimentId,
+                        2: required experimentModel.Experiment experiment)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.ExperimentNotFoundException enf,
+            3: airavataErrors.AiravataClientException ace,
+            4: airavataErrors.AiravataSystemException ase)
+
+  void updateExperimentConfiguration(1: required string airavataExperimentId,
+                                       2: required experimentModel.UserConfigurationData userConfiguration)
+
+  void updateResourceScheduleing(1: required string airavataExperimentId,
+                                 2: required experimentModel.ComputationalResourceScheduling resourceScheduling)
+
+    /**
+     *
+     * Validate experiment configuration. A true in general indicates, the experiment is ready to be launched.
+     *
+     * @param experimentID
+     * @return sucess/failure
+     *
+    **/
+  bool validateExperiment(1: required string airavataExperimentId)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.ExperimentNotFoundException enf,
+              3: airavataErrors.AiravataClientException ace,
+              4: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Launch a previously created and configured experiment. Airavata Server will then start processing the request and appropriate
+   *   notifications and intermediate and output data will be subsequently available for this experiment.
+   *
+   * @param airavataExperimentId
+   *    The identifier for the requested experiment. This is returned during the create experiment step.
+   *
+   * @param airavataCredStoreToken:
+   *   A requirement to execute experiments within Airavata is to first register the targeted remote computational account
+   *     credentials with Airavata Credential Store. The administrative API (related to credential store) will return a
+   *     generated token associated with the registered credentials. The client has to security posses this token id and is
+   *     required to pass it to Airavata Server for all execution requests.
+   *   Note: At this point only the credential store token is required so the string is directly passed here. In future if 
+   *     if more security credentials are enables, then the structure ExecutionSecurityParameters should be used.
+   *   Note: This parameter is not persisted within Airavata Registry for security reasons.
+   *
+   * @return
+   *   This method call does not have a return value.
+   *
+   * @throws org.apache.airavata.model.error.InvalidRequestException
+   *    For any incorrect forming of the request itself.
+   * 
+   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
+   * 
+   * @throws org.apache.airavata.model.error.AiravataClientException
+   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
+   *      
+   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
+   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
+   *         gateway registration steps and retry this request.
+   *
+   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+   *         For now this is a place holder.
+   *
+   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+   *         is implemented, the authorization will be more substantial.
+   *
+   * @throws org.apache.airavata.model.error.AiravataSystemException
+   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+   *       rather an Airavata Administrator will be notified to take corrective action.
+   *
+  */
+  void launchExperiment(1: required string airavataExperimentId
+                        2: required string airavataCredStoreToken)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.ExperimentNotFoundException enf,
+            3: airavataErrors.AiravataClientException ace,
+            4: airavataErrors.AiravataSystemException ase,
+            5: airavataErrors.LaunchValidationException lve)
+
+
+    experimentModel.ExperimentStatus getExperimentStatus(1: required string airavataExperimentId)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.ExperimentNotFoundException enf,
+              3: airavataErrors.AiravataClientException ace,
+              4: airavataErrors.AiravataSystemException ase)
+
+  list<experimentModel.DataObjectType> getExperimentOutputs (1: required string airavataExperimentId)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.ExperimentNotFoundException enf,
+              3: airavataErrors.AiravataClientException ace,
+              4: airavataErrors.AiravataSystemException ase)
+
+
+  map<string, experimentModel.JobStatus> getJobStatuses(1: required string airavataExperimentId)
+              throws (1: airavataErrors.InvalidRequestException ire,
+                      2: airavataErrors.ExperimentNotFoundException enf,
+                      3: airavataErrors.AiravataClientException ace,
+                      4: airavataErrors.AiravataSystemException ase)
+
+  list<experimentModel.JobDetails> getJobDetails(1: required string airavataExperimentId)
+                throws (1: airavataErrors.InvalidRequestException ire,
+                        2: airavataErrors.ExperimentNotFoundException enf,
+                        3: airavataErrors.AiravataClientException ace,
+                        4: airavataErrors.AiravataSystemException ase)
+
+  list<experimentModel.DataTransferDetails> getDataTransferDetails(1: required string airavataExperimentId)
+                throws (1: airavataErrors.InvalidRequestException ire,
+                        2: airavataErrors.ExperimentNotFoundException enf,
+                        3: airavataErrors.AiravataClientException ace,
+                        4: airavataErrors.AiravataSystemException ase)
+
+
+
+
+  /**
+   * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
+   *   The client has to subsequently update this configuration if needed and launch the cloned experiment. 
+   *
+   * @param newExperimentName
+   *    experiment name that should be used in the cloned experiment
+   *
+   * @param updatedExperiment
+   *    Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
+   *      the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
+   *      should be shared public by de

<TRUNCATED>

[02/44] fixing AIRAVATA-1494

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index 3bbe805..d5eb326 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -109,6 +109,10 @@ class AiravataIf {
   virtual bool changeDataMovementPriorities(const std::map<std::string, int32_t> & dataMovementPriorityMap) = 0;
   virtual bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId) = 0;
   virtual bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId) = 0;
+  virtual void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) = 0;
+  virtual bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) = 0;
+  virtual void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) = 0;
+  virtual bool deleteResourceJobManager(const std::string& resourceJobManagerId) = 0;
   virtual void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
   virtual void getGatewayResourceProfile( ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& _return, const std::string& gatewayID) = 0;
   virtual bool updateGatewayResourceProfile(const std::string& gatewayID, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
@@ -399,6 +403,20 @@ class AiravataNull : virtual public AiravataIf {
     bool _return = false;
     return _return;
   }
+  void registerResourceJobManager(std::string& /* _return */, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* resourceJobManager */) {
+    return;
+  }
+  bool updateResourceJobManager(const std::string& /* resourceJobManagerId */, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* updatedResourceJobManager */) {
+    bool _return = false;
+    return _return;
+  }
+  void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* _return */, const std::string& /* resourceJobManagerId */) {
+    return;
+  }
+  bool deleteResourceJobManager(const std::string& /* resourceJobManagerId */) {
+    bool _return = false;
+    return _return;
+  }
   void registerGatewayResourceProfile(std::string& /* _return */, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& /* gatewayResourceProfile */) {
     return;
   }
@@ -10909,6 +10927,542 @@ class Airavata_deleteDataMovementInterface_presult {
 };
 
 
+class Airavata_registerResourceJobManager_args {
+ public:
+
+  Airavata_registerResourceJobManager_args() {
+  }
+
+  virtual ~Airavata_registerResourceJobManager_args() throw() {}
+
+   ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager resourceJobManager;
+
+  void __set_resourceJobManager(const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) {
+    resourceJobManager = val;
+  }
+
+  bool operator == (const Airavata_registerResourceJobManager_args & rhs) const
+  {
+    if (!(resourceJobManager == rhs.resourceJobManager))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_registerResourceJobManager_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_registerResourceJobManager_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_registerResourceJobManager_pargs {
+ public:
+
+
+  virtual ~Airavata_registerResourceJobManager_pargs() throw() {}
+
+  const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* resourceJobManager;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_registerResourceJobManager_result__isset {
+  _Airavata_registerResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_registerResourceJobManager_result__isset;
+
+class Airavata_registerResourceJobManager_result {
+ public:
+
+  Airavata_registerResourceJobManager_result() : success() {
+  }
+
+  virtual ~Airavata_registerResourceJobManager_result() throw() {}
+
+  std::string success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_registerResourceJobManager_result__isset __isset;
+
+  void __set_success(const std::string& val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_registerResourceJobManager_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_registerResourceJobManager_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_registerResourceJobManager_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_registerResourceJobManager_presult__isset {
+  _Airavata_registerResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_registerResourceJobManager_presult__isset;
+
+class Airavata_registerResourceJobManager_presult {
+ public:
+
+
+  virtual ~Airavata_registerResourceJobManager_presult() throw() {}
+
+  std::string* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_registerResourceJobManager_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_updateResourceJobManager_args {
+ public:
+
+  Airavata_updateResourceJobManager_args() : resourceJobManagerId() {
+  }
+
+  virtual ~Airavata_updateResourceJobManager_args() throw() {}
+
+  std::string resourceJobManagerId;
+   ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager updatedResourceJobManager;
+
+  void __set_resourceJobManagerId(const std::string& val) {
+    resourceJobManagerId = val;
+  }
+
+  void __set_updatedResourceJobManager(const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) {
+    updatedResourceJobManager = val;
+  }
+
+  bool operator == (const Airavata_updateResourceJobManager_args & rhs) const
+  {
+    if (!(resourceJobManagerId == rhs.resourceJobManagerId))
+      return false;
+    if (!(updatedResourceJobManager == rhs.updatedResourceJobManager))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_updateResourceJobManager_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_updateResourceJobManager_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_updateResourceJobManager_pargs {
+ public:
+
+
+  virtual ~Airavata_updateResourceJobManager_pargs() throw() {}
+
+  const std::string* resourceJobManagerId;
+  const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* updatedResourceJobManager;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_updateResourceJobManager_result__isset {
+  _Airavata_updateResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_updateResourceJobManager_result__isset;
+
+class Airavata_updateResourceJobManager_result {
+ public:
+
+  Airavata_updateResourceJobManager_result() : success(0) {
+  }
+
+  virtual ~Airavata_updateResourceJobManager_result() throw() {}
+
+  bool success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_updateResourceJobManager_result__isset __isset;
+
+  void __set_success(const bool val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_updateResourceJobManager_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_updateResourceJobManager_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_updateResourceJobManager_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_updateResourceJobManager_presult__isset {
+  _Airavata_updateResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_updateResourceJobManager_presult__isset;
+
+class Airavata_updateResourceJobManager_presult {
+ public:
+
+
+  virtual ~Airavata_updateResourceJobManager_presult() throw() {}
+
+  bool* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_updateResourceJobManager_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_getResourceJobManager_args {
+ public:
+
+  Airavata_getResourceJobManager_args() : resourceJobManagerId() {
+  }
+
+  virtual ~Airavata_getResourceJobManager_args() throw() {}
+
+  std::string resourceJobManagerId;
+
+  void __set_resourceJobManagerId(const std::string& val) {
+    resourceJobManagerId = val;
+  }
+
+  bool operator == (const Airavata_getResourceJobManager_args & rhs) const
+  {
+    if (!(resourceJobManagerId == rhs.resourceJobManagerId))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getResourceJobManager_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getResourceJobManager_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_getResourceJobManager_pargs {
+ public:
+
+
+  virtual ~Airavata_getResourceJobManager_pargs() throw() {}
+
+  const std::string* resourceJobManagerId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getResourceJobManager_result__isset {
+  _Airavata_getResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getResourceJobManager_result__isset;
+
+class Airavata_getResourceJobManager_result {
+ public:
+
+  Airavata_getResourceJobManager_result() {
+  }
+
+  virtual ~Airavata_getResourceJobManager_result() throw() {}
+
+   ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getResourceJobManager_result__isset __isset;
+
+  void __set_success(const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_getResourceJobManager_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_getResourceJobManager_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_getResourceJobManager_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_getResourceJobManager_presult__isset {
+  _Airavata_getResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_getResourceJobManager_presult__isset;
+
+class Airavata_getResourceJobManager_presult {
+ public:
+
+
+  virtual ~Airavata_getResourceJobManager_presult() throw() {}
+
+   ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_getResourceJobManager_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Airavata_deleteResourceJobManager_args {
+ public:
+
+  Airavata_deleteResourceJobManager_args() : resourceJobManagerId() {
+  }
+
+  virtual ~Airavata_deleteResourceJobManager_args() throw() {}
+
+  std::string resourceJobManagerId;
+
+  void __set_resourceJobManagerId(const std::string& val) {
+    resourceJobManagerId = val;
+  }
+
+  bool operator == (const Airavata_deleteResourceJobManager_args & rhs) const
+  {
+    if (!(resourceJobManagerId == rhs.resourceJobManagerId))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteResourceJobManager_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteResourceJobManager_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteResourceJobManager_pargs {
+ public:
+
+
+  virtual ~Airavata_deleteResourceJobManager_pargs() throw() {}
+
+  const std::string* resourceJobManagerId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteResourceJobManager_result__isset {
+  _Airavata_deleteResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteResourceJobManager_result__isset;
+
+class Airavata_deleteResourceJobManager_result {
+ public:
+
+  Airavata_deleteResourceJobManager_result() : success(0) {
+  }
+
+  virtual ~Airavata_deleteResourceJobManager_result() throw() {}
+
+  bool success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteResourceJobManager_result__isset __isset;
+
+  void __set_success(const bool val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_deleteResourceJobManager_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteResourceJobManager_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteResourceJobManager_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteResourceJobManager_presult__isset {
+  _Airavata_deleteResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteResourceJobManager_presult__isset;
+
+class Airavata_deleteResourceJobManager_presult {
+ public:
+
+
+  virtual ~Airavata_deleteResourceJobManager_presult() throw() {}
+
+  bool* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteResourceJobManager_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
 class Airavata_registerGatewayResourceProfile_args {
  public:
 
@@ -12403,6 +12957,18 @@ class AiravataClient : virtual public AiravataIf {
   bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId);
   void send_deleteDataMovementInterface(const std::string& dataMovementInterfaceId);
   bool recv_deleteDataMovementInterface();
+  void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager);
+  void send_registerResourceJobManager(const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager);
+  void recv_registerResourceJobManager(std::string& _return);
+  bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager);
+  void send_updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager);
+  bool recv_updateResourceJobManager();
+  void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId);
+  void send_getResourceJobManager(const std::string& resourceJobManagerId);
+  void recv_getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return);
+  bool deleteResourceJobManager(const std::string& resourceJobManagerId);
+  void send_deleteResourceJobManager(const std::string& resourceJobManagerId);
+  bool recv_deleteResourceJobManager();
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
   void send_registerGatewayResourceProfile(const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
   void recv_registerGatewayResourceProfile(std::string& _return);
@@ -12522,6 +13088,10 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
   void process_changeDataMovementPriorities(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_deleteJobSubmissionInterface(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_deleteDataMovementInterface(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_registerResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_updateResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_deleteResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_updateGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -12611,6 +13181,10 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
     processMap_["changeDataMovementPriorities"] = &AiravataProcessor::process_changeDataMovementPriorities;
     processMap_["deleteJobSubmissionInterface"] = &AiravataProcessor::process_deleteJobSubmissionInterface;
     processMap_["deleteDataMovementInterface"] = &AiravataProcessor::process_deleteDataMovementInterface;
+    processMap_["registerResourceJobManager"] = &AiravataProcessor::process_registerResourceJobManager;
+    processMap_["updateResourceJobManager"] = &AiravataProcessor::process_updateResourceJobManager;
+    processMap_["getResourceJobManager"] = &AiravataProcessor::process_getResourceJobManager;
+    processMap_["deleteResourceJobManager"] = &AiravataProcessor::process_deleteResourceJobManager;
     processMap_["registerGatewayResourceProfile"] = &AiravataProcessor::process_registerGatewayResourceProfile;
     processMap_["getGatewayResourceProfile"] = &AiravataProcessor::process_getGatewayResourceProfile;
     processMap_["updateGatewayResourceProfile"] = &AiravataProcessor::process_updateGatewayResourceProfile;
@@ -13391,6 +13965,44 @@ class AiravataMultiface : virtual public AiravataIf {
     return ifaces_[i]->deleteDataMovementInterface(dataMovementInterfaceId);
   }
 
+  void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->registerResourceJobManager(_return, resourceJobManager);
+    }
+    ifaces_[i]->registerResourceJobManager(_return, resourceJobManager);
+    return;
+  }
+
+  bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager);
+    }
+    return ifaces_[i]->updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager);
+  }
+
+  void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getResourceJobManager(_return, resourceJobManagerId);
+    }
+    ifaces_[i]->getResourceJobManager(_return, resourceJobManagerId);
+    return;
+  }
+
+  bool deleteResourceJobManager(const std::string& resourceJobManagerId) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->deleteResourceJobManager(resourceJobManagerId);
+    }
+    return ifaces_[i]->deleteResourceJobManager(resourceJobManagerId);
+  }
+
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
     size_t sz = ifaces_.size();
     size_t i = 0;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index 6b062f4..fde48c0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -424,6 +424,26 @@ class AiravataHandler : virtual public AiravataIf {
     printf("deleteDataMovementInterface\n");
   }
 
+  void registerResourceJobManager(std::string& _return, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) {
+    // Your implementation goes here
+    printf("registerResourceJobManager\n");
+  }
+
+  bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) {
+    // Your implementation goes here
+    printf("updateResourceJobManager\n");
+  }
+
+  void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) {
+    // Your implementation goes here
+    printf("getResourceJobManager\n");
+  }
+
+  bool deleteResourceJobManager(const std::string& resourceJobManagerId) {
+    // Your implementation goes here
+    printf("deleteResourceJobManager\n");
+  }
+
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
     // Your implementation goes here
     printf("registerGatewayResourceProfile\n");

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 792d8d3..3181377 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -94,6 +94,10 @@ interface AiravataIf {
   public function changeDataMovementPriorities($dataMovementPriorityMap);
   public function deleteJobSubmissionInterface($jobSubmissionInterfaceId);
   public function deleteDataMovementInterface($dataMovementInterfaceId);
+  public function registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager);
+  public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager);
+  public function getResourceJobManager($resourceJobManagerId);
+  public function deleteResourceJobManager($resourceJobManagerId);
   public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
   public function getGatewayResourceProfile($gatewayID);
   public function updateGatewayResourceProfile($gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
@@ -4781,6 +4785,247 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteDataMovementInterface failed: unknown result");
   }
 
+  public function registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager)
+  {
+    $this->send_registerResourceJobManager($resourceJobManager);
+    return $this->recv_registerResourceJobManager();
+  }
+
+  public function send_registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager)
+  {
+    $args = new \Airavata\API\Airavata_registerResourceJobManager_args();
+    $args->resourceJobManager = $resourceJobManager;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'registerResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('registerResourceJobManager', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_registerResourceJobManager()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerResourceJobManager_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_registerResourceJobManager_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("registerResourceJobManager failed: unknown result");
+  }
+
+  public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager)
+  {
+    $this->send_updateResourceJobManager($resourceJobManagerId, $updatedResourceJobManager);
+    return $this->recv_updateResourceJobManager();
+  }
+
+  public function send_updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager)
+  {
+    $args = new \Airavata\API\Airavata_updateResourceJobManager_args();
+    $args->resourceJobManagerId = $resourceJobManagerId;
+    $args->updatedResourceJobManager = $updatedResourceJobManager;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'updateResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('updateResourceJobManager', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_updateResourceJobManager()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateResourceJobManager_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_updateResourceJobManager_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("updateResourceJobManager failed: unknown result");
+  }
+
+  public function getResourceJobManager($resourceJobManagerId)
+  {
+    $this->send_getResourceJobManager($resourceJobManagerId);
+    return $this->recv_getResourceJobManager();
+  }
+
+  public function send_getResourceJobManager($resourceJobManagerId)
+  {
+    $args = new \Airavata\API\Airavata_getResourceJobManager_args();
+    $args->resourceJobManagerId = $resourceJobManagerId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getResourceJobManager', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getResourceJobManager()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getResourceJobManager_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getResourceJobManager_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getResourceJobManager failed: unknown result");
+  }
+
+  public function deleteResourceJobManager($resourceJobManagerId)
+  {
+    $this->send_deleteResourceJobManager($resourceJobManagerId);
+    return $this->recv_deleteResourceJobManager();
+  }
+
+  public function send_deleteResourceJobManager($resourceJobManagerId)
+  {
+    $args = new \Airavata\API\Airavata_deleteResourceJobManager_args();
+    $args->resourceJobManagerId = $resourceJobManagerId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'deleteResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('deleteResourceJobManager', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_deleteResourceJobManager()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteResourceJobManager_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_deleteResourceJobManager_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("deleteResourceJobManager failed: unknown result");
+  }
+
   public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
   {
     $this->send_registerGatewayResourceProfile($gatewayResourceProfile);
@@ -23173,6 +23418,881 @@ class Airavata_deleteDataMovementInterface_result {
 
 }
 
+class Airavata_registerResourceJobManager_args {
+  static $_TSPEC;
+
+  public $resourceJobManager = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'resourceJobManager',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['resourceJobManager'])) {
+        $this->resourceJobManager = $vals['resourceJobManager'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_registerResourceJobManager_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->resourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
+            $xfer += $this->resourceJobManager->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_registerResourceJobManager_args');
+    if ($this->resourceJobManager !== null) {
+      if (!is_object($this->resourceJobManager)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('resourceJobManager', TType::STRUCT, 1);
+      $xfer += $this->resourceJobManager->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_registerResourceJobManager_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_registerResourceJobManager_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_registerResourceJobManager_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateResourceJobManager_args {
+  static $_TSPEC;
+
+  public $resourceJobManagerId = null;
+  public $updatedResourceJobManager = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'resourceJobManagerId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'updatedResourceJobManager',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['resourceJobManagerId'])) {
+        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
+      }
+      if (isset($vals['updatedResourceJobManager'])) {
+        $this->updatedResourceJobManager = $vals['updatedResourceJobManager'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateResourceJobManager_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceJobManagerId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->updatedResourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
+            $xfer += $this->updatedResourceJobManager->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateResourceJobManager_args');
+    if ($this->resourceJobManagerId !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1);
+      $xfer += $output->writeString($this->resourceJobManagerId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->updatedResourceJobManager !== null) {
+      if (!is_object($this->updatedResourceJobManager)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('updatedResourceJobManager', TType::STRUCT, 2);
+      $xfer += $this->updatedResourceJobManager->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateResourceJobManager_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateResourceJobManager_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateResourceJobManager_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getResourceJobManager_args {
+  static $_TSPEC;
+
+  public $resourceJobManagerId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'resourceJobManagerId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['resourceJobManagerId'])) {
+        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getResourceJobManager_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceJobManagerId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getResourceJobManager_args');
+    if ($this->resourceJobManagerId !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1);
+      $xfer += $output->writeString($this->resourceJobManagerId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getResourceJobManager_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getResourceJobManager_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getResourceJobManager_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_deleteResourceJobManager_args {
+  static $_TSPEC;
+
+  public $resourceJobManagerId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'resourceJobManagerId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['resourceJobManagerId'])) {
+        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteResourceJobManager_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceJobManagerId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_deleteResourceJobManager_args');
+    if ($this->resourceJobManagerId !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1);
+      $xfer += $output->writeString($this->resourceJobManagerId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_deleteResourceJobManager_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteResourceJobManager_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_deleteResourceJobManager_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Airavata_registerGatewayResourceProfile_args {
   static $_TSPEC;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index b931391..2a051af 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -1368,6 +1368,25 @@ service Airavata {
             2: airavataErrors.AiravataClientException ace,
             3: airavataErrors.AiravataSystemException ase)
 
+ string registerResourceJobManager(1: required computeResourceModel.ResourceJobManager resourceJobManager)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+ bool updateResourceJobManager(1: required string resourceJobManagerId, 2: required computeResourceModel.ResourceJobManager updatedResourceJobManager)
+     throws (1: airavataErrors.InvalidRequestException ire,
+             2: airavataErrors.AiravataClientException ace,
+             3: airavataErrors.AiravataSystemException ase)
+
+ computeResourceModel.ResourceJobManager getResourceJobManager(1: required string resourceJobManagerId)
+      throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.AiravataClientException ace,
+              3: airavataErrors.AiravataSystemException ase)
+
+ bool deleteResourceJobManager(1: required string resourceJobManagerId)
+       throws (1: airavataErrors.InvalidRequestException ire,
+               2: airavataErrors.AiravataClientException ace,
+               3: airavataErrors.AiravataSystemException ase)
 /*
  * Gateway Resource Profile
  *

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index 059e071..7ece54d 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -55,6 +55,12 @@ public interface ComputeResource {
 
 
     String addResourceJobManager(ResourceJobManager resourceJobManager) throws AppCatalogException;
+
+    void updateResourceJobManager (String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws AppCatalogException;
+
+    ResourceJobManager getResourceJobManager (String resourceJobManagerId) throws AppCatalogException;
+
+    void deleteResourceJobManager (String resourceJobManagerId) throws AppCatalogException;
     
     /**
      * This will add a SSHJobSubmission protocol to the database
@@ -79,6 +85,7 @@ public interface ComputeResource {
     String addUNICOREJobSubmission (UnicoreJobSubmission unicoreJobSubmission) throws AppCatalogException;
 
 
+
     String addLocalDataMovement (LOCALDataMovement localDataMovement) throws AppCatalogException;
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 023c103..dd1982e 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -738,7 +738,56 @@ public class ComputeResourceImpl implements ComputeResource {
 		return resource.getResourceJobManagerId();
 	}
 
-	@Override
+    @Override
+    public void updateResourceJobManager(String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws AppCatalogException {
+        try {
+            ResourceJobManagerResource resource = AppCatalogThriftConversion.getResourceJobManager(updatedResourceJobManager);
+            resource.setResourceJobManagerId(resourceJobManagerId);
+            resource.save();
+            Map<JobManagerCommand, String> jobManagerCommands = updatedResourceJobManager.getJobManagerCommands();
+            if (jobManagerCommands!=null) {
+                for (JobManagerCommand commandType : jobManagerCommands.keySet()) {
+                    JobManagerCommandResource r = new JobManagerCommandResource();
+                    Map<String, String> ids = new HashMap<String, String>();
+                    ids.put(AbstractResource.JobManagerCommandConstants.RESOURCE_JOB_MANAGER_ID, resourceJobManagerId);
+                    ids.put(AbstractResource.JobManagerCommandConstants.COMMAND_TYPE, commandType.toString());
+                    JobManagerCommandResource existingCommand = (JobManagerCommandResource)r.get(ids);
+                    existingCommand.setCommandType(commandType.toString());
+                    existingCommand.setCommand(jobManagerCommands.get(commandType));
+                    existingCommand.setResourceJobManagerId(resource.getResourceJobManagerId());
+                    existingCommand.save();
+                }
+            }
+        }catch (Exception e){
+            logger.error("Error while updating resource job manager..", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws AppCatalogException {
+        try {
+            ResourceJobManagerResource resource = new ResourceJobManagerResource();
+            ResourceJobManagerResource jobManagerResource = (ResourceJobManagerResource)resource.get(resourceJobManagerId);
+            return AppCatalogThriftConversion.getResourceJobManager(jobManagerResource);
+        }catch (Exception e){
+            logger.error("Error while retrieving resource job manager..", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public void deleteResourceJobManager(String resourceJobManagerId) throws AppCatalogException {
+        try {
+            ResourceJobManagerResource resource = new ResourceJobManagerResource();
+            resource.remove(resourceJobManagerId);
+        }catch (Exception e){
+            logger.error("Error while deleting resource job manager..", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
 	public String addLocalJobSubmission(LOCALSubmission localSubmission)
 			throws AppCatalogException {
 		localSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("LOCAL"));


[44/44] git commit: Merging changes

Posted by ch...@apache.org.
Merging changes


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/755273e1
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/755273e1
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/755273e1

Branch: refs/heads/gfac_appcatalog_int
Commit: 755273e1ad2a91e4aa64b41d1a52c25fff78fc5f
Parents: 7b8d984
Author: chathuriw <ka...@gmail.com>
Authored: Wed Nov 5 13:29:04 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 13:29:04 2014 -0500

----------------------------------------------------------------------
 .../airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/755273e1/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 643263f..331663f 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -41,9 +41,6 @@ import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtoco
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
 import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.apache.airavata.schemas.gfac.SSHHostType;
-import org.apache.zookeeper.ZooKeeper;
 
 import java.sql.Timestamp;
 import java.util.*;


[15/44] git commit: fixing errorneous id set

Posted by ch...@apache.org.
fixing errorneous id set


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0db9cad0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0db9cad0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0db9cad0

Branch: refs/heads/gfac_appcatalog_int
Commit: 0db9cad01273e0dc40be20042643c190044697ce
Parents: 306464c
Author: chathuriw <ka...@gmail.com>
Authored: Thu Oct 30 16:58:16 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Oct 30 16:58:16 2014 -0400

----------------------------------------------------------------------
 .../application/catalog/data/util/AppCatalogThriftConversion.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0db9cad0/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 05cfa11..14a0ab0 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
@@ -218,7 +218,7 @@ public class AppCatalogThriftConversion {
         resource.setAlternativeSshHostname(submission.getAlternativeSSHHostName());
         resource.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());
         ResourceJobManagerResource resourceJobManager = getResourceJobManager(submission.getResourceJobManager());
-        resourceJobManager.setResourceJobManagerId(submission.getJobSubmissionInterfaceId());
+//        resourceJobManager.setResourceJobManagerId(submission.getJobSubmissionInterfaceId());
         resource.setResourceJobManagerId(resourceJobManager.getResourceJobManagerId());
         resource.setResourceJobManagerResource(resourceJobManager);
         if (submission.getSecurityProtocol() != null){


[34/44] git commit: Removed MonitorMode from JobResourceManager and added it to SSHJobSubmission struct, changed MonitorModes enum values

Posted by ch...@apache.org.
Removed MonitorMode from JobResourceManager and added it to SSHJobSubmission struct, changed MonitorModes enum values


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/e28919c9
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/e28919c9
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/e28919c9

Branch: refs/heads/gfac_appcatalog_int
Commit: e28919c984b0b6a0f7f1203b66afb865a79b4e2b
Parents: 73e21be
Author: shamrath <sh...@gmail.com>
Authored: Thu Oct 30 16:34:35 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:15 2014 -0500

----------------------------------------------------------------------
 .../lib/airavata/computeResourceModel_types.cpp | 116 +++++++++---------
 .../lib/airavata/computeResourceModel_types.h   |  60 ++++-----
 .../Model/AppCatalog/ComputeResource/Types.php  |  58 ++++-----
 .../appcatalog/computeresource/MonitorMode.java |  16 +--
 .../computeresource/ResourceJobManager.java     | 121 +------------------
 .../computeresource/SSHJobSubmission.java       | 121 ++++++++++++++++++-
 .../computeResourceModel.thrift                 |  35 +++---
 7 files changed, 264 insertions(+), 263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index 27f62dd..25c7bf1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -61,16 +61,6 @@ const char* _kJobManagerCommandNames[] = {
 };
 const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kJobManagerCommandValues, _kJobManagerCommandNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-int _kMonitorModeValues[] = {
-  MonitorMode::PUSH,
-  MonitorMode::PULL
-};
-const char* _kMonitorModeNames[] = {
-  "PUSH",
-  "PULL"
-};
-const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-
 int _kFileSystemsValues[] = {
   FileSystems::HOME,
   FileSystems::WORK,
@@ -119,6 +109,16 @@ const char* _kJobSubmissionProtocolNames[] = {
 };
 const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
+int _kMonitorModeValues[] = {
+  MonitorMode::POLL_JOB_MANAGER,
+  MonitorMode::XSEDE_AMQP_SUBSCRIBE
+};
+const char* _kMonitorModeNames[] = {
+  "POLL_JOB_MANAGER",
+  "XSEDE_AMQP_SUBSCRIBE"
+};
+const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
 int _kDataMovementProtocolValues[] = {
   DataMovementProtocol::LOCAL,
   DataMovementProtocol::SCP,
@@ -147,8 +147,8 @@ const char* _kProviderNameNames[] = {
 };
 const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kProviderNameValues, _kProviderNameNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-const char* ResourceJobManager::ascii_fingerprint = "83F3E1FB1C076C79A1E733A1E531B938";
-const uint8_t ResourceJobManager::binary_fingerprint[16] = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
+const char* ResourceJobManager::ascii_fingerprint = "F61CAF80247D0E44C8D52504F3A43BED";
+const uint8_t ResourceJobManager::binary_fingerprint[16] = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
 
 uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -231,16 +231,6 @@ uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot)
           xfer += iprot->skip(ftype);
         }
         break;
-      case 6:
-        if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast9;
-          xfer += iprot->readI32(ecast9);
-          this->monitorMode = (MonitorMode::type)ecast9;
-          this->__isset.monitorMode = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -283,21 +273,16 @@ uint32_t ResourceJobManager::write(::apache::thrift::protocol::TProtocol* oprot)
     xfer += oprot->writeFieldBegin("jobManagerCommands", ::apache::thrift::protocol::T_MAP, 5);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->jobManagerCommands.size()));
-      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter10;
-      for (_iter10 = this->jobManagerCommands.begin(); _iter10 != this->jobManagerCommands.end(); ++_iter10)
+      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter9;
+      for (_iter9 = this->jobManagerCommands.begin(); _iter9 != this->jobManagerCommands.end(); ++_iter9)
       {
-        xfer += oprot->writeI32((int32_t)_iter10->first);
-        xfer += oprot->writeString(_iter10->second);
+        xfer += oprot->writeI32((int32_t)_iter9->first);
+        xfer += oprot->writeString(_iter9->second);
       }
       xfer += oprot->writeMapEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
-  if (this->__isset.monitorMode) {
-    xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 6);
-    xfer += oprot->writeI32((int32_t)this->monitorMode);
-    xfer += oprot->writeFieldEnd();
-  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -310,7 +295,6 @@ void swap(ResourceJobManager &a, ResourceJobManager &b) {
   swap(a.pushMonitoringEndpoint, b.pushMonitoringEndpoint);
   swap(a.jobManagerBinPath, b.jobManagerBinPath);
   swap(a.jobManagerCommands, b.jobManagerCommands);
-  swap(a.monitorMode, b.monitorMode);
   swap(a.__isset, b.__isset);
 }
 
@@ -484,9 +468,9 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast11;
-          xfer += iprot->readI32(ecast11);
-          this->securityProtocol = (SecurityProtocol::type)ecast11;
+          int32_t ecast10;
+          xfer += iprot->readI32(ecast10);
+          this->securityProtocol = (SecurityProtocol::type)ecast10;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -596,9 +580,9 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast12;
-          xfer += iprot->readI32(ecast12);
-          this->securityProtocol = (SecurityProtocol::type)ecast12;
+          int32_t ecast11;
+          xfer += iprot->readI32(ecast11);
+          this->securityProtocol = (SecurityProtocol::type)ecast11;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -608,14 +592,14 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->gridFTPEndPoints.clear();
-            uint32_t _size13;
-            ::apache::thrift::protocol::TType _etype16;
-            xfer += iprot->readListBegin(_etype16, _size13);
-            this->gridFTPEndPoints.resize(_size13);
-            uint32_t _i17;
-            for (_i17 = 0; _i17 < _size13; ++_i17)
+            uint32_t _size12;
+            ::apache::thrift::protocol::TType _etype15;
+            xfer += iprot->readListBegin(_etype15, _size12);
+            this->gridFTPEndPoints.resize(_size12);
+            uint32_t _i16;
+            for (_i16 = 0; _i16 < _size12; ++_i16)
             {
-              xfer += iprot->readString(this->gridFTPEndPoints[_i17]);
+              xfer += iprot->readString(this->gridFTPEndPoints[_i16]);
             }
             xfer += iprot->readListEnd();
           }
@@ -657,10 +641,10 @@ uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot
   xfer += oprot->writeFieldBegin("gridFTPEndPoints", ::apache::thrift::protocol::T_LIST, 3);
   {
     xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoints.size()));
-    std::vector<std::string> ::const_iterator _iter18;
-    for (_iter18 = this->gridFTPEndPoints.begin(); _iter18 != this->gridFTPEndPoints.end(); ++_iter18)
+    std::vector<std::string> ::const_iterator _iter17;
+    for (_iter17 = this->gridFTPEndPoints.begin(); _iter17 != this->gridFTPEndPoints.end(); ++_iter17)
     {
-      xfer += oprot->writeString((*_iter18));
+      xfer += oprot->writeString((*_iter17));
     }
     xfer += oprot->writeListEnd();
   }
@@ -714,9 +698,9 @@ uint32_t UnicoreDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast19;
-          xfer += iprot->readI32(ecast19);
-          this->securityProtocol = (SecurityProtocol::type)ecast19;
+          int32_t ecast18;
+          xfer += iprot->readI32(ecast18);
+          this->securityProtocol = (SecurityProtocol::type)ecast18;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -776,8 +760,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b) {
   swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
 }
 
-const char* LOCALSubmission::ascii_fingerprint = "D51508D1A661370F4785A01334DB8637";
-const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
+const char* LOCALSubmission::ascii_fingerprint = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
+const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
 
 uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -920,8 +904,8 @@ void swap(LOCALDataMovement &a, LOCALDataMovement &b) {
   swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
 }
 
-const char* SSHJobSubmission::ascii_fingerprint = "BCAF073DD81C8F6A9ED716A45569D2B3";
-const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
+const char* SSHJobSubmission::ascii_fingerprint = "A62183DAA7AFF027173705420A9D99D0";
+const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xA6,0x21,0x83,0xDA,0xA7,0xAF,0xF0,0x27,0x17,0x37,0x05,0x42,0x0A,0x9D,0x99,0xD0};
 
 uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -956,9 +940,9 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast20;
-          xfer += iprot->readI32(ecast20);
-          this->securityProtocol = (SecurityProtocol::type)ecast20;
+          int32_t ecast19;
+          xfer += iprot->readI32(ecast19);
+          this->securityProtocol = (SecurityProtocol::type)ecast19;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -988,6 +972,16 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast20;
+          xfer += iprot->readI32(ecast20);
+          this->monitorMode = (MonitorMode::type)ecast20;
+          this->__isset.monitorMode = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -1032,6 +1026,11 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
     xfer += oprot->writeI32(this->sshPort);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.monitorMode) {
+    xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 6);
+    xfer += oprot->writeI32((int32_t)this->monitorMode);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1044,6 +1043,7 @@ void swap(SSHJobSubmission &a, SSHJobSubmission &b) {
   swap(a.resourceJobManager, b.resourceJobManager);
   swap(a.alternativeSSHHostName, b.alternativeSSHHostName);
   swap(a.sshPort, b.sshPort);
+  swap(a.monitorMode, b.monitorMode);
   swap(a.__isset, b.__isset);
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index e94520d..582b2d1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -59,15 +59,6 @@ struct JobManagerCommand {
 
 extern const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES;
 
-struct MonitorMode {
-  enum type {
-    PUSH = 0,
-    PULL = 1
-  };
-};
-
-extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES;
-
 struct FileSystems {
   enum type {
     HOME = 0,
@@ -104,6 +95,15 @@ struct JobSubmissionProtocol {
 
 extern const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES;
 
+struct MonitorMode {
+  enum type {
+    POLL_JOB_MANAGER = 0,
+    XSEDE_AMQP_SUBSCRIBE = 1
+  };
+};
+
+extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES;
+
 struct DataMovementProtocol {
   enum type {
     LOCAL = 0,
@@ -127,20 +127,19 @@ struct ProviderName {
 extern const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES;
 
 typedef struct _ResourceJobManager__isset {
-  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false), monitorMode(false) {}
+  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false) {}
   bool pushMonitoringEndpoint;
   bool jobManagerBinPath;
   bool jobManagerCommands;
-  bool monitorMode;
 } _ResourceJobManager__isset;
 
 class ResourceJobManager {
  public:
 
-  static const char* ascii_fingerprint; // = "83F3E1FB1C076C79A1E733A1E531B938";
-  static const uint8_t binary_fingerprint[16]; // = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
+  static const char* ascii_fingerprint; // = "F61CAF80247D0E44C8D52504F3A43BED";
+  static const uint8_t binary_fingerprint[16]; // = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
 
-  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath(), monitorMode((MonitorMode::type)0) {
+  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath() {
   }
 
   virtual ~ResourceJobManager() throw() {}
@@ -150,7 +149,6 @@ class ResourceJobManager {
   std::string pushMonitoringEndpoint;
   std::string jobManagerBinPath;
   std::map<JobManagerCommand::type, std::string>  jobManagerCommands;
-  MonitorMode::type monitorMode;
 
   _ResourceJobManager__isset __isset;
 
@@ -177,11 +175,6 @@ class ResourceJobManager {
     __isset.jobManagerCommands = true;
   }
 
-  void __set_monitorMode(const MonitorMode::type val) {
-    monitorMode = val;
-    __isset.monitorMode = true;
-  }
-
   bool operator == (const ResourceJobManager & rhs) const
   {
     if (!(resourceJobManagerId == rhs.resourceJobManagerId))
@@ -200,10 +193,6 @@ class ResourceJobManager {
       return false;
     else if (__isset.jobManagerCommands && !(jobManagerCommands == rhs.jobManagerCommands))
       return false;
-    if (__isset.monitorMode != rhs.__isset.monitorMode)
-      return false;
-    else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
-      return false;
     return true;
   }
   bool operator != (const ResourceJobManager &rhs) const {
@@ -493,8 +482,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b);
 class LOCALSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "D51508D1A661370F4785A01334DB8637";
-  static const uint8_t binary_fingerprint[16]; // = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
+  static const char* ascii_fingerprint; // = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
+  static const uint8_t binary_fingerprint[16]; // = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
 
   LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS") {
   }
@@ -571,18 +560,19 @@ class LOCALDataMovement {
 void swap(LOCALDataMovement &a, LOCALDataMovement &b);
 
 typedef struct _SSHJobSubmission__isset {
-  _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true) {}
+  _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true), monitorMode(false) {}
   bool alternativeSSHHostName;
   bool sshPort;
+  bool monitorMode;
 } _SSHJobSubmission__isset;
 
 class SSHJobSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "BCAF073DD81C8F6A9ED716A45569D2B3";
-  static const uint8_t binary_fingerprint[16]; // = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
+  static const char* ascii_fingerprint; // = "A62183DAA7AFF027173705420A9D99D0";
+  static const uint8_t binary_fingerprint[16]; // = {0xA6,0x21,0x83,0xDA,0xA7,0xAF,0xF0,0x27,0x17,0x37,0x05,0x42,0x0A,0x9D,0x99,0xD0};
 
-  SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22) {
+  SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22), monitorMode((MonitorMode::type)0) {
   }
 
   virtual ~SSHJobSubmission() throw() {}
@@ -592,6 +582,7 @@ class SSHJobSubmission {
   ResourceJobManager resourceJobManager;
   std::string alternativeSSHHostName;
   int32_t sshPort;
+  MonitorMode::type monitorMode;
 
   _SSHJobSubmission__isset __isset;
 
@@ -617,6 +608,11 @@ class SSHJobSubmission {
     __isset.sshPort = true;
   }
 
+  void __set_monitorMode(const MonitorMode::type val) {
+    monitorMode = val;
+    __isset.monitorMode = true;
+  }
+
   bool operator == (const SSHJobSubmission & rhs) const
   {
     if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
@@ -633,6 +629,10 @@ class SSHJobSubmission {
       return false;
     else if (__isset.sshPort && !(sshPort == rhs.sshPort))
       return false;
+    if (__isset.monitorMode != rhs.__isset.monitorMode)
+      return false;
+    else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
+      return false;
     return true;
   }
   bool operator != (const SSHJobSubmission &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 3d7b921..9623821 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -49,15 +49,6 @@ final class JobManagerCommand {
   );
 }
 
-final class MonitorMode {
-  const PUSH = 0;
-  const PULL = 1;
-  static public $__names = array(
-    0 => 'PUSH',
-    1 => 'PULL',
-  );
-}
-
 final class FileSystems {
   const HOME = 0;
   const WORK = 1;
@@ -103,6 +94,15 @@ final class JobSubmissionProtocol {
   );
 }
 
+final class MonitorMode {
+  const POLL_JOB_MANAGER = 0;
+  const XSEDE_AMQP_SUBSCRIBE = 1;
+  static public $__names = array(
+    0 => 'POLL_JOB_MANAGER',
+    1 => 'XSEDE_AMQP_SUBSCRIBE',
+  );
+}
+
 final class DataMovementProtocol {
   const LOCAL = 0;
   const SCP = 1;
@@ -137,7 +137,6 @@ class ResourceJobManager {
   public $pushMonitoringEndpoint = null;
   public $jobManagerBinPath = null;
   public $jobManagerCommands = null;
-  public $monitorMode = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -170,10 +169,6 @@ class ResourceJobManager {
             'type' => TType::STRING,
             ),
           ),
-        6 => array(
-          'var' => 'monitorMode',
-          'type' => TType::I32,
-          ),
         );
     }
     if (is_array($vals)) {
@@ -192,9 +187,6 @@ class ResourceJobManager {
       if (isset($vals['jobManagerCommands'])) {
         $this->jobManagerCommands = $vals['jobManagerCommands'];
       }
-      if (isset($vals['monitorMode'])) {
-        $this->monitorMode = $vals['monitorMode'];
-      }
     }
   }
 
@@ -265,13 +257,6 @@ class ResourceJobManager {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 6:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->monitorMode);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -323,11 +308,6 @@ class ResourceJobManager {
       }
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->monitorMode !== null) {
-      $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
-      $xfer += $output->writeI32($this->monitorMode);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -1066,6 +1046,7 @@ class SSHJobSubmission {
   public $resourceJobManager = null;
   public $alternativeSSHHostName = null;
   public $sshPort = 22;
+  public $monitorMode = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -1091,6 +1072,10 @@ class SSHJobSubmission {
           'var' => 'sshPort',
           'type' => TType::I32,
           ),
+        6 => array(
+          'var' => 'monitorMode',
+          'type' => TType::I32,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -1109,6 +1094,9 @@ class SSHJobSubmission {
       if (isset($vals['sshPort'])) {
         $this->sshPort = $vals['sshPort'];
       }
+      if (isset($vals['monitorMode'])) {
+        $this->monitorMode = $vals['monitorMode'];
+      }
     }
   }
 
@@ -1167,6 +1155,13 @@ class SSHJobSubmission {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 6:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->monitorMode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -1208,6 +1203,11 @@ class SSHJobSubmission {
       $xfer += $output->writeI32($this->sshPort);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->monitorMode !== null) {
+      $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
+      $xfer += $output->writeI32($this->monitorMode);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
index 30528b7..2545711 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
@@ -31,17 +31,17 @@ import org.apache.thrift.TEnum;
 /**
  * Monitoring modes
  * 
- * PUSH:
- * Server will push job status changes.
+ * POLL_JOB_MANAGER:
+ * GFac need to pull job status changes.
  * 
- * PULL:
- * Need to pull and get the Job status changes.
+ * XSEDE_AMQP_SUBSCRIBE:
+ * Server will publish job status changes to amqp servert.
  * 
  * 
  */
 @SuppressWarnings("all") public enum MonitorMode implements org.apache.thrift.TEnum {
-  PUSH(0),
-  PULL(1);
+  POLL_JOB_MANAGER(0),
+  XSEDE_AMQP_SUBSCRIBE(1);
 
   private final int value;
 
@@ -63,9 +63,9 @@ import org.apache.thrift.TEnum;
   public static MonitorMode findByValue(int value) { 
     switch (value) {
       case 0:
-        return PUSH;
+        return POLL_JOB_MANAGER;
       case 1:
-        return PULL;
+        return XSEDE_AMQP_SUBSCRIBE;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
index d0487b1..680a40a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
@@ -74,7 +74,6 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField PUSH_MONITORING_ENDPOINT_FIELD_DESC = new org.apache.thrift.protocol.TField("pushMonitoringEndpoint", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_BIN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerBinPath", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerCommands", org.apache.thrift.protocol.TType.MAP, (short)5);
-  private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -87,7 +86,6 @@ import org.slf4j.LoggerFactory;
   private String pushMonitoringEndpoint; // optional
   private String jobManagerBinPath; // optional
   private Map<JobManagerCommand,String> jobManagerCommands; // optional
-  private MonitorMode monitorMode; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -99,12 +97,7 @@ import org.slf4j.LoggerFactory;
     RESOURCE_JOB_MANAGER_TYPE((short)2, "resourceJobManagerType"),
     PUSH_MONITORING_ENDPOINT((short)3, "pushMonitoringEndpoint"),
     JOB_MANAGER_BIN_PATH((short)4, "jobManagerBinPath"),
-    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands"),
-    /**
-     * 
-     * @see MonitorMode
-     */
-    MONITOR_MODE((short)6, "monitorMode");
+    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -129,8 +122,6 @@ import org.slf4j.LoggerFactory;
           return JOB_MANAGER_BIN_PATH;
         case 5: // JOB_MANAGER_COMMANDS
           return JOB_MANAGER_COMMANDS;
-        case 6: // MONITOR_MODE
-          return MONITOR_MODE;
         default:
           return null;
       }
@@ -171,7 +162,7 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS,_Fields.MONITOR_MODE};
+  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -187,8 +178,6 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
             new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobManagerCommand.class), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-    tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResourceJobManager.class, metaDataMap);
   }
@@ -238,9 +227,6 @@ import org.slf4j.LoggerFactory;
       }
       this.jobManagerCommands = __this__jobManagerCommands;
     }
-    if (other.isSetMonitorMode()) {
-      this.monitorMode = other.monitorMode;
-    }
   }
 
   public ResourceJobManager deepCopy() {
@@ -255,7 +241,6 @@ import org.slf4j.LoggerFactory;
     this.pushMonitoringEndpoint = null;
     this.jobManagerBinPath = null;
     this.jobManagerCommands = null;
-    this.monitorMode = null;
   }
 
   public String getResourceJobManagerId() {
@@ -392,37 +377,6 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  /**
-   * 
-   * @see MonitorMode
-   */
-  public MonitorMode getMonitorMode() {
-    return this.monitorMode;
-  }
-
-  /**
-   * 
-   * @see MonitorMode
-   */
-  public void setMonitorMode(MonitorMode monitorMode) {
-    this.monitorMode = monitorMode;
-  }
-
-  public void unsetMonitorMode() {
-    this.monitorMode = null;
-  }
-
-  /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
-  public boolean isSetMonitorMode() {
-    return this.monitorMode != null;
-  }
-
-  public void setMonitorModeIsSet(boolean value) {
-    if (!value) {
-      this.monitorMode = null;
-    }
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case RESOURCE_JOB_MANAGER_ID:
@@ -465,14 +419,6 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
-    case MONITOR_MODE:
-      if (value == null) {
-        unsetMonitorMode();
-      } else {
-        setMonitorMode((MonitorMode)value);
-      }
-      break;
-
     }
   }
 
@@ -493,9 +439,6 @@ import org.slf4j.LoggerFactory;
     case JOB_MANAGER_COMMANDS:
       return getJobManagerCommands();
 
-    case MONITOR_MODE:
-      return getMonitorMode();
-
     }
     throw new IllegalStateException();
   }
@@ -517,8 +460,6 @@ import org.slf4j.LoggerFactory;
       return isSetJobManagerBinPath();
     case JOB_MANAGER_COMMANDS:
       return isSetJobManagerCommands();
-    case MONITOR_MODE:
-      return isSetMonitorMode();
     }
     throw new IllegalStateException();
   }
@@ -581,15 +522,6 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
-    boolean this_present_monitorMode = true && this.isSetMonitorMode();
-    boolean that_present_monitorMode = true && that.isSetMonitorMode();
-    if (this_present_monitorMode || that_present_monitorMode) {
-      if (!(this_present_monitorMode && that_present_monitorMode))
-        return false;
-      if (!this.monitorMode.equals(that.monitorMode))
-        return false;
-    }
-
     return true;
   }
 
@@ -656,16 +588,6 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetMonitorMode()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     return 0;
   }
 
@@ -731,16 +653,6 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
-    if (isSetMonitorMode()) {
-      if (!first) sb.append(", ");
-      sb.append("monitorMode:");
-      if (this.monitorMode == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.monitorMode);
-      }
-      first = false;
-    }
     sb.append(")");
     return sb.toString();
   }
@@ -844,14 +756,6 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // MONITOR_MODE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
-              struct.setMonitorModeIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -904,13 +808,6 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldEnd();
         }
       }
-      if (struct.monitorMode != null) {
-        if (struct.isSetMonitorMode()) {
-          oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
-          oprot.writeI32(struct.monitorMode.getValue());
-          oprot.writeFieldEnd();
-        }
-      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -940,10 +837,7 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetJobManagerCommands()) {
         optionals.set(2);
       }
-      if (struct.isSetMonitorMode()) {
-        optionals.set(3);
-      }
-      oprot.writeBitSet(optionals, 4);
+      oprot.writeBitSet(optionals, 3);
       if (struct.isSetPushMonitoringEndpoint()) {
         oprot.writeString(struct.pushMonitoringEndpoint);
       }
@@ -960,9 +854,6 @@ import org.slf4j.LoggerFactory;
           }
         }
       }
-      if (struct.isSetMonitorMode()) {
-        oprot.writeI32(struct.monitorMode.getValue());
-      }
     }
 
     @Override
@@ -972,7 +863,7 @@ import org.slf4j.LoggerFactory;
       struct.setResourceJobManagerIdIsSet(true);
       struct.resourceJobManagerType = ResourceJobManagerType.findByValue(iprot.readI32());
       struct.setResourceJobManagerTypeIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         struct.pushMonitoringEndpoint = iprot.readString();
         struct.setPushMonitoringEndpointIsSet(true);
@@ -996,10 +887,6 @@ import org.slf4j.LoggerFactory;
         }
         struct.setJobManagerCommandsIsSet(true);
       }
-      if (incoming.get(3)) {
-        struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
-        struct.setMonitorModeIsSet(true);
-      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
index ef786de..4c19d31 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
@@ -66,6 +66,7 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.STRUCT, (short)3);
   private static final org.apache.thrift.protocol.TField ALTERNATIVE_SSHHOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternativeSSHHostName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)5);
+  private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -78,6 +79,7 @@ import org.slf4j.LoggerFactory;
   private ResourceJobManager resourceJobManager; // required
   private String alternativeSSHHostName; // optional
   private int sshPort; // optional
+  private MonitorMode monitorMode; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -89,7 +91,12 @@ import org.slf4j.LoggerFactory;
     SECURITY_PROTOCOL((short)2, "securityProtocol"),
     RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
     ALTERNATIVE_SSHHOST_NAME((short)4, "alternativeSSHHostName"),
-    SSH_PORT((short)5, "sshPort");
+    SSH_PORT((short)5, "sshPort"),
+    /**
+     * 
+     * @see MonitorMode
+     */
+    MONITOR_MODE((short)6, "monitorMode");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -114,6 +121,8 @@ import org.slf4j.LoggerFactory;
           return ALTERNATIVE_SSHHOST_NAME;
         case 5: // SSH_PORT
           return SSH_PORT;
+        case 6: // MONITOR_MODE
+          return MONITOR_MODE;
         default:
           return null;
       }
@@ -156,7 +165,7 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __SSHPORT_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT};
+  private _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT,_Fields.MONITOR_MODE};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -170,6 +179,8 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHJobSubmission.class, metaDataMap);
   }
@@ -210,6 +221,9 @@ import org.slf4j.LoggerFactory;
       this.alternativeSSHHostName = other.alternativeSSHHostName;
     }
     this.sshPort = other.sshPort;
+    if (other.isSetMonitorMode()) {
+      this.monitorMode = other.monitorMode;
+    }
   }
 
   public SSHJobSubmission deepCopy() {
@@ -225,6 +239,7 @@ import org.slf4j.LoggerFactory;
     this.alternativeSSHHostName = null;
     this.sshPort = 22;
 
+    this.monitorMode = null;
   }
 
   public String getJobSubmissionInterfaceId() {
@@ -349,6 +364,37 @@ import org.slf4j.LoggerFactory;
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
   }
 
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public MonitorMode getMonitorMode() {
+    return this.monitorMode;
+  }
+
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public void setMonitorMode(MonitorMode monitorMode) {
+    this.monitorMode = monitorMode;
+  }
+
+  public void unsetMonitorMode() {
+    this.monitorMode = null;
+  }
+
+  /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
+  public boolean isSetMonitorMode() {
+    return this.monitorMode != null;
+  }
+
+  public void setMonitorModeIsSet(boolean value) {
+    if (!value) {
+      this.monitorMode = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case JOB_SUBMISSION_INTERFACE_ID:
@@ -391,6 +437,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case MONITOR_MODE:
+      if (value == null) {
+        unsetMonitorMode();
+      } else {
+        setMonitorMode((MonitorMode)value);
+      }
+      break;
+
     }
   }
 
@@ -411,6 +465,9 @@ import org.slf4j.LoggerFactory;
     case SSH_PORT:
       return Integer.valueOf(getSshPort());
 
+    case MONITOR_MODE:
+      return getMonitorMode();
+
     }
     throw new IllegalStateException();
   }
@@ -432,6 +489,8 @@ import org.slf4j.LoggerFactory;
       return isSetAlternativeSSHHostName();
     case SSH_PORT:
       return isSetSshPort();
+    case MONITOR_MODE:
+      return isSetMonitorMode();
     }
     throw new IllegalStateException();
   }
@@ -494,6 +553,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_monitorMode = true && this.isSetMonitorMode();
+    boolean that_present_monitorMode = true && that.isSetMonitorMode();
+    if (this_present_monitorMode || that_present_monitorMode) {
+      if (!(this_present_monitorMode && that_present_monitorMode))
+        return false;
+      if (!this.monitorMode.equals(that.monitorMode))
+        return false;
+    }
+
     return true;
   }
 
@@ -560,6 +628,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMonitorMode()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -619,6 +697,16 @@ import org.slf4j.LoggerFactory;
       sb.append(this.sshPort);
       first = false;
     }
+    if (isSetMonitorMode()) {
+      if (!first) sb.append(", ");
+      sb.append("monitorMode:");
+      if (this.monitorMode == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.monitorMode);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -720,6 +808,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 6: // MONITOR_MODE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+              struct.setMonitorModeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -760,6 +856,13 @@ import org.slf4j.LoggerFactory;
         oprot.writeI32(struct.sshPort);
         oprot.writeFieldEnd();
       }
+      if (struct.monitorMode != null) {
+        if (struct.isSetMonitorMode()) {
+          oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
+          oprot.writeI32(struct.monitorMode.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -787,13 +890,19 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSshPort()) {
         optionals.set(1);
       }
-      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetMonitorMode()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
       if (struct.isSetAlternativeSSHHostName()) {
         oprot.writeString(struct.alternativeSSHHostName);
       }
       if (struct.isSetSshPort()) {
         oprot.writeI32(struct.sshPort);
       }
+      if (struct.isSetMonitorMode()) {
+        oprot.writeI32(struct.monitorMode.getValue());
+      }
     }
 
     @Override
@@ -806,7 +915,7 @@ import org.slf4j.LoggerFactory;
       struct.resourceJobManager = new ResourceJobManager();
       struct.resourceJobManager.read(iprot);
       struct.setResourceJobManagerIsSet(true);
-      BitSet incoming = iprot.readBitSet(2);
+      BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         struct.alternativeSSHHostName = iprot.readString();
         struct.setAlternativeSSHHostNameIsSet(true);
@@ -815,6 +924,10 @@ import org.slf4j.LoggerFactory;
         struct.sshPort = iprot.readI32();
         struct.setSshPortIsSet(true);
       }
+      if (incoming.get(2)) {
+        struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+        struct.setMonitorModeIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 80a70df..3d0472d 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -82,20 +82,6 @@ enum JobManagerCommand {
     SHOW_START
 }
 
-/**
-* Monitoring modes
-*
-* PUSH:
-* Server will push job status changes.
-*
-* PULL:
-* Need to pull and get the Job status changes.
-*
-**/
-enum MonitorMode {
-   PUSH,
-   PULL
-}
 
 /**
  * Resource Job Manager Information
@@ -119,8 +105,7 @@ struct ResourceJobManager {
     2: required ResourceJobManagerType resourceJobManagerType,
     3: optional string pushMonitoringEndpoint,
     4: optional string jobManagerBinPath,
-    5: optional map<JobManagerCommand, string> jobManagerCommands,
-    6: optional MonitorMode monitorMode
+    5: optional map<JobManagerCommand, string> jobManagerCommands
 }
 
 /**
@@ -206,6 +191,21 @@ enum JobSubmissionProtocol {
 }
 
 /**
+* Monitoring modes
+*
+* POLL_JOB_MANAGER:
+* GFac need to pull job status changes.
+*
+* XSEDE_AMQP_SUBSCRIBE:
+* Server will publish job status changes to amqp servert.
+*
+**/
+enum MonitorMode {
+   POLL_JOB_MANAGER,
+   XSEDE_AMQP_SUBSCRIBE
+}
+
+/**
  * Enumeration of data movement supported by Airavata
  *
  * SCP:
@@ -313,7 +313,8 @@ struct SSHJobSubmission {
     2: required SecurityProtocol securityProtocol,
     3: required ResourceJobManager resourceJobManager,
     4: optional string alternativeSSHHostName,
-    5: optional i32 sshPort = 22
+    5: optional i32 sshPort = 22,
+    6: optional MonitorMode monitorMode
 }
 
 struct GlobusJobSubmission {


[28/44] git commit: adding API method to getAllModules

Posted by ch...@apache.org.
adding API method to getAllModules


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/91f5de5c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/91f5de5c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/91f5de5c

Branch: refs/heads/gfac_appcatalog_int
Commit: 91f5de5ce3fd100daf2f53a27ea5e23da209d97d
Parents: ede66ed
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 16:28:01 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 16:28:01 2014 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   | 11 +++++++-
 .../appcatalog/cpi/ApplicationInterface.java    |  2 ++
 .../data/impl/ApplicationInterfaceImpl.java     | 16 +++++++++++
 .../data/resources/AppModuleResource.java       | 28 +++++++++++++++++++-
 4 files changed, 55 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/91f5de5c/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index e72bfbb..a760015 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1453,7 +1453,16 @@ public class AiravataServerHandler implements Airavata.Iface {
 
     @Override
     public List<ApplicationModule> getAllModules() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-        return null;
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getApplicationInterface().getAllApplicationModules();
+        } catch (AppCatalogException e) {
+            logger.error("Error while retrieving all application modules...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while retrieving all application modules. More info : " + e.getMessage());
+            throw exception;
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/91f5de5c/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ApplicationInterface.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ApplicationInterface.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ApplicationInterface.java
index dc12d8f..76e99a3 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ApplicationInterface.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ApplicationInterface.java
@@ -86,6 +86,8 @@ public interface ApplicationInterface {
      */
     List<ApplicationModule> getApplicationModules(Map<String, String> filters) throws AppCatalogException;
 
+    List<ApplicationModule> getAllApplicationModules() throws AppCatalogException;
+
     /**
      * This method will return a list of application interfaces according to given search criteria
      * @param filters map should be provided as the field name and it's value

http://git-wip-us.apache.org/repos/asf/airavata/blob/91f5de5c/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
index 87be3b6..48ddfa0 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
@@ -276,6 +276,22 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
     }
 
     @Override
+    public List<ApplicationModule> getAllApplicationModules() throws AppCatalogException {
+        List<ApplicationModule> applicationModules = new ArrayList<ApplicationModule>();
+        try {
+            AppModuleResource resource = new AppModuleResource();
+            List<Resource> resources = resource.getAll();
+            if (resources != null && !resources.isEmpty()){
+                applicationModules = AppCatalogThriftConversion.getAppModules(resources);
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving compute resource list...", e);
+            throw new AppCatalogException(e);
+        }
+        return applicationModules;
+    }
+
+    @Override
     public List<ApplicationInterfaceDescription> getApplicationInterfaces(Map<String, String> filters) throws AppCatalogException {
         List<ApplicationInterfaceDescription> appInterfaces = new ArrayList<ApplicationInterfaceDescription>();
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/91f5de5c/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
index a04de85..eabbef3 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
@@ -193,7 +193,33 @@ public class AppModuleResource extends AbstractResource {
 
     @Override
     public List<Resource> getAll() throws AppCatalogException {
-        return null;
+        List<Resource> appModuleResources = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = AppCatalogJPAUtils.getEntityManager();
+            em.getTransaction().begin();
+            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_MODULE);
+            Query q = generator.selectQuery(em);
+            List<?> results = q.getResultList();
+            for (Object result : results) {
+                ApplicationModule module = (ApplicationModule) result;
+                AppModuleResource appModuleResource = (AppModuleResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_MODULE, module);
+                appModuleResources.add(appModuleResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            throw new AppCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return appModuleResources;
     }
 
     @Override


[17/44] adding delete queue method

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index ca5ead1..e1c3da2 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -19768,6 +19768,250 @@ uint32_t Airavata_deleteResourceJobManager_presult::read(::apache::thrift::proto
   return xfer;
 }
 
+uint32_t Airavata_deleteBatchQueue_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_computeResourceId = false;
+  bool isset_queueName = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->computeResourceId);
+          isset_computeResourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->queueName);
+          isset_queueName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_computeResourceId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_queueName)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_args");
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->computeResourceId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->queueName);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_pargs");
+
+  xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->computeResourceId)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->queueName)));
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Airavata_deleteBatchQueue_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ace) {
+    xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ace.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ase) {
+    xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ase.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Airavata_deleteBatchQueue_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ace.read(iprot);
+          this->__isset.ace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ase.read(iprot);
+          this->__isset.ase = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
 uint32_t Airavata_registerGatewayResourceProfile_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
@@ -27421,6 +27665,74 @@ bool AiravataClient::recv_deleteResourceJobManager()
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteResourceJobManager failed: unknown result");
 }
 
+bool AiravataClient::deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName)
+{
+  send_deleteBatchQueue(computeResourceId, queueName);
+  return recv_deleteBatchQueue();
+}
+
+void AiravataClient::send_deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Airavata_deleteBatchQueue_pargs args;
+  args.computeResourceId = &computeResourceId;
+  args.queueName = &queueName;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+bool AiravataClient::recv_deleteBatchQueue()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("deleteBatchQueue") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  bool _return;
+  Airavata_deleteBatchQueue_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ace) {
+    throw result.ace;
+  }
+  if (result.__isset.ase) {
+    throw result.ase;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteBatchQueue failed: unknown result");
+}
+
 void AiravataClient::registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile)
 {
   send_registerGatewayResourceProfile(gatewayResourceProfile);
@@ -33174,6 +33486,69 @@ void AiravataProcessor::process_deleteResourceJobManager(int32_t seqid, ::apache
   }
 }
 
+void AiravataProcessor::process_deleteBatchQueue(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Airavata.deleteBatchQueue", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Airavata.deleteBatchQueue");
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Airavata.deleteBatchQueue");
+  }
+
+  Airavata_deleteBatchQueue_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Airavata.deleteBatchQueue", bytes);
+  }
+
+  Airavata_deleteBatchQueue_result result;
+  try {
+    result.success = iface_->deleteBatchQueue(args.computeResourceId, args.queueName);
+    result.__isset.success = true;
+  } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch ( ::apache::airavata::api::error::AiravataClientException &ace) {
+    result.ace = ace;
+    result.__isset.ace = true;
+  } catch ( ::apache::airavata::api::error::AiravataSystemException &ase) {
+    result.ase = ase;
+    result.__isset.ase = true;
+  } catch (const std::exception& e) {
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Airavata.deleteBatchQueue");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Airavata.deleteBatchQueue");
+  }
+
+  oprot->writeMessageBegin("deleteBatchQueue", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Airavata.deleteBatchQueue", bytes);
+  }
+}
+
 void AiravataProcessor::process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index a6168dd..7387517 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -113,6 +113,7 @@ class AiravataIf {
   virtual bool updateResourceJobManager(const std::string& resourceJobManagerId, const  ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) = 0;
   virtual void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) = 0;
   virtual bool deleteResourceJobManager(const std::string& resourceJobManagerId) = 0;
+  virtual bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) = 0;
   virtual void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
   virtual void getGatewayResourceProfile( ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& _return, const std::string& gatewayID) = 0;
   virtual bool updateGatewayResourceProfile(const std::string& gatewayID, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0;
@@ -417,6 +418,10 @@ class AiravataNull : virtual public AiravataIf {
     bool _return = false;
     return _return;
   }
+  bool deleteBatchQueue(const std::string& /* computeResourceId */, const std::string& /* queueName */) {
+    bool _return = false;
+    return _return;
+  }
   void registerGatewayResourceProfile(std::string& /* _return */, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& /* gatewayResourceProfile */) {
     return;
   }
@@ -11479,6 +11484,146 @@ class Airavata_deleteResourceJobManager_presult {
 };
 
 
+class Airavata_deleteBatchQueue_args {
+ public:
+
+  Airavata_deleteBatchQueue_args() : computeResourceId(), queueName() {
+  }
+
+  virtual ~Airavata_deleteBatchQueue_args() throw() {}
+
+  std::string computeResourceId;
+  std::string queueName;
+
+  void __set_computeResourceId(const std::string& val) {
+    computeResourceId = val;
+  }
+
+  void __set_queueName(const std::string& val) {
+    queueName = val;
+  }
+
+  bool operator == (const Airavata_deleteBatchQueue_args & rhs) const
+  {
+    if (!(computeResourceId == rhs.computeResourceId))
+      return false;
+    if (!(queueName == rhs.queueName))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteBatchQueue_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteBatchQueue_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteBatchQueue_pargs {
+ public:
+
+
+  virtual ~Airavata_deleteBatchQueue_pargs() throw() {}
+
+  const std::string* computeResourceId;
+  const std::string* queueName;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteBatchQueue_result__isset {
+  _Airavata_deleteBatchQueue_result__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteBatchQueue_result__isset;
+
+class Airavata_deleteBatchQueue_result {
+ public:
+
+  Airavata_deleteBatchQueue_result() : success(0) {
+  }
+
+  virtual ~Airavata_deleteBatchQueue_result() throw() {}
+
+  bool success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteBatchQueue_result__isset __isset;
+
+  void __set_success(const bool val) {
+    success = val;
+  }
+
+  void __set_ire(const  ::apache::airavata::api::error::InvalidRequestException& val) {
+    ire = val;
+  }
+
+  void __set_ace(const  ::apache::airavata::api::error::AiravataClientException& val) {
+    ace = val;
+  }
+
+  void __set_ase(const  ::apache::airavata::api::error::AiravataSystemException& val) {
+    ase = val;
+  }
+
+  bool operator == (const Airavata_deleteBatchQueue_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ace == rhs.ace))
+      return false;
+    if (!(ase == rhs.ase))
+      return false;
+    return true;
+  }
+  bool operator != (const Airavata_deleteBatchQueue_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Airavata_deleteBatchQueue_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteBatchQueue_presult__isset {
+  _Airavata_deleteBatchQueue_presult__isset() : success(false), ire(false), ace(false), ase(false) {}
+  bool success;
+  bool ire;
+  bool ace;
+  bool ase;
+} _Airavata_deleteBatchQueue_presult__isset;
+
+class Airavata_deleteBatchQueue_presult {
+ public:
+
+
+  virtual ~Airavata_deleteBatchQueue_presult() throw() {}
+
+  bool* success;
+   ::apache::airavata::api::error::InvalidRequestException ire;
+   ::apache::airavata::api::error::AiravataClientException ace;
+   ::apache::airavata::api::error::AiravataSystemException ase;
+
+  _Airavata_deleteBatchQueue_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
 class Airavata_registerGatewayResourceProfile_args {
  public:
 
@@ -12985,6 +13130,9 @@ class AiravataClient : virtual public AiravataIf {
   bool deleteResourceJobManager(const std::string& resourceJobManagerId);
   void send_deleteResourceJobManager(const std::string& resourceJobManagerId);
   bool recv_deleteResourceJobManager();
+  bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName);
+  void send_deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName);
+  bool recv_deleteBatchQueue();
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
   void send_registerGatewayResourceProfile(const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile);
   void recv_registerGatewayResourceProfile(std::string& _return);
@@ -13108,6 +13256,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
   void process_updateResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_deleteResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_deleteBatchQueue(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_updateGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -13201,6 +13350,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
     processMap_["updateResourceJobManager"] = &AiravataProcessor::process_updateResourceJobManager;
     processMap_["getResourceJobManager"] = &AiravataProcessor::process_getResourceJobManager;
     processMap_["deleteResourceJobManager"] = &AiravataProcessor::process_deleteResourceJobManager;
+    processMap_["deleteBatchQueue"] = &AiravataProcessor::process_deleteBatchQueue;
     processMap_["registerGatewayResourceProfile"] = &AiravataProcessor::process_registerGatewayResourceProfile;
     processMap_["getGatewayResourceProfile"] = &AiravataProcessor::process_getGatewayResourceProfile;
     processMap_["updateGatewayResourceProfile"] = &AiravataProcessor::process_updateGatewayResourceProfile;
@@ -14019,6 +14169,15 @@ class AiravataMultiface : virtual public AiravataIf {
     return ifaces_[i]->deleteResourceJobManager(resourceJobManagerId);
   }
 
+  bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->deleteBatchQueue(computeResourceId, queueName);
+    }
+    return ifaces_[i]->deleteBatchQueue(computeResourceId, queueName);
+  }
+
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
     size_t sz = ifaces_.size();
     size_t i = 0;

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index 4f36e0a..2b7e03f 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -444,6 +444,11 @@ class AiravataHandler : virtual public AiravataIf {
     printf("deleteResourceJobManager\n");
   }
 
+  bool deleteBatchQueue(const std::string& computeResourceId, const std::string& queueName) {
+    // Your implementation goes here
+    printf("deleteBatchQueue\n");
+  }
+
   void registerGatewayResourceProfile(std::string& _return, const  ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) {
     // Your implementation goes here
     printf("registerGatewayResourceProfile\n");

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 08c075b..806d317 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -98,6 +98,7 @@ interface AiravataIf {
   public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager);
   public function getResourceJobManager($resourceJobManagerId);
   public function deleteResourceJobManager($resourceJobManagerId);
+  public function deleteBatchQueue($computeResourceId, $queueName);
   public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
   public function getGatewayResourceProfile($gatewayID);
   public function updateGatewayResourceProfile($gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
@@ -5028,6 +5029,67 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteResourceJobManager failed: unknown result");
   }
 
+  public function deleteBatchQueue($computeResourceId, $queueName)
+  {
+    $this->send_deleteBatchQueue($computeResourceId, $queueName);
+    return $this->recv_deleteBatchQueue();
+  }
+
+  public function send_deleteBatchQueue($computeResourceId, $queueName)
+  {
+    $args = new \Airavata\API\Airavata_deleteBatchQueue_args();
+    $args->computeResourceId = $computeResourceId;
+    $args->queueName = $queueName;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'deleteBatchQueue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('deleteBatchQueue', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_deleteBatchQueue()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteBatchQueue_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_deleteBatchQueue_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("deleteBatchQueue failed: unknown result");
+  }
+
   public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
   {
     $this->send_registerGatewayResourceProfile($gatewayResourceProfile);
@@ -24335,6 +24397,236 @@ class Airavata_deleteResourceJobManager_result {
 
 }
 
+class Airavata_deleteBatchQueue_args {
+  static $_TSPEC;
+
+  public $computeResourceId = null;
+  public $queueName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'computeResourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'queueName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['computeResourceId'])) {
+        $this->computeResourceId = $vals['computeResourceId'];
+      }
+      if (isset($vals['queueName'])) {
+        $this->queueName = $vals['queueName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteBatchQueue_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->queueName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_deleteBatchQueue_args');
+    if ($this->computeResourceId !== null) {
+      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->computeResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->queueName !== null) {
+      $xfer += $output->writeFieldBegin('queueName', TType::STRING, 2);
+      $xfer += $output->writeString($this->queueName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_deleteBatchQueue_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteBatchQueue_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_deleteBatchQueue_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Airavata_registerGatewayResourceProfile_args {
   static $_TSPEC;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 6b00d24..6006adb 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -1388,6 +1388,11 @@ service Airavata {
        throws (1: airavataErrors.InvalidRequestException ire,
                2: airavataErrors.AiravataClientException ace,
                3: airavataErrors.AiravataSystemException ase)
+
+  bool deleteBatchQueue(1: required string computeResourceId, 2: required string queueName)
+        throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
 /*
  * Gateway Resource Profile
  *

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index b64903e..efa2f96 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -235,6 +235,8 @@ public interface ComputeResource {
      */
     void removeDataMovementInterface(String computeResourceId, String dataMovementInterfaceId)  throws AppCatalogException;
 
+    void removeBatchQueue(String computeResourceId, String queueName)  throws AppCatalogException;
+
 
 
     LOCALSubmission getLocalJobSubmission(String submissionId) throws AppCatalogException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 89a292b..7917b23 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -118,8 +118,6 @@ public class ComputeResourceImpl implements ComputeResource {
 			ComputeResourceResource computeHostResource)
 			throws AppCatalogException {
 		List<BatchQueue> batchQueueList = description.getBatchQueues();
-        BatchQueueResource resource = new BatchQueueResource();
-        resource.remove(description.getComputeResourceId());
 		if (batchQueueList != null && !batchQueueList.isEmpty()) {
 		    for (BatchQueue batchQueue : batchQueueList) {
 		    	BatchQueueResource bq = AppCatalogThriftConversion.getBatchQueue(batchQueue);
@@ -733,6 +731,20 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
+    public void removeBatchQueue(String computeResourceId, String queueName) throws AppCatalogException {
+        try {
+            BatchQueueResource resource = new BatchQueueResource();
+            Map<String, String> ids = new HashMap<String, String>();
+            ids.put(AbstractResource.BatchQueueConstants.COMPUTE_RESOURCE_ID, computeResourceId);
+            ids.put(AbstractResource.BatchQueueConstants.QUEUE_NAME, queueName);
+            resource.remove(ids);
+        }catch (Exception e){
+            logger.error("Error while removing batch queue..", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
 	public String addResourceJobManager(ResourceJobManager resourceJobManager)
 			throws AppCatalogException {
 		resourceJobManager.setResourceJobManagerId(AppCatalogUtils.getID("RJM"));

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
index 5df3bd2..2dac680 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/BatchQueueResource.java
@@ -53,12 +53,20 @@ public class BatchQueueResource extends AbstractResource {
 	
 	@Override
 	public void remove(Object identifier) throws AppCatalogException {
+        HashMap<String, String> ids;
+        if (identifier instanceof Map) {
+            ids = (HashMap<String, String>) identifier;
+        } else {
+            logger.error("Identifier should be a map with the field name and it's value");
+            throw new AppCatalogException("Identifier should be a map with the field name and it's value");
+        }
 		EntityManager em = null;
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
 			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
-			generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, identifier);
+            generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, ids.get(BatchQueueConstants.COMPUTE_RESOURCE_ID));
+            generator.setParameter(BatchQueueConstants.QUEUE_NAME, ids.get(BatchQueueConstants.QUEUE_NAME));
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();


[04/44] fixing AIRAVATA-1494

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index a0cec67..132c420 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -1216,6 +1216,14 @@ import org.slf4j.LoggerFactory;
      */
     public boolean deleteDataMovementInterface(String dataMovementInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
+    public String registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean updateResourceJobManager(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean deleteResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
     /**
      * Register a Gateway Resource Profile.
      * 
@@ -1531,6 +1539,14 @@ import org.slf4j.LoggerFactory;
 
     public void deleteDataMovementInterface(String dataMovementInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateResourceJobManager(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void deleteResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getGatewayResourceProfile(String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -4080,6 +4096,135 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteDataMovementInterface failed: unknown result");
     }
 
+    public String registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_registerResourceJobManager(resourceJobManager);
+      return recv_registerResourceJobManager();
+    }
+
+    public void send_registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager) throws org.apache.thrift.TException
+    {
+      registerResourceJobManager_args args = new registerResourceJobManager_args();
+      args.setResourceJobManager(resourceJobManager);
+      sendBase("registerResourceJobManager", args);
+    }
+
+    public String recv_registerResourceJobManager() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      registerResourceJobManager_result result = new registerResourceJobManager_result();
+      receiveBase(result, "registerResourceJobManager");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerResourceJobManager failed: unknown result");
+    }
+
+    public boolean updateResourceJobManager(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager);
+      return recv_updateResourceJobManager();
+    }
+
+    public void send_updateResourceJobManager(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager) throws org.apache.thrift.TException
+    {
+      updateResourceJobManager_args args = new updateResourceJobManager_args();
+      args.setResourceJobManagerId(resourceJobManagerId);
+      args.setUpdatedResourceJobManager(updatedResourceJobManager);
+      sendBase("updateResourceJobManager", args);
+    }
+
+    public boolean recv_updateResourceJobManager() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      updateResourceJobManager_result result = new updateResourceJobManager_result();
+      receiveBase(result, "updateResourceJobManager");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateResourceJobManager failed: unknown result");
+    }
+
+    public org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getResourceJobManager(resourceJobManagerId);
+      return recv_getResourceJobManager();
+    }
+
+    public void send_getResourceJobManager(String resourceJobManagerId) throws org.apache.thrift.TException
+    {
+      getResourceJobManager_args args = new getResourceJobManager_args();
+      args.setResourceJobManagerId(resourceJobManagerId);
+      sendBase("getResourceJobManager", args);
+    }
+
+    public org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager recv_getResourceJobManager() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getResourceJobManager_result result = new getResourceJobManager_result();
+      receiveBase(result, "getResourceJobManager");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getResourceJobManager failed: unknown result");
+    }
+
+    public boolean deleteResourceJobManager(String resourceJobManagerId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_deleteResourceJobManager(resourceJobManagerId);
+      return recv_deleteResourceJobManager();
+    }
+
+    public void send_deleteResourceJobManager(String resourceJobManagerId) throws org.apache.thrift.TException
+    {
+      deleteResourceJobManager_args args = new deleteResourceJobManager_args();
+      args.setResourceJobManagerId(resourceJobManagerId);
+      sendBase("deleteResourceJobManager", args);
+    }
+
+    public boolean recv_deleteResourceJobManager() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      deleteResourceJobManager_result result = new deleteResourceJobManager_result();
+      receiveBase(result, "deleteResourceJobManager");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteResourceJobManager failed: unknown result");
+    }
+
     public String registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
       send_registerGatewayResourceProfile(gatewayResourceProfile);
@@ -6965,6 +7110,137 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void registerResourceJobManager(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      registerResourceJobManager_call method_call = new registerResourceJobManager_call(resourceJobManager, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class registerResourceJobManager_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager;
+      public registerResourceJobManager_call(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.resourceJobManager = resourceJobManager;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerResourceJobManager", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerResourceJobManager_args args = new registerResourceJobManager_args();
+        args.setResourceJobManager(resourceJobManager);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_registerResourceJobManager();
+      }
+    }
+
+    public void updateResourceJobManager(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      updateResourceJobManager_call method_call = new updateResourceJobManager_call(resourceJobManagerId, updatedResourceJobManager, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class updateResourceJobManager_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String resourceJobManagerId;
+      private org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager;
+      public updateResourceJobManager_call(String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.resourceJobManagerId = resourceJobManagerId;
+        this.updatedResourceJobManager = updatedResourceJobManager;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateResourceJobManager", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        updateResourceJobManager_args args = new updateResourceJobManager_args();
+        args.setResourceJobManagerId(resourceJobManagerId);
+        args.setUpdatedResourceJobManager(updatedResourceJobManager);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_updateResourceJobManager();
+      }
+    }
+
+    public void getResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getResourceJobManager_call method_call = new getResourceJobManager_call(resourceJobManagerId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getResourceJobManager_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String resourceJobManagerId;
+      public getResourceJobManager_call(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.resourceJobManagerId = resourceJobManagerId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getResourceJobManager", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getResourceJobManager_args args = new getResourceJobManager_args();
+        args.setResourceJobManagerId(resourceJobManagerId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getResourceJobManager();
+      }
+    }
+
+    public void deleteResourceJobManager(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deleteResourceJobManager_call method_call = new deleteResourceJobManager_call(resourceJobManagerId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deleteResourceJobManager_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String resourceJobManagerId;
+      public deleteResourceJobManager_call(String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.resourceJobManagerId = resourceJobManagerId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteResourceJobManager", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteResourceJobManager_args args = new deleteResourceJobManager_args();
+        args.setResourceJobManagerId(resourceJobManagerId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_deleteResourceJobManager();
+      }
+    }
+
     public void registerGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       registerGatewayResourceProfile_call method_call = new registerGatewayResourceProfile_call(gatewayResourceProfile, resultHandler, this, ___protocolFactory, ___transport);
@@ -7364,6 +7640,10 @@ import org.slf4j.LoggerFactory;
       processMap.put("changeDataMovementPriorities", new changeDataMovementPriorities());
       processMap.put("deleteJobSubmissionInterface", new deleteJobSubmissionInterface());
       processMap.put("deleteDataMovementInterface", new deleteDataMovementInterface());
+      processMap.put("registerResourceJobManager", new registerResourceJobManager());
+      processMap.put("updateResourceJobManager", new updateResourceJobManager());
+      processMap.put("getResourceJobManager", new getResourceJobManager());
+      processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
       processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
       processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
       processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -9567,6 +9847,120 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public static class registerResourceJobManager<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerResourceJobManager_args> {
+      public registerResourceJobManager() {
+        super("registerResourceJobManager");
+      }
+
+      public registerResourceJobManager_args getEmptyArgsInstance() {
+        return new registerResourceJobManager_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public registerResourceJobManager_result getResult(I iface, registerResourceJobManager_args args) throws org.apache.thrift.TException {
+        registerResourceJobManager_result result = new registerResourceJobManager_result();
+        try {
+          result.success = iface.registerResourceJobManager(args.resourceJobManager);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class updateResourceJobManager<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateResourceJobManager_args> {
+      public updateResourceJobManager() {
+        super("updateResourceJobManager");
+      }
+
+      public updateResourceJobManager_args getEmptyArgsInstance() {
+        return new updateResourceJobManager_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public updateResourceJobManager_result getResult(I iface, updateResourceJobManager_args args) throws org.apache.thrift.TException {
+        updateResourceJobManager_result result = new updateResourceJobManager_result();
+        try {
+          result.success = iface.updateResourceJobManager(args.resourceJobManagerId, args.updatedResourceJobManager);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class getResourceJobManager<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getResourceJobManager_args> {
+      public getResourceJobManager() {
+        super("getResourceJobManager");
+      }
+
+      public getResourceJobManager_args getEmptyArgsInstance() {
+        return new getResourceJobManager_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getResourceJobManager_result getResult(I iface, getResourceJobManager_args args) throws org.apache.thrift.TException {
+        getResourceJobManager_result result = new getResourceJobManager_result();
+        try {
+          result.success = iface.getResourceJobManager(args.resourceJobManagerId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
+    public static class deleteResourceJobManager<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteResourceJobManager_args> {
+      public deleteResourceJobManager() {
+        super("deleteResourceJobManager");
+      }
+
+      public deleteResourceJobManager_args getEmptyArgsInstance() {
+        return new deleteResourceJobManager_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteResourceJobManager_result getResult(I iface, deleteResourceJobManager_args args) throws org.apache.thrift.TException {
+        deleteResourceJobManager_result result = new deleteResourceJobManager_result();
+        try {
+          result.success = iface.deleteResourceJobManager(args.resourceJobManagerId);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
     public static class registerGatewayResourceProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerGatewayResourceProfile_args> {
       public registerGatewayResourceProfile() {
         super("registerGatewayResourceProfile");
@@ -9914,6 +10308,10 @@ import org.slf4j.LoggerFactory;
       processMap.put("changeDataMovementPriorities", new changeDataMovementPriorities());
       processMap.put("deleteJobSubmissionInterface", new deleteJobSubmissionInterface());
       processMap.put("deleteDataMovementInterface", new deleteDataMovementInterface());
+      processMap.put("registerResourceJobManager", new registerResourceJobManager());
+      processMap.put("updateResourceJobManager", new updateResourceJobManager());
+      processMap.put("getResourceJobManager", new getResourceJobManager());
+      processMap.put("deleteResourceJobManager", new deleteResourceJobManager());
       processMap.put("registerGatewayResourceProfile", new registerGatewayResourceProfile());
       processMap.put("getGatewayResourceProfile", new getGatewayResourceProfile());
       processMap.put("updateGatewayResourceProfile", new updateGatewayResourceProfile());
@@ -15143,20 +15541,20 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
-      public registerGatewayResourceProfile() {
-        super("registerGatewayResourceProfile");
+    public static class registerResourceJobManager<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerResourceJobManager_args, String> {
+      public registerResourceJobManager() {
+        super("registerResourceJobManager");
       }
 
-      public registerGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new registerGatewayResourceProfile_args();
+      public registerResourceJobManager_args getEmptyArgsInstance() {
+        return new registerResourceJobManager_args();
       }
 
       public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<String>() { 
           public void onComplete(String o) {
-            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+            registerResourceJobManager_result result = new registerResourceJobManager_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -15169,7 +15567,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
+            registerResourceJobManager_result result = new registerResourceJobManager_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15205,26 +15603,27 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
+      public void start(I iface, registerResourceJobManager_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerResourceJobManager(args.resourceJobManager,resultHandler);
       }
     }
 
-    public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
-      public getGatewayResourceProfile() {
-        super("getGatewayResourceProfile");
+    public static class updateResourceJobManager<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceJobManager_args, Boolean> {
+      public updateResourceJobManager() {
+        super("updateResourceJobManager");
       }
 
-      public getGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new getGatewayResourceProfile_args();
+      public updateResourceJobManager_args getEmptyArgsInstance() {
+        return new updateResourceJobManager_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
-            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            updateResourceJobManager_result result = new updateResourceJobManager_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15236,7 +15635,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
+            updateResourceJobManager_result result = new updateResourceJobManager_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15272,27 +15671,26 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
-        iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
+      public void start(I iface, updateResourceJobManager_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateResourceJobManager(args.resourceJobManagerId, args.updatedResourceJobManager,resultHandler);
       }
     }
 
-    public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
-      public updateGatewayResourceProfile() {
-        super("updateGatewayResourceProfile");
+    public static class getResourceJobManager<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getResourceJobManager_args, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager> {
+      public getResourceJobManager() {
+        super("getResourceJobManager");
       }
 
-      public updateGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new updateGatewayResourceProfile_args();
+      public getResourceJobManager_args getEmptyArgsInstance() {
+        return new getResourceJobManager_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager o) {
+            getResourceJobManager_result result = new getResourceJobManager_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15304,7 +15702,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
+            getResourceJobManager_result result = new getResourceJobManager_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15340,25 +15738,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
+      public void start(I iface, getResourceJobManager_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager> resultHandler) throws TException {
+        iface.getResourceJobManager(args.resourceJobManagerId,resultHandler);
       }
     }
 
-    public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
-      public deleteGatewayResourceProfile() {
-        super("deleteGatewayResourceProfile");
+    public static class deleteResourceJobManager<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteResourceJobManager_args, Boolean> {
+      public deleteResourceJobManager() {
+        super("deleteResourceJobManager");
       }
 
-      public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
-        return new deleteGatewayResourceProfile_args();
+      public deleteResourceJobManager_args getEmptyArgsInstance() {
+        return new deleteResourceJobManager_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+            deleteResourceJobManager_result result = new deleteResourceJobManager_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -15372,7 +15770,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
+            deleteResourceJobManager_result result = new deleteResourceJobManager_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15408,27 +15806,26 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
+      public void start(I iface, deleteResourceJobManager_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteResourceJobManager(args.resourceJobManagerId,resultHandler);
       }
     }
 
-    public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
-      public addGatewayComputeResourcePreference() {
-        super("addGatewayComputeResourcePreference");
+    public static class registerGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerGatewayResourceProfile_args, String> {
+      public registerGatewayResourceProfile() {
+        super("registerGatewayResourceProfile");
       }
 
-      public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new addGatewayComputeResourcePreference_args();
+      public registerGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new registerGatewayResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15440,7 +15837,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+            registerGatewayResourceProfile_result result = new registerGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15476,25 +15873,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+      public void start(I iface, registerGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerGatewayResourceProfile(args.gatewayResourceProfile,resultHandler);
       }
     }
 
-    public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
-      public getGatewayComputeResourcePreference() {
-        super("getGatewayComputeResourcePreference");
+    public static class getGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayResourceProfile_args, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> {
+      public getGatewayResourceProfile() {
+        super("getGatewayResourceProfile");
       }
 
-      public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new getGatewayComputeResourcePreference_args();
+      public getGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new getGatewayResourceProfile_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
-            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile o) {
+            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -15507,7 +15904,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            getGatewayResourceProfile_result result = new getGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15543,26 +15940,27 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
-        iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+      public void start(I iface, getGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws TException {
+        iface.getGatewayResourceProfile(args.gatewayID,resultHandler);
       }
     }
 
-    public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
-      public getAllGatewayComputeResourcePreferences() {
-        super("getAllGatewayComputeResourcePreferences");
+    public static class updateGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayResourceProfile_args, Boolean> {
+      public updateGatewayResourceProfile() {
+        super("updateGatewayResourceProfile");
       }
 
-      public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
-        return new getAllGatewayComputeResourcePreferences_args();
+      public updateGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new updateGatewayResourceProfile_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
-            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -15574,7 +15972,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+            updateGatewayResourceProfile_result result = new updateGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15610,25 +16008,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, getAllGatewayComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> resultHandler) throws TException {
-        iface.getAllGatewayComputeResourcePreferences(args.gatewayID,resultHandler);
+      public void start(I iface, updateGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateGatewayResourceProfile(args.gatewayID, args.gatewayResourceProfile,resultHandler);
       }
     }
 
-    public static class updateGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayComputeResourcePreference_args, Boolean> {
-      public updateGatewayComputeResourcePreference() {
-        super("updateGatewayComputeResourcePreference");
+    public static class deleteGatewayResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayResourceProfile_args, Boolean> {
+      public deleteGatewayResourceProfile() {
+        super("deleteGatewayResourceProfile");
       }
 
-      public updateGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new updateGatewayComputeResourcePreference_args();
+      public deleteGatewayResourceProfile_args getEmptyArgsInstance() {
+        return new deleteGatewayResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            updateGatewayComputeResourcePreference_result result = new updateGatewayComputeResourcePreference_result();
+            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -15642,7 +16040,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateGatewayComputeResourcePreference_result result = new updateGatewayComputeResourcePreference_result();
+            deleteGatewayResourceProfile_result result = new deleteGatewayResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -15678,25 +16076,25 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, updateGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+      public void start(I iface, deleteGatewayResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteGatewayResourceProfile(args.gatewayID,resultHandler);
       }
     }
 
-    public static class deleteGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayComputeResourcePreference_args, Boolean> {
-      public deleteGatewayComputeResourcePreference() {
-        super("deleteGatewayComputeResourcePreference");
+    public static class addGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGatewayComputeResourcePreference_args, Boolean> {
+      public addGatewayComputeResourcePreference() {
+        super("addGatewayComputeResourcePreference");
       }
 
-      public deleteGatewayComputeResourcePreference_args getEmptyArgsInstance() {
-        return new deleteGatewayComputeResourcePreference_args();
+      public addGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new addGatewayComputeResourcePreference_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteGatewayComputeResourcePreference_result result = new deleteGatewayComputeResourcePreference_result();
+            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -15710,7 +16108,277 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteGatewayComputeResourcePreference_result result = new deleteGatewayComputeResourcePreference_result();
+            addGatewayComputeResourcePreference_result result = new addGatewayComputeResourcePreference_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, addGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+      }
+    }
+
+    public static class getGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGatewayComputeResourcePreference_args, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> {
+      public getGatewayComputeResourcePreference() {
+        super("getGatewayComputeResourcePreference");
+      }
+
+      public getGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new getGatewayComputeResourcePreference_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference o) {
+            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getGatewayComputeResourcePreference_result result = new getGatewayComputeResourcePreference_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws TException {
+        iface.getGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId,resultHandler);
+      }
+    }
+
+    public static class getAllGatewayComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> {
+      public getAllGatewayComputeResourcePreferences() {
+        super("getAllGatewayComputeResourcePreferences");
+      }
+
+      public getAllGatewayComputeResourcePreferences_args getEmptyArgsInstance() {
+        return new getAllGatewayComputeResourcePreferences_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> o) {
+            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllGatewayComputeResourcePreferences_result result = new getAllGatewayComputeResourcePreferences_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllGatewayComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> resultHandler) throws TException {
+        iface.getAllGatewayComputeResourcePreferences(args.gatewayID,resultHandler);
+      }
+    }
+
+    public static class updateGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGatewayComputeResourcePreference_args, Boolean> {
+      public updateGatewayComputeResourcePreference() {
+        super("updateGatewayComputeResourcePreference");
+      }
+
+      public updateGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new updateGatewayComputeResourcePreference_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            updateGatewayComputeResourcePreference_result result = new updateGatewayComputeResourcePreference_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            updateGatewayComputeResourcePreference_result result = new updateGatewayComputeResourcePreference_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, updateGatewayComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateGatewayComputeResourcePreference(args.gatewayID, args.computeResourceId, args.computeResourcePreference,resultHandler);
+      }
+    }
+
+    public static class deleteGatewayComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGatewayComputeResourcePreference_args, Boolean> {
+      public deleteGatewayComputeResourcePreference() {
+        super("deleteGatewayComputeResourcePreference");
+      }
+
+      public deleteGatewayComputeResourcePreference_args getEmptyArgsInstance() {
+        return new deleteGatewayComputeResourcePreference_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteGatewayComputeResourcePreference_result result = new deleteGatewayComputeResourcePreference_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            deleteGatewayComputeResourcePreference_result result = new deleteGatewayComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -36448,13 +37116,4606 @@ import org.slf4j.LoggerFactory;
     }
 
     // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+      tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ENF, new org.apache.thrift.meta_data.FieldMetaData("enf", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_result.class, metaDataMap);
+    }
+
+    public validateExperiment_result() {
+    }
+
+    public validateExperiment_result(
+      boolean success,
+      org.apache.airavata.model.error.InvalidRequestException ire,
+      org.apache.airavata.model.error.ExperimentNotFoundException enf,
+      org.apache.airavata.model.error.AiravataClientException ace,
+      org.apache.airavata.model.error.AiravataSystemException ase)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+      this.ire = ire;
+      this.enf = enf;
+      this.ace = ace;
+      this.ase = ase;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public validateExperiment_result(validateExperiment_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+      if (other.isSetIre()) {
+        this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+      }
+      if (other.isSetEnf()) {
+        this.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(other.enf);
+      }
+      if (other.isSetAce()) {
+        this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+      }
+      if (other.isSetAse()) {
+        this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+      }
+    }
+
+    public validateExperiment_result deepCopy() {
+      return new validateExperiment_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = false;
+      this.ire = null;
+      this.enf = null;
+      this.ace = null;
+      this.ase = null;
+    }
+
+    public boolean isSuccess() {
+      return this.success;
+    }
+
+    public validateExperiment_result setSuccess(boolean success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public org.apache.airavata.model.error.InvalidRequestException getIre() {
+      return this.ire;
+    }
+
+    public validateExperiment_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+      this.ire = ire;
+      return this;
+    }
+
+    public void unsetIre() {
+      this.ire = null;
+    }
+
+    /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+    public boolean isSetIre() {
+      return this.ire != null;
+    }
+
+    public void setIreIsSet(boolean value) {
+      if (!value) {
+        this.ire = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.ExperimentNotFoundException getEnf() {
+      return this.enf;
+    }
+
+    public validateExperiment_result setEnf(org.apache.airavata.model.error.ExperimentNotFoundException enf) {
+      this.enf = enf;
+      return this;
+    }
+
+    public void unsetEnf() {
+      this.enf = null;
+    }
+
+    /** Returns true if field enf is set (has been assigned a value) and false otherwise */
+    public boolean isSetEnf() {
+      return this.enf != null;
+    }
+
+    public void setEnfIsSet(boolean value) {
+      if (!value) {
+        this.enf = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataClientException getAce() {
+      return this.ace;
+    }
+
+    public validateExperiment_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+      this.ace = ace;
+      return this;
+    }
+
+    public void unsetAce() {
+      this.ace = null;
+    }
+
+    /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+    public boolean isSetAce() {
+      return this.ace != null;
+    }
+
+    public void setAceIsSet(boolean value) {
+      if (!value) {
+        this.ace = null;
+      }
+    }
+
+    public org.apache.airavata.model.error.AiravataSystemException getAse() {
+      return this.ase;
+    }
+
+    public validateExperiment_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+      this.ase = ase;
+      return this;
+    }
+
+    public void unsetAse() {
+      this.ase = null;
+    }
+
+    /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+    public boolean isSetAse() {
+      return this.ase != null;
+    }
+
+    public void setAseIsSet(boolean value) {
+      if (!value) {
+        this.ase = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Boolean)value);
+        }
+        break;
+
+      case IRE:
+        if (value == null) {
+          unsetIre();
+        } else {
+          setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+        }
+        break;
+
+      case ENF:
+        if (value == null) {
+          unsetEnf();
+        } else {
+          setEnf((org.apache.airavata.model.error.ExperimentNotFoundException)value);
+        }
+        break;
+
+      case ACE:
+        if (value == null) {
+          unsetAce();
+        } else {
+          setAce((org.apache.airavata.model.error.AiravataClientException)value);
+        }
+        break;
+
+      case ASE:
+        if (value == null) {
+          unsetAse();
+        } else {
+          setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Boolean.valueOf(isSuccess());
+
+      case IRE:
+        return getIre();
+
+      case ENF:
+        return getEnf();
+
+      case ACE:
+        return getAce();
+
+      case ASE:
+        return getAse();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case IRE:
+        return isSetIre();
+      case ENF:
+        return isSetEnf();
+      case ACE:
+        return isSetAce();
+      case ASE:
+        return isSetAse();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof validateExperiment_result)
+        return this.equals((validateExperiment_result)that);
+      return false;
+    }
+
+    public boolean equals(validateExperiment_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ire = true && this.isSetIre();
+      boolean that_present_ire = true && that.isSetIre();
+      if (this_present_ire || that_present_ire) {
+        if (!(this_present_ire && that_present_ire))
+          return false;
+        if (!this.ire.equals(that.ire))
+          return false;
+      }
+
+      boolean this_present_enf = true && this.isSetEnf();
+      boolean that_present_enf = true && that.isSetEnf();
+      if (this_present_enf || that_present_enf) {
+        if (!(this_present_enf && that_present_enf))
+          return false;
+        if (!this.enf.equals(that.enf))
+          return false;
+      }
+
+      boolean this_present_ace = true && this.isSetAce();
+      boolean that_present_ace = true && that.isSetAce();
+      if (this_present_ace || that_present_ace) {
+        if (!(this_present_ace && that_present_ace))
+          return false;
+        if (!this.ace.equals(that.ace))
+          return false;
+      }
+
+      boolean this_present_ase = true && this.isSetAse();
+      boolean that_present_ase = true && that.isSetAse();
+      if (this_present_ase || that_present_ase) {
+        if (!(this_present_ase && that_present_ase))
+          return false;
+        if (!this.ase.equals(that.ase))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(validateExperiment_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIre()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetEnf()).compareTo(other.isSetEnf());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEnf()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enf, other.enf);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAce()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAse()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("validateExperiment_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ire:");
+      if (this.ire == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ire);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("enf:");
+      if (this.enf == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.enf);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ace:");
+      if (this.ace == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ace);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("ase:");
+      if (this.ase == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ase);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class validateExperiment_resultStandardSchemeFactory implements SchemeFactory {
+      public validateExperiment_resultStandardScheme getScheme() {
+        return new validateExperiment_resultStandardScheme();
+      }
+    }
+
+    private static class validateExperiment_resultStandardScheme extends StandardScheme<validateExperiment_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.success = iprot.readBool();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // IRE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+                struct.ire.read(iprot);
+                struct.setIreIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // ENF
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException();
+                struct.enf.read(iprot);
+                struct.setEnfIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // ACE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+                struct.ace.read(iprot);
+                struct.setAceIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // ASE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+                struct.ase.read(iprot);
+                struct.setAseIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, validateExperiment_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          opro

<TRUNCATED>

[42/44] git commit: merging

Posted by ch...@apache.org.
merging


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fa666b30
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fa666b30
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fa666b30

Branch: refs/heads/gfac_appcatalog_int
Commit: fa666b30ce5c3408b43cb5616c99d4d3d17a3b51
Parents: d856d24
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Nov 5 13:19:50 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 13:19:50 2014 -0500

----------------------------------------------------------------------
 .../airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java   | 5 -----
 .../airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java     | 4 ----
 2 files changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fa666b30/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 122d1e2..331663f 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -35,16 +35,12 @@ import org.apache.airavata.gfac.monitor.UserMonitorData;
 import org.apache.airavata.gfac.monitor.core.PullMonitor;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer;
-import org.apache.airavata.gfac.monitor.util.CommonUtils;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
 import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.apache.airavata.schemas.gfac.SSHHostType;
-import org.apache.zookeeper.ZooKeeper;
 
 import java.sql.Timestamp;
 import java.util.*;
@@ -239,7 +235,6 @@ public class HPCPullMonitor extends PullMonitor {
                                 !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
                             iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
                         }else if(JobState.COMPLETE.equals(iMonitorID.getStatus())){
-                            completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                             logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
                                     "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
                             iterator.remove();

http://git-wip-us.apache.org/repos/asf/airavata/blob/fa666b30/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index f508e23..f34b82a 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -110,10 +110,6 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
                     this.passPhrase);
         }
         try {
-            ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext()
-                    .getApplicationDeploymentDescription().getType();
-            String standardError = app.getStandardError();
-            String standardOutput = app.getStandardOutput();
             if (jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT) == null) {
                 try {
                     GFACSSHUtils.addSecurityContext(jobExecutionContext);


[41/44] git commit: Integrated appCatalog model to GFac local and hpc monitor modules, commented out test calsses

Posted by ch...@apache.org.
Integrated appCatalog model to GFac local and hpc monitor modules, commented out test calsses


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/3e584f87
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/3e584f87
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/3e584f87

Branch: refs/heads/gfac_appcatalog_int
Commit: 3e584f87d359c07bb2e4429884d8efa820135671
Parents: d94e8c9
Author: shamrath <sh...@gmail.com>
Authored: Tue Nov 4 17:51:53 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 13:10:24 2014 -0500

----------------------------------------------------------------------
 .../gfac/core/context/JobExecutionContext.java  |  12 +
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |   4 +
 .../handler/LocalDirectorySetupHandler.java     |  19 +-
 .../gfac/local/provider/impl/LocalProvider.java |  48 ++-
 .../gfac/local/utils/LocalProviderUtil.java     |  15 +-
 .../gfac/services/impl/LocalProviderTest.java   | 368 +++++++++----------
 .../airavata/gfac/monitor/HPCMonitorID.java     |  11 +-
 .../airavata/gfac/monitor/HostMonitorData.java  |  38 +-
 .../handlers/GridPullMonitorHandler.java        |   2 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  24 +-
 .../airavata/gfac/monitor/util/CommonUtils.java |  31 +-
 .../job/QstatMonitorTestWithMyProxyAuth.java    | 344 ++++++++---------
 12 files changed, 468 insertions(+), 448 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 2d1a975..30142f8 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -72,6 +72,10 @@ public class JobExecutionContext extends AbstractContext implements Serializable
 
     private String credentialStoreToken;
     /**
+     * User defined scratch/temp directory
+     */
+    private String scratchLocation;
+    /**
      * User defined working directory.
      */
     private String workingDir;
@@ -359,6 +363,14 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         this.credentialStoreToken = credentialStoreToken;
     }
 
+    public String getScratchLocation() {
+        return scratchLocation;
+    }
+
+    public void setScratchLocation(String scratchLocation) {
+        this.scratchLocation = scratchLocation;
+    }
+
     public String getWorkingDir() {
         return workingDir;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/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 0455f7e..d063dac 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
@@ -372,6 +372,10 @@ public class BetterGfacImpl implements GFac,Watcher {
     }
 
     private void setUpWorkingLocation(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, String scratchLocation) {
+        /**
+         * Scratch location
+         */
+        jobExecutionContext.setScratchLocation(scratchLocation);
 
         /**
          * Working dir

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
index de516c0..394cfaa 100644
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
+++ b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
@@ -20,12 +20,9 @@
 */
 package org.apache.airavata.gfac.local.handler;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.HostDescriptionType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,18 +34,14 @@ public class LocalDirectorySetupHandler implements GFacHandler {
 
     public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
         log.info("Invoking LocalDirectorySetupHandler ...");
-        HostDescriptionType type = jobExecutionContext.getApplicationContext().getHostDescription().getType();
-        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
-        log.debug("working directory = " + app.getStaticWorkingDirectory());
-        log.debug("temp directory = " + app.getScratchWorkingDirectory());
+        log.debug("working directory = " + jobExecutionContext.getWorkingDir());
+        log.debug("temp directory = " + jobExecutionContext.getWorkingDir());
 
-        makeFileSystemDir(app.getStaticWorkingDirectory(),jobExecutionContext);
-        makeFileSystemDir(app.getScratchWorkingDirectory(),jobExecutionContext);
-        makeFileSystemDir(app.getInputDataDirectory(),jobExecutionContext);
-        makeFileSystemDir(app.getOutputDataDirectory(),jobExecutionContext);
+        makeFileSystemDir(jobExecutionContext.getWorkingDir());
+        makeFileSystemDir(jobExecutionContext.getInputDir());
+        makeFileSystemDir(jobExecutionContext.getOutputDir());
     }
-    private void makeFileSystemDir(String dir, JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+    private void makeFileSystemDir(String dir) throws GFacHandlerException {
            File f = new File(dir);
            if (f.isDirectory() && f.exists()) {
                return;

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
index 51da68a..4cdd0c0 100644
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
@@ -37,6 +37,8 @@ import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.core.utils.OutputUtils;
 import org.apache.airavata.gfac.local.utils.InputStreamToFileWriter;
 import org.apache.airavata.gfac.local.utils.InputUtils;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.TaskIdentifier;
@@ -104,18 +106,16 @@ public class LocalProvider extends AbstractProvider {
 
     public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
     	super.initialize(jobExecutionContext);
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().
-                getApplicationDeploymentDescription().getType();
 
-        buildCommand(app.getExecutableLocation(), ProviderUtils.getInputParameters(jobExecutionContext));
-        initProcessBuilder(app);
+        buildCommand(jobExecutionContext.getExecutablePath(), ProviderUtils.getInputParameters(jobExecutionContext));
+        initProcessBuilder(jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription());
 
         // extra environment variables
-        builder.environment().put(Constants.INPUT_DATA_DIR_VAR_NAME, app.getInputDataDirectory());
-        builder.environment().put(Constants.OUTPUT_DATA_DIR_VAR_NAME, app.getOutputDataDirectory());
+        builder.environment().put(Constants.INPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getInputDir());
+        builder.environment().put(Constants.OUTPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getOutputDir());
 
         // set working directory
-        builder.directory(new File(app.getStaticWorkingDirectory()));
+        builder.directory(new File(jobExecutionContext.getWorkingDir()));
 
         // log info
         log.info("Command = " + InputUtils.buildCommand(cmdList));
@@ -127,21 +127,19 @@ public class LocalProvider extends AbstractProvider {
 
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-         ApplicationDeploymentDescriptionType app = jobExecutionContext.
-                 getApplicationContext().getApplicationDeploymentDescription().getType();
         JobDetails jobDetails = new JobDetails();
         try {
         	jobId = jobExecutionContext.getTaskData().getTaskID();
             jobDetails.setJobID(jobId);
-            jobDetails.setJobDescription(app.toString());
+            jobDetails.setJobDescription(jobExecutionContext.getApplicationContext()
+                    .getApplicationDeploymentDescription().getAppDeploymentDescription());
             jobExecutionContext.setJobDetails(jobDetails);
-            jobDetails.setJobDescription(app.toString());
             GFacUtils.saveJobStatus(jobExecutionContext,jobDetails, JobState.SETUP);
         	// running cmd
             Process process = builder.start();
 
-            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
-            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());
+            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), jobExecutionContext.getStandardOutput());
+            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), jobExecutionContext.getStandardError());
 
             // start output threads
             standardOutWriter.setDaemon(true);
@@ -167,9 +165,10 @@ public class LocalProvider extends AbstractProvider {
 
             StringBuffer buf = new StringBuffer();
             buf.append("Executed ").append(InputUtils.buildCommand(cmdList))
-                    .append(" on the localHost, working directory = ").append(app.getStaticWorkingDirectory())
-                    .append(" tempDirectory = ").append(app.getScratchWorkingDirectory()).append(" With the status ")
+                    .append(" on the localHost, working directory = ").append(jobExecutionContext.getWorkingDir())
+                    .append(" tempDirectory = ").append(jobExecutionContext.getScratchLocation()).append(" With the status ")
                     .append(String.valueOf(returnValue));
+
             log.info(buf.toString());
 
             // updating the job status to complete because there's nothing to monitor in local jobs
@@ -219,12 +218,10 @@ public class LocalProvider extends AbstractProvider {
 //	}
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
-
         try {
         	List<DataObjectType> outputArray = new ArrayList<DataObjectType>();
-            String stdOutStr = GFacUtils.readFileToString(app.getStandardOutput());
-            String stdErrStr = GFacUtils.readFileToString(app.getStandardError());
+            String stdOutStr = GFacUtils.readFileToString(jobExecutionContext.getStandardOutput());
+            String stdErrStr = GFacUtils.readFileToString(jobExecutionContext.getStandardError());
 			Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
             OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
             TaskDetails taskDetails = (TaskDetails)registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
@@ -257,15 +254,14 @@ public class LocalProvider extends AbstractProvider {
         cmdList.addAll(inputParameterList);
     }
 
-    private void initProcessBuilder(ApplicationDeploymentDescriptionType app){
+    private void initProcessBuilder(ApplicationDeploymentDescription app){
         builder = new ProcessBuilder(cmdList);
 
-        NameValuePairType[] env = app.getApplicationEnvironmentArray();
-
-        if(env != null && env.length > 0){
-            Map<String,String> builderEnv = builder.environment();
-            for (NameValuePairType entry : env) {
-                builderEnv.put(entry.getName(), entry.getValue());
+        List<SetEnvPaths> setEnvironment = app.getSetEnvironment();
+        if (setEnvironment != null) {
+            for (SetEnvPaths envPath : setEnvironment) {
+                Map<String,String> builderEnv = builder.environment();
+                builderEnv.put(envPath.getName(), envPath.getValue());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
index 932c693..2b45df7 100644
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
+++ b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
@@ -22,7 +22,6 @@ package org.apache.airavata.gfac.local.utils;
 
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,14 +40,12 @@ public class LocalProviderUtil {
     }
 
     public void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        ApplicationDeploymentDescriptionType app = jobExecutionContext.
-                getApplicationContext().getApplicationDeploymentDescription().getType();
-        log.info("working diectroy = " + app.getStaticWorkingDirectory());
-        log.info("temp directory = " + app.getScratchWorkingDirectory());
-        makeFileSystemDir(app.getStaticWorkingDirectory());
-        makeFileSystemDir(app.getScratchWorkingDirectory());
-        makeFileSystemDir(app.getInputDataDirectory());
-        makeFileSystemDir(app.getOutputDataDirectory());
+        log.info("working diectroy = " + jobExecutionContext.getWorkingDir());
+        log.info("temp directory = " + jobExecutionContext.getScratchLocation());
+        makeFileSystemDir(jobExecutionContext.getWorkingDir());
+        makeFileSystemDir(jobExecutionContext.getScratchLocation());
+        makeFileSystemDir(jobExecutionContext.getInputDir());
+        makeFileSystemDir(jobExecutionContext.getOutputDir());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
index 343b4bf..aeb8158 100644
--- a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@ -1,184 +1,184 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.core.gfac.services.impl;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.local.handler.LocalDirectorySetupHandler;
-import org.apache.airavata.gfac.local.provider.impl.LocalProvider;
-import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.persistance.registry.jpa.impl.LoggingRegistryImpl;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
-import org.apache.commons.lang.SystemUtils;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.eventbus.EventBus;
-
-public class LocalProviderTest {
-    private JobExecutionContext jobExecutionContext;
-    @BeforeTest
-    public void setUp() throws Exception {
-
-        URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        File configFile = new File(resource.getPath());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
-        //have to set InFlwo Handlers and outFlowHandlers
-        ApplicationContext applicationContext = new ApplicationContext();
-        HostDescription host = new HostDescription();
-        host.getType().setHostName("localhost");
-        host.getType().setHostAddress("localhost");
-        applicationContext.setHostDescription(host);
-        /*
-           * App
-           */
-        ApplicationDescription appDesc = new ApplicationDescription();
-        ApplicationDeploymentDescriptionType app = appDesc.getType();
-        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-        name.setStringValue("EchoLocal");
-        app.setApplicationName(name);
-
-        /*
-           * Use bat file if it is compiled on Windows
-           */
-        if (SystemUtils.IS_OS_WINDOWS) {
-            URL url = this.getClass().getClassLoader().getResource("echo.bat");
-            app.setExecutableLocation(url.getFile());
-        } else {
-            //for unix and Mac
-            app.setExecutableLocation("/bin/echo");
-        }
-
-        /*
-           * Default tmp location
-           */
-        String tempDir = System.getProperty("java.io.tmpdir");
-        if (tempDir == null) {
-            tempDir = "/tmp";
-        }
-
-        app.setScratchWorkingDirectory(tempDir);
-        app.setStaticWorkingDirectory(tempDir);
-        app.setInputDataDirectory(tempDir + File.separator + "input");
-        app.setOutputDataDirectory(tempDir + File.separator + "output");
-        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
-        app.setStandardError(tempDir + File.separator + "echo.stderr");
-
-        applicationContext.setApplicationDeploymentDescription(appDesc);
-
-        /*
-           * Service
-           */
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("SimpleEcho");
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-        InputParameterType input = InputParameterType.Factory.newInstance();
-        input.setParameterName("echo_input");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input);
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-                .size()]);
-
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("echo_output");
-        output.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-        OutputParameterType[] outputParamList = outputList
-                .toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-        jobExecutionContext.setApplicationContext(applicationContext);
-        /*
-        * Host
-        */
-        applicationContext.setServiceDescription(serv);
-
-        MessageContext inMessage = new MessageContext();
-        ActualParameter echo_input = new ActualParameter();
-        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-        inMessage.addParameter("echo_input", echo_input);
-
-        jobExecutionContext.setInMessageContext(inMessage);
-
-        MessageContext outMessage = new MessageContext();
-        ActualParameter echo_out = new ActualParameter();
-        outMessage.addParameter("echo_output", echo_out);
-
-        jobExecutionContext.setOutMessageContext(outMessage);
-
-        jobExecutionContext.setExperimentID("test123");
-        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
-        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
-        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
-        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
-
-
-    }
-
-    @Test
-    public void testLocalDirectorySetupHandler() throws GFacException {
-        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
-        localDirectorySetupHandler.invoke(jobExecutionContext);
-
-        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
-        junit.framework.Assert.assertTrue(new File(app.getStaticWorkingDirectory()).exists());
-        junit.framework.Assert.assertTrue(new File(app.getScratchWorkingDirectory()).exists());
-        junit.framework.Assert.assertTrue(new File(app.getInputDataDirectory()).exists());
-        junit.framework.Assert.assertTrue(new File(app.getOutputDataDirectory()).exists());
-    }
-
-    @Test
-    public void testLocalProvider() throws GFacException,GFacProviderException {
-        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
-        localDirectorySetupHandler.invoke(jobExecutionContext);
-        LocalProvider localProvider = new LocalProvider();
-        localProvider.setMonitorPublisher(new MonitorPublisher(new EventBus()));
-        localProvider.initialize(jobExecutionContext);
-        localProvider.execute(jobExecutionContext);
-        localProvider.dispose(jobExecutionContext);
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.provider.GFacProviderException;
+//import org.apache.airavata.gfac.local.handler.LocalDirectorySetupHandler;
+//import org.apache.airavata.gfac.local.provider.impl.LocalProvider;
+//import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
+//import org.apache.airavata.model.workspace.experiment.Experiment;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.LoggingRegistryImpl;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//import org.apache.airavata.schemas.gfac.InputParameterType;
+//import org.apache.airavata.schemas.gfac.OutputParameterType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.apache.commons.lang.SystemUtils;
+//import org.testng.annotations.BeforeTest;
+//import org.testng.annotations.Test;
+//
+//import com.google.common.eventbus.EventBus;
+//
+//public class LocalProviderTest {
+//    private JobExecutionContext jobExecutionContext;
+//    @BeforeTest
+//    public void setUp() throws Exception {
+//
+//        URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        File configFile = new File(resource.getPath());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
+//        //have to set InFlwo Handlers and outFlowHandlers
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        HostDescription host = new HostDescription();
+//        host.getType().setHostName("localhost");
+//        host.getType().setHostAddress("localhost");
+//        applicationContext.setHostDescription(host);
+//        /*
+//           * App
+//           */
+//        ApplicationDescription appDesc = new ApplicationDescription();
+//        ApplicationDeploymentDescriptionType app = appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//
+//        /*
+//           * Use bat file if it is compiled on Windows
+//           */
+//        if (SystemUtils.IS_OS_WINDOWS) {
+//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
+//            app.setExecutableLocation(url.getFile());
+//        } else {
+//            //for unix and Mac
+//            app.setExecutableLocation("/bin/echo");
+//        }
+//
+//        /*
+//           * Default tmp location
+//           */
+//        String tempDir = System.getProperty("java.io.tmpdir");
+//        if (tempDir == null) {
+//            tempDir = "/tmp";
+//        }
+//
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "input");
+//        app.setOutputDataDirectory(tempDir + File.separator + "output");
+//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
+//        app.setStandardError(tempDir + File.separator + "echo.stderr");
+//
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//
+//        /*
+//           * Service
+//           */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//                .size()]);
+//
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        /*
+//        * Host
+//        */
+//        applicationContext.setServiceDescription(serv);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+//        outMessage.addParameter("echo_output", echo_out);
+//
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//        jobExecutionContext.setExperimentID("test123");
+//        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
+//        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
+//        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
+//        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
+//
+//
+//    }
+//
+//    @Test
+//    public void testLocalDirectorySetupHandler() throws GFacException {
+//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+//        localDirectorySetupHandler.invoke(jobExecutionContext);
+//
+//        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+//        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
+//        junit.framework.Assert.assertTrue(new File(app.getStaticWorkingDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getScratchWorkingDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getInputDataDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getOutputDataDirectory()).exists());
+//    }
+//
+//    @Test
+//    public void testLocalProvider() throws GFacException,GFacProviderException {
+//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+//        localDirectorySetupHandler.invoke(jobExecutionContext);
+//        LocalProvider localProvider = new LocalProvider();
+//        localProvider.setMonitorPublisher(new MonitorPublisher(new EventBus()));
+//        localProvider.initialize(jobExecutionContext);
+//        localProvider.execute(jobExecutionContext);
+//        localProvider.dispose(jobExecutionContext);
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
index a4a131d..c788ace 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
@@ -31,6 +31,7 @@ import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
 import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -45,10 +46,10 @@ public class HPCMonitorID extends MonitorID {
 
     private AuthenticationInfo authenticationInfo = null;
 
-    public HPCMonitorID(HostDescription host, String jobID, String taskID, String workflowNodeID,
+    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID,
                         String experimentID, String userName,String jobName) {
-        super(host, jobID, taskID, workflowNodeID, experimentID, userName,jobName);
-        setHost(host);
+        super(computeResourceDescription, jobID, taskID, workflowNodeID, experimentID, userName,jobName);
+        setComputeResourceDescription(computeResourceDescription);
         setJobStartedTime(new Timestamp((new Date()).getTime()));
         setUserName(userName);
         setJobID(jobID);
@@ -84,8 +85,8 @@ public class HPCMonitorID extends MonitorID {
         }
     }
 
-    public HPCMonitorID(HostDescription host, String jobID, String taskID, String workflowNodeID, String experimentID, String userName, AuthenticationInfo authenticationInfo) {
-        setHost(host);
+    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID, String experimentID, String userName, AuthenticationInfo authenticationInfo) {
+        setComputeResourceDescription(computeResourceDescription);
         setJobStartedTime(new Timestamp((new Date()).getTime()));
         this.authenticationInfo = authenticationInfo;
         // if we give myproxyauthenticationInfo, so we try to use myproxy user as the user

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
index 0480925..c2017a0 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
@@ -20,34 +20,36 @@
 */
 package org.apache.airavata.gfac.monitor;
 
-import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 
-import java.util.ArrayList;
 import java.util.List;
 
 public class HostMonitorData {
-    private HostDescription host;
+//    private HostDescription host;
+    private ComputeResourceDescription computeResourceDescription;
+    private JobSubmissionProtocol jobSubmissionProtocol;
+    private DataMovementProtocol dataMovementProtocol;
 
     private List<MonitorID> monitorIDs;
 
-    public HostMonitorData(HostDescription host) {
-        this.host = host;
-        monitorIDs = new ArrayList<MonitorID>();
-    }
+    public HostMonitorData(JobExecutionContext jobExecutionContext) {
+        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
+        this.jobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        this.dataMovementProtocol = jobExecutionContext.getPreferredDataMovementProtocol();
 
-    public HostMonitorData(HostDescription host, List<MonitorID> monitorIDs) {
-        this.host = host;
-        this.monitorIDs = monitorIDs;
     }
 
-    public HostDescription getHost() {
-        return host;
+    public ComputeResourceDescription getComputeResourceDescription() {
+        return computeResourceDescription;
     }
 
-    public void setHost(HostDescription host) {
-        this.host = host;
+    public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
+        this.computeResourceDescription = computeResourceDescription;
     }
 
     public List<MonitorID> getMonitorIDs() {
@@ -67,4 +69,12 @@ public class HostMonitorData {
     public void addMonitorIDForHost(MonitorID monitorID)throws AiravataMonitorException {
         monitorIDs.add(monitorID);
     }
+
+    public JobSubmissionProtocol getJobSubmissionProtocol() {
+        return jobSubmissionProtocol;
+    }
+
+    public DataMovementProtocol getDataMovementProtocol() {
+        return dataMovementProtocol;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
index ceb440c..3a0e44d 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -99,7 +99,7 @@ public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
             } catch (InterruptedException e) {
                 e.printStackTrace();
             }
-            CommonUtils.addMonitortoQueue(hpcPullMonitor.getQueue(), monitorID);
+            CommonUtils.addMonitortoQueue(hpcPullMonitor.getQueue(), monitorID, jobExecutionContext);
             CommonUtils.increaseZkJobCount(monitorID); // update change job count to zookeeper
         } catch (AiravataMonitorException e) {
             logger.errorId(monitorID.getJobID(), "Error adding job {} monitorID object to the queue with experiment {}",

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 952b30e..122d1e2 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -38,6 +38,7 @@ import org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer;
 import org.apache.airavata.gfac.monitor.util.CommonUtils;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
 import org.apache.airavata.model.workspace.experiment.JobState;
@@ -159,20 +160,19 @@ public class HPCPullMonitor extends PullMonitor {
             take = this.queue.take();
             List<HostMonitorData> hostMonitorData = take.getHostMonitorData();
             for (HostMonitorData iHostMonitorData : hostMonitorData) {
-                if (iHostMonitorData.getHost().getType() instanceof GsisshHostType
-                        || iHostMonitorData.getHost().getType() instanceof SSHHostType) {
-                    String hostName =  iHostMonitorData.getHost().getType().getHostAddress();
+                if (iHostMonitorData.getJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+                    String hostName = iHostMonitorData.getComputeResourceDescription().getHostName();
                     ResourceConnection connection = null;
                     if (connections.containsKey(hostName)) {
-                        if(!connections.get(hostName).isConnected()){
-                            connection = new ResourceConnection(iHostMonitorData,getAuthenticationInfo());
+                        if (!connections.get(hostName).isConnected()) {
+                            connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
                             connections.put(hostName, connection);
-                        }else{
+                        } else {
                             logger.debug("We already have this connection so not going to create one");
                             connection = connections.get(hostName);
                         }
                     } else {
-                        connection = new ResourceConnection(iHostMonitorData,getAuthenticationInfo());
+                        connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
                         connections.put(hostName, connection);
                     }
 
@@ -207,7 +207,7 @@ public class HPCPullMonitor extends PullMonitor {
                             MonitorID iMonitorID = monitorIDListIterator.next();
                             String completeId = null;
                             while (iterator.hasNext()) {
-                                 completeId = iterator.next();
+                                completeId = iterator.next();
                                 if (completeId.equals(iMonitorID.getUserName() + "," + iMonitorID.getJobName())) {
                                     logger.info("This job is finished because push notification came with <username,jobName> " + completeId);
                                     iMonitorID.setStatus(JobState.COMPLETE);
@@ -239,6 +239,7 @@ public class HPCPullMonitor extends PullMonitor {
                                 !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
                             iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
                         }else if(JobState.COMPLETE.equals(iMonitorID.getStatus())){
+                            completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                             logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
                                     "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
                             iterator.remove();
@@ -260,8 +261,7 @@ public class HPCPullMonitor extends PullMonitor {
                         MonitorID iMonitorID = iterator.next();
                         if (iMonitorID.getFailedCount() > FAILED_COUNT) {
                             iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
-                            String outputDir = iMonitorID.getJobExecutionContext().getApplicationContext()
-                                    .getApplicationDeploymentDescription().getType().getOutputDataDirectory();
+                            String outputDir = iMonitorID.getJobExecutionContext().getOutputDir();
                             List<String> stdOut = null;
                             try {
                                 stdOut = connection.getCluster().listDirectory(outputDir); // check the outputs directory
@@ -296,8 +296,8 @@ public class HPCPullMonitor extends PullMonitor {
 
 
                 } else {
-                    logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.getHost()
-                            .getType().getHostAddress());
+                    logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.
+                            getComputeResourceDescription().getHostName());
                 }
             }
             // We have finished all the HostMonitorData object in userMonitorData, now we need to put it back

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
index 3abcf1d..a503154 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
@@ -34,6 +34,7 @@ import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.monitor.HostMonitorData;
 import org.apache.airavata.gfac.monitor.UserMonitorData;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
@@ -79,11 +80,11 @@ public class CommonUtils {
         }
     }
     public static String getChannelID(MonitorID monitorID) {
-        return monitorID.getUserName() + "-" + monitorID.getHost().getType().getHostName();
+        return monitorID.getUserName() + "-" + monitorID.getComputeResourceDescription().getHostName();
     }
 
     public static String getRoutingKey(MonitorID monitorID) {
-        return "*." + monitorID.getUserName() + "." + monitorID.getHost().getType().getHostAddress();
+        return "*." + monitorID.getUserName() + "." + monitorID.getComputeResourceDescription().getIpAddresses().get(0);
     }
 
     public static String getChannelID(String userName,String hostAddress) {
@@ -94,7 +95,7 @@ public class CommonUtils {
         return "*." + userName + "." + hostAddress;
     }
 
-    public static void addMonitortoQueue(BlockingQueue<UserMonitorData> queue, MonitorID monitorID) throws AiravataMonitorException {
+    public static void addMonitortoQueue(BlockingQueue<UserMonitorData> queue, MonitorID monitorID, JobExecutionContext jobExecutionContext) throws AiravataMonitorException {
         synchronized (queue) {
             Iterator<UserMonitorData> iterator = queue.iterator();
             while (iterator.hasNext()) {
@@ -103,7 +104,7 @@ public class CommonUtils {
                     // then this is the right place to update
                     List<HostMonitorData> monitorIDs = next.getHostMonitorData();
                     for (HostMonitorData host : monitorIDs) {
-                        if (host.getHost().toXML().equals(monitorID.getHost().toXML())) {
+                        if (isEqual(host.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
                             // ok we found right place to add this monitorID
                             host.addMonitorIDForHost(monitorID);
                             logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
@@ -113,7 +114,7 @@ public class CommonUtils {
                     }
                     // there is a userMonitor object for this user name but no Hosts for this host
                     // so we have to create new Hosts
-                    HostMonitorData hostMonitorData = new HostMonitorData(monitorID.getHost());
+                    HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
                     hostMonitorData.addMonitorIDForHost(monitorID);
                     next.addHostMonitorData(hostMonitorData);
                     logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
@@ -121,7 +122,7 @@ public class CommonUtils {
                     return;
                 }
             }
-            HostMonitorData hostMonitorData = new HostMonitorData(monitorID.getHost());
+            HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
             hostMonitorData.addMonitorIDForHost(monitorID);
 
             UserMonitorData userMonitorData = new UserMonitorData(monitorID.getUserName());
@@ -135,11 +136,18 @@ public class CommonUtils {
             }
         }
     }
+
+    private static boolean isEqual(ComputeResourceDescription comRes_1, ComputeResourceDescription comRes_2) {
+        return comRes_1.getComputeResourceId().equals(comRes_2.getComputeResourceId()) &&
+                comRes_1.getHostName().equals(comRes_2.getHostName());
+    }
+
     public static boolean isTheLastJobInQueue(BlockingQueue<MonitorID> queue,MonitorID monitorID){
         Iterator<MonitorID> iterator = queue.iterator();
         while(iterator.hasNext()){
             MonitorID next = iterator.next();
-            if(monitorID.getUserName().equals(next.getUserName()) && CommonUtils.isEqual(monitorID.getHost(), next.getHost())){
+            if (monitorID.getUserName().equals(next.getUserName()) &&
+                    CommonUtils.isEqual(monitorID.getComputeResourceDescription(), next.getComputeResourceDescription())) {
                 return false;
             }
         }
@@ -162,7 +170,7 @@ public class CommonUtils {
                     Iterator<HostMonitorData> iterator1 = hostMonitorData.iterator();
                     while (iterator1.hasNext()) {
                         HostMonitorData iHostMonitorID = iterator1.next();
-                        if (iHostMonitorID.getHost().toXML().equals(monitorID.getHost().toXML())) {
+                        if (isEqual(iHostMonitorID.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
                             Iterator<MonitorID> iterator2 = iHostMonitorID.getMonitorIDs().iterator();
                             while (iterator2.hasNext()) {
                                 MonitorID iMonitorID = iterator2.next();
@@ -172,11 +180,10 @@ public class CommonUtils {
                                     // could be different, thats why we check the jobID
                                     iterator2.remove();
                                     logger.infoId(monitorID.getJobID(), "Removed the jobId: {} JobName: {} from monitoring last " +
-                                            "status:{}", monitorID.getJobID(),monitorID.getJobName(), monitorID.getStatus().toString());
+                                            "status:{}", monitorID.getJobID(), monitorID.getJobName(), monitorID.getStatus().toString());
                                     if (iHostMonitorID.getMonitorIDs().size() == 0) {
                                         iterator1.remove();
-                                        logger.debug("Removed host {} from monitoring queue", iHostMonitorID.getHost()
-                                                .getType().getHostAddress());
+                                        logger.debug("Removed host {} from monitoring queue", iHostMonitorID.getComputeResourceDescription().getHostName());
                                         if (hostMonitorData.size() == 0) {
                                             // no useful data so we have to remove the element from the queue
                                             queue.remove(next);
@@ -330,7 +337,7 @@ public class CommonUtils {
      */
     public static String getJobCountUpdatePath(MonitorID monitorID){
         return new StringBuilder("/").append(Constants.STAT).append("/").append(monitorID.getUserName())
-                .append("/").append(monitorID.getHost().getType().getHostAddress()).append("/").append(Constants.JOB).toString();
+                .append("/").append(monitorID.getComputeResourceDescription().getHostName()).append("/").append(Constants.JOB).toString();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e584f87/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
index 537d8bb..610934e 100644
--- a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
@@ -1,172 +1,172 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.job;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.HPCMonitorID;
-import org.apache.airavata.gfac.monitor.UserMonitorData;
-import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.junit.Assert;
-import org.testng.annotations.Test;
-
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
-
-public class QstatMonitorTestWithMyProxyAuth {
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private HostDescription hostDescription;
-    private MonitorPublisher monitorPublisher;
-    private BlockingQueue<UserMonitorData> pullQueue;
-    private Thread monitorThread;
-
-    @org.testng.annotations.BeforeClass
-    public void setUp() throws Exception {
-//        System.setProperty("myproxy.username", "ogce");
-//        System.setProperty("myproxy.password", "");
-//        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-//        System.setProperty("gsi.working.directory", "/home/ogce");
-//        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
-        myProxyUserName = System.getProperty("myproxy.username");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        certificateLocation = System.getProperty("trusted.cert.location");
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorPublisher =  new MonitorPublisher(new EventBus());
-        class InnerClassQstat {
-
-            @Subscribe
-            private void getStatus(JobStatusChangeEvent status) {
-                Assert.assertNotNull(status);
-                System.out.println(status.getState().toString());
-                monitorThread.interrupt();
-            }
-        }
-        monitorPublisher.registerListener(this);
-        pullQueue = new LinkedBlockingQueue<UserMonitorData>();
-        final HPCPullMonitor qstatMonitor = new
-                HPCPullMonitor(pullQueue, monitorPublisher);
-        try {
-            (new Thread(){
-                public void run(){
-                    qstatMonitor.run();
-                }
-            }).start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
-        hostDescription.getType().setHostName("gsissh-gordon");
-        ((GsisshHostType) hostDescription.getType()).setPort(22);
-        ((GsisshHostType)hostDescription.getType()).setInstalledPath("/opt/torque/bin/");
-    }
-
-    @Test
-    public void testQstatMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
-
-
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("sds128");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        for (int i = 0; i < 1; i++) {
-            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-            System.out.println("Job submitted successfully, Job ID: " +  jobID);
-            MonitorID monitorID = new HPCMonitorID(hostDescription, jobID,null,null,null, "ogce","");
-            ((HPCMonitorID)monitorID).setAuthenticationInfo(authenticationInfo);
-            try {
-                org.apache.airavata.gfac.monitor.util.CommonUtils.addMonitortoQueue(pullQueue, monitorID);
-            } catch (Exception e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            }
-        }
-        try {
-
-            monitorThread.join();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Subscribe
-    public void testCaseShutDown(JobStatusChangeEvent status) {
-        Assert.assertNotNull(status.getState());
-        monitorThread.stop();
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.job;
+//
+//import java.io.File;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.concurrent.BlockingQueue;
+//import java.util.concurrent.LinkedBlockingQueue;
+//
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.gfac.core.monitor.MonitorID;
+//import org.apache.airavata.gfac.monitor.HPCMonitorID;
+//import org.apache.airavata.gfac.monitor.UserMonitorData;
+//import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
+//import org.apache.airavata.gsi.ssh.api.Cluster;
+//import org.apache.airavata.gsi.ssh.api.SSHApiException;
+//import org.apache.airavata.gsi.ssh.api.ServerInfo;
+//import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
+//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+//import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+//import org.apache.airavata.gsi.ssh.util.CommonUtils;
+//import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
+//import org.junit.Assert;
+//import org.testng.annotations.Test;
+//
+//import com.google.common.eventbus.EventBus;
+//import com.google.common.eventbus.Subscribe;
+//
+//public class QstatMonitorTestWithMyProxyAuth {
+//    private String myProxyUserName;
+//    private String myProxyPassword;
+//    private String certificateLocation;
+//    private String pbsFilePath;
+//    private String workingDirectory;
+//    private HostDescription hostDescription;
+//    private MonitorPublisher monitorPublisher;
+//    private BlockingQueue<UserMonitorData> pullQueue;
+//    private Thread monitorThread;
+//
+//    @org.testng.annotations.BeforeClass
+//    public void setUp() throws Exception {
+////        System.setProperty("myproxy.username", "ogce");
+////        System.setProperty("myproxy.password", "");
+////        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+////        System.setProperty("gsi.working.directory", "/home/ogce");
+////        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+//        myProxyUserName = System.getProperty("myproxy.username");
+//        myProxyPassword = System.getProperty("myproxy.password");
+//        workingDirectory = System.getProperty("gsi.working.directory");
+//        certificateLocation = System.getProperty("trusted.cert.location");
+//        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
+//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+//            throw new Exception("Need my proxy user name password to run tests.");
+//        }
+//
+//        monitorPublisher =  new MonitorPublisher(new EventBus());
+//        class InnerClassQstat {
+//
+//            @Subscribe
+//            private void getStatus(JobStatusChangeEvent status) {
+//                Assert.assertNotNull(status);
+//                System.out.println(status.getState().toString());
+//                monitorThread.interrupt();
+//            }
+//        }
+//        monitorPublisher.registerListener(this);
+//        pullQueue = new LinkedBlockingQueue<UserMonitorData>();
+//        final HPCPullMonitor qstatMonitor = new
+//                HPCPullMonitor(pullQueue, monitorPublisher);
+//        try {
+//            (new Thread(){
+//                public void run(){
+//                    qstatMonitor.run();
+//                }
+//            }).start();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//        hostDescription = new HostDescription(GsisshHostType.type);
+//        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
+//        hostDescription.getType().setHostName("gsissh-gordon");
+//        ((GsisshHostType) hostDescription.getType()).setPort(22);
+//        ((GsisshHostType)hostDescription.getType()).setInstalledPath("/opt/torque/bin/");
+//    }
+//
+//    @Test
+//    public void testQstatMonitor() throws SSHApiException {
+//        /* now have to submit a job to some machine and add that job to the queue */
+//        //Create authentication
+//        GSIAuthenticationInfo authenticationInfo
+//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+//                7512, 17280000, certificateLocation);
+//
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
+//
+//
+//        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
+//
+//
+//        // Execute command
+//        System.out.println("Target PBS file path: " + workingDirectory);
+//        // constructing the job object
+//        JobDescriptor jobDescriptor = new JobDescriptor();
+//        jobDescriptor.setWorkingDirectory(workingDirectory);
+//        jobDescriptor.setShellName("/bin/bash");
+//        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+//        jobDescriptor.setExecutablePath("/bin/echo");
+//        jobDescriptor.setAllEnvExport(true);
+//        jobDescriptor.setMailOptions("n");
+//        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+//        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+//        jobDescriptor.setNodes(1);
+//        jobDescriptor.setProcessesPerNode(1);
+//        jobDescriptor.setQueueName("normal");
+//        jobDescriptor.setMaxWallTime("60");
+//        jobDescriptor.setAcountString("sds128");
+//        List<String> inputs = new ArrayList<String>();
+//        jobDescriptor.setOwner("ogce");
+//        inputs.add("Hello World");
+//        jobDescriptor.setInputValues(inputs);
+//        //finished construction of job object
+//        System.out.println(jobDescriptor.toXML());
+//        for (int i = 0; i < 1; i++) {
+//            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+//            System.out.println("Job submitted successfully, Job ID: " +  jobID);
+//            MonitorID monitorID = new HPCMonitorID(hostDescription, jobID,null,null,null, "ogce","");
+//            ((HPCMonitorID)monitorID).setAuthenticationInfo(authenticationInfo);
+//            try {
+//                org.apache.airavata.gfac.monitor.util.CommonUtils.addMonitortoQueue(pullQueue, monitorID, jobExecutionContext);
+//            } catch (Exception e) {
+//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//            }
+//        }
+//        try {
+//
+//            monitorThread.join();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    @Subscribe
+//    public void testCaseShutDown(JobStatusChangeEvent status) {
+//        Assert.assertNotNull(status.getState());
+//        monitorThread.stop();
+//    }
+//}


[19/44] git commit: adding delete queue method

Posted by ch...@apache.org.
adding delete queue method


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9cf6d0d8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9cf6d0d8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9cf6d0d8

Branch: refs/heads/gfac_appcatalog_int
Commit: 9cf6d0d8bd661e72c28e988c6f00737fbf221493
Parents: 08fff2c
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Nov 4 13:40:26 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Nov 4 13:40:26 2014 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    15 +
 .../java/org/apache/airavata/api/Airavata.java  | 21732 +++++++++--------
 .../main/resources/lib/airavata/Airavata.cpp    |   375 +
 .../src/main/resources/lib/airavata/Airavata.h  |   159 +
 .../lib/airavata/Airavata_server.skeleton.cpp   |     5 +
 .../resources/lib/Airavata/API/Airavata.php     |   292 +
 .../airavataAPI.thrift                          |     5 +
 .../appcatalog/cpi/ComputeResource.java         |     2 +
 .../catalog/data/impl/ComputeResourceImpl.java  |    16 +-
 .../data/resources/BatchQueueResource.java      |    10 +-
 10 files changed, 12379 insertions(+), 10232 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/9cf6d0d8/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 9eb9c23..6f23d6c 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -2505,6 +2505,21 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public boolean deleteBatchQueue(String computeResourceId, String queueName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            appCatalog.getComputeResource().removeBatchQueue(computeResourceId, queueName);
+            return true;
+        } catch (AppCatalogException e) {
+            logger.errorId(computeResourceId, "Error while deleting batch queue...", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while deleting batch queue. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Register a Gateway Resource Profile.
      *


[32/44] git commit: adding util methods to get job submission

Posted by ch...@apache.org.
adding util methods to get job submission


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/51361579
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/51361579
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/51361579

Branch: refs/heads/gfac_appcatalog_int
Commit: 51361579602458f56e9b70250c76397305941696
Parents: e28919c
Author: chathuriw <ka...@gmail.com>
Authored: Thu Oct 30 17:06:06 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:15 2014 -0500

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/Scheduler.java     |  4 +--
 .../core/handler/AppDescriptorCheckHandler.java |  6 ++--
 .../airavata/gfac/core/utils/GFacUtils.java     | 38 ++++++++++++++++++++
 3 files changed, 43 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/51361579/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 8f5847f..9e642fe 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -109,7 +109,7 @@ public class Scheduler {
             if (provider == null) {
 
                 List<JobSubmissionInterface> jobSubmissionInterfaces = jobExecutionContext.getApplicationContext().getComputeResourceDescription().getJobSubmissionInterfaces();
-                String hostClass = jobExecutionContext.getPrefferedJobSubmissionProtocal();
+                String hostClass = jobExecutionContext.getPreferredJobSubmissionProtocol().toString();
                 providerClassName = GFacConfiguration.getAttributeValue(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_ON_HOST + hostClass + "']", Constants.GFAC_CONFIG_CLASS_ATTRIBUTE);
                 Class<? extends GFacProvider> aClass1 = Class.forName(providerClassName).asSubclass(GFacProvider.class);
                 provider = aClass1.newInstance();
@@ -162,7 +162,7 @@ public class Scheduler {
             // This should be have a single element only.
 
             if (executionMode == null || "".equals(executionMode)) {
-                String hostClass = jobExecutionContext.getPrefferedJobSubmissionProtocal();
+                String hostClass = jobExecutionContext.getPreferredJobSubmissionProtocol().toString();
                 executionMode = GFacConfiguration.getAttributeValue(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_ON_HOST + hostClass + "']", Constants.GFAC_CONFIG_EXECUTION_MODE_ATTRIBUTE);
             }
         } catch (XPathExpressionException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/51361579/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
index 4627bf5..72a8f1f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
@@ -53,7 +53,7 @@ public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
         /*
         * Stdout and Stderr for Shell
         */
-        data.append(",").append(jobExecutionContext.getStandaredOutput()).append(",").append(jobExecutionContext.getStandaredError());
+        data.append(",").append(jobExecutionContext.getStandardOutput()).append(",").append(jobExecutionContext.getStandardError());
 
 
         logger.info("Recoverable data is saving to zk: " + data.toString());
@@ -74,8 +74,8 @@ public class AppDescriptorCheckHandler implements GFacRecoverableHandler {
             jobExecutionContext.setWorkingDir(split[1]);
             jobExecutionContext.setInputDir(split[2]);
             jobExecutionContext.setOutputDir(split[3]);
-            jobExecutionContext.setStandaredOutput(split[4]);
-            jobExecutionContext.setStandaredError(split[5]);
+            jobExecutionContext.setStandardOutput(split[4]);
+            jobExecutionContext.setStandardError(split[5]);
         } catch (Exception e) {
             throw new GFacHandlerException(e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/51361579/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index ce74e4e..ff6f2c2 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -20,6 +20,9 @@
  */
 package org.apache.airavata.gfac.core.utils;
 
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.DBUtil;
@@ -36,6 +39,8 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -1237,4 +1242,37 @@ public class GFacUtils {
 		}
 	}
 
+    public static LOCALSubmission getLocalJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getLocalJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
+    public static UnicoreJobSubmission getUnicoreJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
+    public static UnicoreJobSubmission getJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
 }


[31/44] git commit: Added monitor mode enum to computeResourceModel.thrift and changed ComputerResourcePreference's preferred JobSubmission and DataMovement protocols types to their enums

Posted by ch...@apache.org.
Added monitor mode enum to computeResourceModel.thrift and changed ComputerResourcePreference's preferred JobSubmission and DataMovement protocols types to their enums


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/96a673f0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/96a673f0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/96a673f0

Branch: refs/heads/gfac_appcatalog_int
Commit: 96a673f0a51fa8944d5700f61fef089e477f99d8
Parents: a1e0ec8
Author: shamrath <sh...@gmail.com>
Authored: Thu Oct 30 12:20:54 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 11:16:14 2014 -0500

----------------------------------------------------------------------
 .../lib/airavata/computeResourceModel_types.cpp | 278 ++++++++++---------
 .../lib/airavata/computeResourceModel_types.h   |  36 ++-
 .../gatewayResourceProfileModel_types.cpp       |  48 ++--
 .../gatewayResourceProfileModel_types.h         |  19 +-
 .../Model/AppCatalog/ComputeResource/Types.php  |  29 ++
 .../Model/AppCatalog/GatewayProfile/Types.php   |  20 +-
 .../appcatalog/computeresource/MonitorMode.java |  73 +++++
 .../computeresource/ResourceJobManager.java     | 121 +++++++-
 .../ComputeResourcePreference.java              |  68 +++--
 .../computeResourceModel.thrift                 |  18 +-
 .../gatewayResourceProfileModel.thrift          |   5 +-
 11 files changed, 511 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index 2555cb8..27f62dd 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -61,6 +61,16 @@ const char* _kJobManagerCommandNames[] = {
 };
 const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kJobManagerCommandValues, _kJobManagerCommandNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
+int _kMonitorModeValues[] = {
+  MonitorMode::PUSH,
+  MonitorMode::PULL
+};
+const char* _kMonitorModeNames[] = {
+  "PUSH",
+  "PULL"
+};
+const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
 int _kFileSystemsValues[] = {
   FileSystems::HOME,
   FileSystems::WORK,
@@ -137,8 +147,8 @@ const char* _kProviderNameNames[] = {
 };
 const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kProviderNameValues, _kProviderNameNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-const char* ResourceJobManager::ascii_fingerprint = "F61CAF80247D0E44C8D52504F3A43BED";
-const uint8_t ResourceJobManager::binary_fingerprint[16] = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
+const char* ResourceJobManager::ascii_fingerprint = "83F3E1FB1C076C79A1E733A1E531B938";
+const uint8_t ResourceJobManager::binary_fingerprint[16] = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
 
 uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -221,6 +231,16 @@ uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot)
           xfer += iprot->skip(ftype);
         }
         break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast9;
+          xfer += iprot->readI32(ecast9);
+          this->monitorMode = (MonitorMode::type)ecast9;
+          this->__isset.monitorMode = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -263,16 +283,21 @@ uint32_t ResourceJobManager::write(::apache::thrift::protocol::TProtocol* oprot)
     xfer += oprot->writeFieldBegin("jobManagerCommands", ::apache::thrift::protocol::T_MAP, 5);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->jobManagerCommands.size()));
-      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter9;
-      for (_iter9 = this->jobManagerCommands.begin(); _iter9 != this->jobManagerCommands.end(); ++_iter9)
+      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter10;
+      for (_iter10 = this->jobManagerCommands.begin(); _iter10 != this->jobManagerCommands.end(); ++_iter10)
       {
-        xfer += oprot->writeI32((int32_t)_iter9->first);
-        xfer += oprot->writeString(_iter9->second);
+        xfer += oprot->writeI32((int32_t)_iter10->first);
+        xfer += oprot->writeString(_iter10->second);
       }
       xfer += oprot->writeMapEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.monitorMode) {
+    xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 6);
+    xfer += oprot->writeI32((int32_t)this->monitorMode);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -285,6 +310,7 @@ void swap(ResourceJobManager &a, ResourceJobManager &b) {
   swap(a.pushMonitoringEndpoint, b.pushMonitoringEndpoint);
   swap(a.jobManagerBinPath, b.jobManagerBinPath);
   swap(a.jobManagerCommands, b.jobManagerCommands);
+  swap(a.monitorMode, b.monitorMode);
   swap(a.__isset, b.__isset);
 }
 
@@ -458,9 +484,9 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast10;
-          xfer += iprot->readI32(ecast10);
-          this->securityProtocol = (SecurityProtocol::type)ecast10;
+          int32_t ecast11;
+          xfer += iprot->readI32(ecast11);
+          this->securityProtocol = (SecurityProtocol::type)ecast11;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -570,9 +596,9 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast11;
-          xfer += iprot->readI32(ecast11);
-          this->securityProtocol = (SecurityProtocol::type)ecast11;
+          int32_t ecast12;
+          xfer += iprot->readI32(ecast12);
+          this->securityProtocol = (SecurityProtocol::type)ecast12;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -582,14 +608,14 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->gridFTPEndPoints.clear();
-            uint32_t _size12;
-            ::apache::thrift::protocol::TType _etype15;
-            xfer += iprot->readListBegin(_etype15, _size12);
-            this->gridFTPEndPoints.resize(_size12);
-            uint32_t _i16;
-            for (_i16 = 0; _i16 < _size12; ++_i16)
+            uint32_t _size13;
+            ::apache::thrift::protocol::TType _etype16;
+            xfer += iprot->readListBegin(_etype16, _size13);
+            this->gridFTPEndPoints.resize(_size13);
+            uint32_t _i17;
+            for (_i17 = 0; _i17 < _size13; ++_i17)
             {
-              xfer += iprot->readString(this->gridFTPEndPoints[_i16]);
+              xfer += iprot->readString(this->gridFTPEndPoints[_i17]);
             }
             xfer += iprot->readListEnd();
           }
@@ -631,10 +657,10 @@ uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot
   xfer += oprot->writeFieldBegin("gridFTPEndPoints", ::apache::thrift::protocol::T_LIST, 3);
   {
     xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoints.size()));
-    std::vector<std::string> ::const_iterator _iter17;
-    for (_iter17 = this->gridFTPEndPoints.begin(); _iter17 != this->gridFTPEndPoints.end(); ++_iter17)
+    std::vector<std::string> ::const_iterator _iter18;
+    for (_iter18 = this->gridFTPEndPoints.begin(); _iter18 != this->gridFTPEndPoints.end(); ++_iter18)
     {
-      xfer += oprot->writeString((*_iter17));
+      xfer += oprot->writeString((*_iter18));
     }
     xfer += oprot->writeListEnd();
   }
@@ -688,9 +714,9 @@ uint32_t UnicoreDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast18;
-          xfer += iprot->readI32(ecast18);
-          this->securityProtocol = (SecurityProtocol::type)ecast18;
+          int32_t ecast19;
+          xfer += iprot->readI32(ecast19);
+          this->securityProtocol = (SecurityProtocol::type)ecast19;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -750,8 +776,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b) {
   swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
 }
 
-const char* LOCALSubmission::ascii_fingerprint = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
-const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
+const char* LOCALSubmission::ascii_fingerprint = "D51508D1A661370F4785A01334DB8637";
+const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
 
 uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -894,8 +920,8 @@ void swap(LOCALDataMovement &a, LOCALDataMovement &b) {
   swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
 }
 
-const char* SSHJobSubmission::ascii_fingerprint = "8BC403A3B093DDB0CB8F04ED699DBA3D";
-const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0x8B,0xC4,0x03,0xA3,0xB0,0x93,0xDD,0xB0,0xCB,0x8F,0x04,0xED,0x69,0x9D,0xBA,0x3D};
+const char* SSHJobSubmission::ascii_fingerprint = "BCAF073DD81C8F6A9ED716A45569D2B3";
+const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
 
 uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -930,9 +956,9 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast19;
-          xfer += iprot->readI32(ecast19);
-          this->securityProtocol = (SecurityProtocol::type)ecast19;
+          int32_t ecast20;
+          xfer += iprot->readI32(ecast20);
+          this->securityProtocol = (SecurityProtocol::type)ecast20;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1056,9 +1082,9 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast20;
-          xfer += iprot->readI32(ecast20);
-          this->securityProtocol = (SecurityProtocol::type)ecast20;
+          int32_t ecast21;
+          xfer += iprot->readI32(ecast21);
+          this->securityProtocol = (SecurityProtocol::type)ecast21;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1068,14 +1094,14 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->globusGateKeeperEndPoint.clear();
-            uint32_t _size21;
-            ::apache::thrift::protocol::TType _etype24;
-            xfer += iprot->readListBegin(_etype24, _size21);
-            this->globusGateKeeperEndPoint.resize(_size21);
-            uint32_t _i25;
-            for (_i25 = 0; _i25 < _size21; ++_i25)
+            uint32_t _size22;
+            ::apache::thrift::protocol::TType _etype25;
+            xfer += iprot->readListBegin(_etype25, _size22);
+            this->globusGateKeeperEndPoint.resize(_size22);
+            uint32_t _i26;
+            for (_i26 = 0; _i26 < _size22; ++_i26)
             {
-              xfer += iprot->readString(this->globusGateKeeperEndPoint[_i25]);
+              xfer += iprot->readString(this->globusGateKeeperEndPoint[_i26]);
             }
             xfer += iprot->readListEnd();
           }
@@ -1116,10 +1142,10 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
     xfer += oprot->writeFieldBegin("globusGateKeeperEndPoint", ::apache::thrift::protocol::T_LIST, 3);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->globusGateKeeperEndPoint.size()));
-      std::vector<std::string> ::const_iterator _iter26;
-      for (_iter26 = this->globusGateKeeperEndPoint.begin(); _iter26 != this->globusGateKeeperEndPoint.end(); ++_iter26)
+      std::vector<std::string> ::const_iterator _iter27;
+      for (_iter27 = this->globusGateKeeperEndPoint.begin(); _iter27 != this->globusGateKeeperEndPoint.end(); ++_iter27)
       {
-        xfer += oprot->writeString((*_iter26));
+        xfer += oprot->writeString((*_iter27));
       }
       xfer += oprot->writeListEnd();
     }
@@ -1174,9 +1200,9 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast27;
-          xfer += iprot->readI32(ecast27);
-          this->securityProtocol = (SecurityProtocol::type)ecast27;
+          int32_t ecast28;
+          xfer += iprot->readI32(ecast28);
+          this->securityProtocol = (SecurityProtocol::type)ecast28;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1275,9 +1301,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast28;
-          xfer += iprot->readI32(ecast28);
-          this->securityProtocol = (SecurityProtocol::type)ecast28;
+          int32_t ecast29;
+          xfer += iprot->readI32(ecast29);
+          this->securityProtocol = (SecurityProtocol::type)ecast29;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1301,9 +1327,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast29;
-          xfer += iprot->readI32(ecast29);
-          this->providerName = (ProviderName::type)ecast29;
+          int32_t ecast30;
+          xfer += iprot->readI32(ecast30);
+          this->providerName = (ProviderName::type)ecast30;
           isset_providerName = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1420,9 +1446,9 @@ uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* ipr
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast30;
-          xfer += iprot->readI32(ecast30);
-          this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast30;
+          int32_t ecast31;
+          xfer += iprot->readI32(ecast31);
+          this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast31;
           isset_jobSubmissionProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1518,9 +1544,9 @@ uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* ipro
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast31;
-          xfer += iprot->readI32(ecast31);
-          this->dataMovementProtocol = (DataMovementProtocol::type)ecast31;
+          int32_t ecast32;
+          xfer += iprot->readI32(ecast32);
+          this->dataMovementProtocol = (DataMovementProtocol::type)ecast32;
           isset_dataMovementProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -1625,14 +1651,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->hostAliases.clear();
-            uint32_t _size32;
-            ::apache::thrift::protocol::TType _etype35;
-            xfer += iprot->readListBegin(_etype35, _size32);
-            this->hostAliases.resize(_size32);
-            uint32_t _i36;
-            for (_i36 = 0; _i36 < _size32; ++_i36)
+            uint32_t _size33;
+            ::apache::thrift::protocol::TType _etype36;
+            xfer += iprot->readListBegin(_etype36, _size33);
+            this->hostAliases.resize(_size33);
+            uint32_t _i37;
+            for (_i37 = 0; _i37 < _size33; ++_i37)
             {
-              xfer += iprot->readString(this->hostAliases[_i36]);
+              xfer += iprot->readString(this->hostAliases[_i37]);
             }
             xfer += iprot->readListEnd();
           }
@@ -1645,14 +1671,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->ipAddresses.clear();
-            uint32_t _size37;
-            ::apache::thrift::protocol::TType _etype40;
-            xfer += iprot->readListBegin(_etype40, _size37);
-            this->ipAddresses.resize(_size37);
-            uint32_t _i41;
-            for (_i41 = 0; _i41 < _size37; ++_i41)
+            uint32_t _size38;
+            ::apache::thrift::protocol::TType _etype41;
+            xfer += iprot->readListBegin(_etype41, _size38);
+            this->ipAddresses.resize(_size38);
+            uint32_t _i42;
+            for (_i42 = 0; _i42 < _size38; ++_i42)
             {
-              xfer += iprot->readString(this->ipAddresses[_i41]);
+              xfer += iprot->readString(this->ipAddresses[_i42]);
             }
             xfer += iprot->readListEnd();
           }
@@ -1673,14 +1699,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->batchQueues.clear();
-            uint32_t _size42;
-            ::apache::thrift::protocol::TType _etype45;
-            xfer += iprot->readListBegin(_etype45, _size42);
-            this->batchQueues.resize(_size42);
-            uint32_t _i46;
-            for (_i46 = 0; _i46 < _size42; ++_i46)
+            uint32_t _size43;
+            ::apache::thrift::protocol::TType _etype46;
+            xfer += iprot->readListBegin(_etype46, _size43);
+            this->batchQueues.resize(_size43);
+            uint32_t _i47;
+            for (_i47 = 0; _i47 < _size43; ++_i47)
             {
-              xfer += this->batchQueues[_i46].read(iprot);
+              xfer += this->batchQueues[_i47].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -1693,19 +1719,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_MAP) {
           {
             this->fileSystems.clear();
-            uint32_t _size47;
-            ::apache::thrift::protocol::TType _ktype48;
-            ::apache::thrift::protocol::TType _vtype49;
-            xfer += iprot->readMapBegin(_ktype48, _vtype49, _size47);
-            uint32_t _i51;
-            for (_i51 = 0; _i51 < _size47; ++_i51)
+            uint32_t _size48;
+            ::apache::thrift::protocol::TType _ktype49;
+            ::apache::thrift::protocol::TType _vtype50;
+            xfer += iprot->readMapBegin(_ktype49, _vtype50, _size48);
+            uint32_t _i52;
+            for (_i52 = 0; _i52 < _size48; ++_i52)
             {
-              FileSystems::type _key52;
-              int32_t ecast54;
-              xfer += iprot->readI32(ecast54);
-              _key52 = (FileSystems::type)ecast54;
-              std::string& _val53 = this->fileSystems[_key52];
-              xfer += iprot->readString(_val53);
+              FileSystems::type _key53;
+              int32_t ecast55;
+              xfer += iprot->readI32(ecast55);
+              _key53 = (FileSystems::type)ecast55;
+              std::string& _val54 = this->fileSystems[_key53];
+              xfer += iprot->readString(_val54);
             }
             xfer += iprot->readMapEnd();
           }
@@ -1718,14 +1744,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->jobSubmissionInterfaces.clear();
-            uint32_t _size55;
-            ::apache::thrift::protocol::TType _etype58;
-            xfer += iprot->readListBegin(_etype58, _size55);
-            this->jobSubmissionInterfaces.resize(_size55);
-            uint32_t _i59;
-            for (_i59 = 0; _i59 < _size55; ++_i59)
+            uint32_t _size56;
+            ::apache::thrift::protocol::TType _etype59;
+            xfer += iprot->readListBegin(_etype59, _size56);
+            this->jobSubmissionInterfaces.resize(_size56);
+            uint32_t _i60;
+            for (_i60 = 0; _i60 < _size56; ++_i60)
             {
-              xfer += this->jobSubmissionInterfaces[_i59].read(iprot);
+              xfer += this->jobSubmissionInterfaces[_i60].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -1738,14 +1764,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->dataMovementInterfaces.clear();
-            uint32_t _size60;
-            ::apache::thrift::protocol::TType _etype63;
-            xfer += iprot->readListBegin(_etype63, _size60);
-            this->dataMovementInterfaces.resize(_size60);
-            uint32_t _i64;
-            for (_i64 = 0; _i64 < _size60; ++_i64)
+            uint32_t _size61;
+            ::apache::thrift::protocol::TType _etype64;
+            xfer += iprot->readListBegin(_etype64, _size61);
+            this->dataMovementInterfaces.resize(_size61);
+            uint32_t _i65;
+            for (_i65 = 0; _i65 < _size61; ++_i65)
             {
-              xfer += this->dataMovementInterfaces[_i64].read(iprot);
+              xfer += this->dataMovementInterfaces[_i65].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -1786,10 +1812,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_LIST, 3);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
-      std::vector<std::string> ::const_iterator _iter65;
-      for (_iter65 = this->hostAliases.begin(); _iter65 != this->hostAliases.end(); ++_iter65)
+      std::vector<std::string> ::const_iterator _iter66;
+      for (_iter66 = this->hostAliases.begin(); _iter66 != this->hostAliases.end(); ++_iter66)
       {
-        xfer += oprot->writeString((*_iter65));
+        xfer += oprot->writeString((*_iter66));
       }
       xfer += oprot->writeListEnd();
     }
@@ -1799,10 +1825,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_LIST, 4);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
-      std::vector<std::string> ::const_iterator _iter66;
-      for (_iter66 = this->ipAddresses.begin(); _iter66 != this->ipAddresses.end(); ++_iter66)
+      std::vector<std::string> ::const_iterator _iter67;
+      for (_iter67 = this->ipAddresses.begin(); _iter67 != this->ipAddresses.end(); ++_iter67)
       {
-        xfer += oprot->writeString((*_iter66));
+        xfer += oprot->writeString((*_iter67));
       }
       xfer += oprot->writeListEnd();
     }
@@ -1817,10 +1843,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 6);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size()));
-      std::vector<BatchQueue> ::const_iterator _iter67;
-      for (_iter67 = this->batchQueues.begin(); _iter67 != this->batchQueues.end(); ++_iter67)
+      std::vector<BatchQueue> ::const_iterator _iter68;
+      for (_iter68 = this->batchQueues.begin(); _iter68 != this->batchQueues.end(); ++_iter68)
       {
-        xfer += (*_iter67).write(oprot);
+        xfer += (*_iter68).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -1830,11 +1856,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 7);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size()));
-      std::map<FileSystems::type, std::string> ::const_iterator _iter68;
-      for (_iter68 = this->fileSystems.begin(); _iter68 != this->fileSystems.end(); ++_iter68)
+      std::map<FileSystems::type, std::string> ::const_iterator _iter69;
+      for (_iter69 = this->fileSystems.begin(); _iter69 != this->fileSystems.end(); ++_iter69)
       {
-        xfer += oprot->writeI32((int32_t)_iter68->first);
-        xfer += oprot->writeString(_iter68->second);
+        xfer += oprot->writeI32((int32_t)_iter69->first);
+        xfer += oprot->writeString(_iter69->second);
       }
       xfer += oprot->writeMapEnd();
     }
@@ -1844,10 +1870,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 8);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size()));
-      std::vector<JobSubmissionInterface> ::const_iterator _iter69;
-      for (_iter69 = this->jobSubmissionInterfaces.begin(); _iter69 != this->jobSubmissionInterfaces.end(); ++_iter69)
+      std::vector<JobSubmissionInterface> ::const_iterator _iter70;
+      for (_iter70 = this->jobSubmissionInterfaces.begin(); _iter70 != this->jobSubmissionInterfaces.end(); ++_iter70)
       {
-        xfer += (*_iter69).write(oprot);
+        xfer += (*_iter70).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -1857,10 +1883,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 9);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size()));
-      std::vector<DataMovementInterface> ::const_iterator _iter70;
-      for (_iter70 = this->dataMovementInterfaces.begin(); _iter70 != this->dataMovementInterfaces.end(); ++_iter70)
+      std::vector<DataMovementInterface> ::const_iterator _iter71;
+      for (_iter71 = this->dataMovementInterfaces.begin(); _iter71 != this->dataMovementInterfaces.end(); ++_iter71)
       {
-        xfer += (*_iter70).write(oprot);
+        xfer += (*_iter71).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index c69be3f..e94520d 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -59,6 +59,15 @@ struct JobManagerCommand {
 
 extern const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES;
 
+struct MonitorMode {
+  enum type {
+    PUSH = 0,
+    PULL = 1
+  };
+};
+
+extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES;
+
 struct FileSystems {
   enum type {
     HOME = 0,
@@ -118,19 +127,20 @@ struct ProviderName {
 extern const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES;
 
 typedef struct _ResourceJobManager__isset {
-  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false) {}
+  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false), monitorMode(false) {}
   bool pushMonitoringEndpoint;
   bool jobManagerBinPath;
   bool jobManagerCommands;
+  bool monitorMode;
 } _ResourceJobManager__isset;
 
 class ResourceJobManager {
  public:
 
-  static const char* ascii_fingerprint; // = "F61CAF80247D0E44C8D52504F3A43BED";
-  static const uint8_t binary_fingerprint[16]; // = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
+  static const char* ascii_fingerprint; // = "83F3E1FB1C076C79A1E733A1E531B938";
+  static const uint8_t binary_fingerprint[16]; // = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
 
-  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath() {
+  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath(), monitorMode((MonitorMode::type)0) {
   }
 
   virtual ~ResourceJobManager() throw() {}
@@ -140,6 +150,7 @@ class ResourceJobManager {
   std::string pushMonitoringEndpoint;
   std::string jobManagerBinPath;
   std::map<JobManagerCommand::type, std::string>  jobManagerCommands;
+  MonitorMode::type monitorMode;
 
   _ResourceJobManager__isset __isset;
 
@@ -166,6 +177,11 @@ class ResourceJobManager {
     __isset.jobManagerCommands = true;
   }
 
+  void __set_monitorMode(const MonitorMode::type val) {
+    monitorMode = val;
+    __isset.monitorMode = true;
+  }
+
   bool operator == (const ResourceJobManager & rhs) const
   {
     if (!(resourceJobManagerId == rhs.resourceJobManagerId))
@@ -184,6 +200,10 @@ class ResourceJobManager {
       return false;
     else if (__isset.jobManagerCommands && !(jobManagerCommands == rhs.jobManagerCommands))
       return false;
+    if (__isset.monitorMode != rhs.__isset.monitorMode)
+      return false;
+    else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
+      return false;
     return true;
   }
   bool operator != (const ResourceJobManager &rhs) const {
@@ -473,8 +493,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b);
 class LOCALSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
-  static const uint8_t binary_fingerprint[16]; // = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
+  static const char* ascii_fingerprint; // = "D51508D1A661370F4785A01334DB8637";
+  static const uint8_t binary_fingerprint[16]; // = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
 
   LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS") {
   }
@@ -559,8 +579,8 @@ typedef struct _SSHJobSubmission__isset {
 class SSHJobSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "8BC403A3B093DDB0CB8F04ED699DBA3D";
-  static const uint8_t binary_fingerprint[16]; // = {0x8B,0xC4,0x03,0xA3,0xB0,0x93,0xDD,0xB0,0xCB,0x8F,0x04,0xED,0x69,0x9D,0xBA,0x3D};
+  static const char* ascii_fingerprint; // = "BCAF073DD81C8F6A9ED716A45569D2B3";
+  static const uint8_t binary_fingerprint[16]; // = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
 
   SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22) {
   }

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
index 715a346..a996421 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
@@ -27,8 +27,8 @@
 
 namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile {
 
-const char* ComputeResourcePreference::ascii_fingerprint = "9C98338B7E052CD4DEECB22F243D6DAE";
-const uint8_t ComputeResourcePreference::binary_fingerprint[16] = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+const char* ComputeResourcePreference::ascii_fingerprint = "365108C84A2E160D53CD17C2A7F06F5C";
+const uint8_t ComputeResourcePreference::binary_fingerprint[16] = {0x36,0x51,0x08,0xC8,0x4A,0x2E,0x16,0x0D,0x53,0xCD,0x17,0xC2,0xA7,0xF0,0x6F,0x5C};
 
 uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -69,16 +69,20 @@ uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol*
         }
         break;
       case 3:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->preferredJobSubmissionProtocol);
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast0;
+          xfer += iprot->readI32(ecast0);
+          this->preferredJobSubmissionProtocol = ( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)ecast0;
           this->__isset.preferredJobSubmissionProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
         }
         break;
       case 4:
-        if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->preferredDataMovementProtocol);
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast1;
+          xfer += iprot->readI32(ecast1);
+          this->preferredDataMovementProtocol = ( ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type)ecast1;
           this->__isset.preferredDataMovementProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -137,13 +141,13 @@ uint32_t ComputeResourcePreference::write(::apache::thrift::protocol::TProtocol*
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.preferredJobSubmissionProtocol) {
-    xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_STRING, 3);
-    xfer += oprot->writeString(this->preferredJobSubmissionProtocol);
+    xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_I32, 3);
+    xfer += oprot->writeI32((int32_t)this->preferredJobSubmissionProtocol);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.preferredDataMovementProtocol) {
-    xfer += oprot->writeFieldBegin("preferredDataMovementProtocol", ::apache::thrift::protocol::T_STRING, 4);
-    xfer += oprot->writeString(this->preferredDataMovementProtocol);
+    xfer += oprot->writeFieldBegin("preferredDataMovementProtocol", ::apache::thrift::protocol::T_I32, 4);
+    xfer += oprot->writeI32((int32_t)this->preferredDataMovementProtocol);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.preferredBatchQueue) {
@@ -178,8 +182,8 @@ void swap(ComputeResourcePreference &a, ComputeResourcePreference &b) {
   swap(a.__isset, b.__isset);
 }
 
-const char* GatewayResourceProfile::ascii_fingerprint = "D6477904C48AAB4DC8F09369D670B400";
-const uint8_t GatewayResourceProfile::binary_fingerprint[16] = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
+const char* GatewayResourceProfile::ascii_fingerprint = "42DA2625493A482A59D0742432A025BD";
+const uint8_t GatewayResourceProfile::binary_fingerprint[16] = {0x42,0xDA,0x26,0x25,0x49,0x3A,0x48,0x2A,0x59,0xD0,0x74,0x24,0x32,0xA0,0x25,0xBD};
 
 uint32_t GatewayResourceProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -231,14 +235,14 @@ uint32_t GatewayResourceProfile::read(::apache::thrift::protocol::TProtocol* ipr
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->computeResourcePreferences.clear();
-            uint32_t _size0;
-            ::apache::thrift::protocol::TType _etype3;
-            xfer += iprot->readListBegin(_etype3, _size0);
-            this->computeResourcePreferences.resize(_size0);
-            uint32_t _i4;
-            for (_i4 = 0; _i4 < _size0; ++_i4)
+            uint32_t _size2;
+            ::apache::thrift::protocol::TType _etype5;
+            xfer += iprot->readListBegin(_etype5, _size2);
+            this->computeResourcePreferences.resize(_size2);
+            uint32_t _i6;
+            for (_i6 = 0; _i6 < _size2; ++_i6)
             {
-              xfer += this->computeResourcePreferences[_i4].read(iprot);
+              xfer += this->computeResourcePreferences[_i6].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -284,10 +288,10 @@ uint32_t GatewayResourceProfile::write(::apache::thrift::protocol::TProtocol* op
     xfer += oprot->writeFieldBegin("computeResourcePreferences", ::apache::thrift::protocol::T_LIST, 4);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->computeResourcePreferences.size()));
-      std::vector<ComputeResourcePreference> ::const_iterator _iter5;
-      for (_iter5 = this->computeResourcePreferences.begin(); _iter5 != this->computeResourcePreferences.end(); ++_iter5)
+      std::vector<ComputeResourcePreference> ::const_iterator _iter7;
+      for (_iter7 = this->computeResourcePreferences.begin(); _iter7 != this->computeResourcePreferences.end(); ++_iter7)
       {
-        xfer += (*_iter5).write(oprot);
+        xfer += (*_iter7).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
index 8a0a002..db18209 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
@@ -30,6 +30,7 @@
 #include <thrift/transport/TTransport.h>
 
 #include <thrift/cxxfunctional.h>
+#include "computeResourceModel_types.h"
 
 
 namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile {
@@ -46,18 +47,18 @@ typedef struct _ComputeResourcePreference__isset {
 class ComputeResourcePreference {
  public:
 
-  static const char* ascii_fingerprint; // = "9C98338B7E052CD4DEECB22F243D6DAE";
-  static const uint8_t binary_fingerprint[16]; // = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+  static const char* ascii_fingerprint; // = "365108C84A2E160D53CD17C2A7F06F5C";
+  static const uint8_t binary_fingerprint[16]; // = {0x36,0x51,0x08,0xC8,0x4A,0x2E,0x16,0x0D,0x53,0xCD,0x17,0xC2,0xA7,0xF0,0x6F,0x5C};
 
-  ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), preferredJobSubmissionProtocol(), preferredDataMovementProtocol(), preferredBatchQueue(), scratchLocation(), allocationProjectNumber() {
+  ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), preferredJobSubmissionProtocol(( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)0), preferredDataMovementProtocol(( ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type)0), preferredBatchQueue(), scratchLocation(), allocationProjectNumber() {
   }
 
   virtual ~ComputeResourcePreference() throw() {}
 
   std::string computeResourceId;
   bool overridebyAiravata;
-  std::string preferredJobSubmissionProtocol;
-  std::string preferredDataMovementProtocol;
+   ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type preferredJobSubmissionProtocol;
+   ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type preferredDataMovementProtocol;
   std::string preferredBatchQueue;
   std::string scratchLocation;
   std::string allocationProjectNumber;
@@ -72,12 +73,12 @@ class ComputeResourcePreference {
     overridebyAiravata = val;
   }
 
-  void __set_preferredJobSubmissionProtocol(const std::string& val) {
+  void __set_preferredJobSubmissionProtocol(const  ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type val) {
     preferredJobSubmissionProtocol = val;
     __isset.preferredJobSubmissionProtocol = true;
   }
 
-  void __set_preferredDataMovementProtocol(const std::string& val) {
+  void __set_preferredDataMovementProtocol(const  ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type val) {
     preferredDataMovementProtocol = val;
     __isset.preferredDataMovementProtocol = true;
   }
@@ -147,8 +148,8 @@ typedef struct _GatewayResourceProfile__isset {
 class GatewayResourceProfile {
  public:
 
-  static const char* ascii_fingerprint; // = "D6477904C48AAB4DC8F09369D670B400";
-  static const uint8_t binary_fingerprint[16]; // = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
+  static const char* ascii_fingerprint; // = "42DA2625493A482A59D0742432A025BD";
+  static const uint8_t binary_fingerprint[16]; // = {0x42,0xDA,0x26,0x25,0x49,0x3A,0x48,0x2A,0x59,0xD0,0x74,0x24,0x32,0xA0,0x25,0xBD};
 
   GatewayResourceProfile() : gatewayID("DO_NOT_SET_AT_CLIENTS"), gatewayName(), gatewayDescription() {
   }

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 68addd1..3d7b921 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -49,6 +49,15 @@ final class JobManagerCommand {
   );
 }
 
+final class MonitorMode {
+  const PUSH = 0;
+  const PULL = 1;
+  static public $__names = array(
+    0 => 'PUSH',
+    1 => 'PULL',
+  );
+}
+
 final class FileSystems {
   const HOME = 0;
   const WORK = 1;
@@ -128,6 +137,7 @@ class ResourceJobManager {
   public $pushMonitoringEndpoint = null;
   public $jobManagerBinPath = null;
   public $jobManagerCommands = null;
+  public $monitorMode = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -160,6 +170,10 @@ class ResourceJobManager {
             'type' => TType::STRING,
             ),
           ),
+        6 => array(
+          'var' => 'monitorMode',
+          'type' => TType::I32,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -178,6 +192,9 @@ class ResourceJobManager {
       if (isset($vals['jobManagerCommands'])) {
         $this->jobManagerCommands = $vals['jobManagerCommands'];
       }
+      if (isset($vals['monitorMode'])) {
+        $this->monitorMode = $vals['monitorMode'];
+      }
     }
   }
 
@@ -248,6 +265,13 @@ class ResourceJobManager {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 6:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->monitorMode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -299,6 +323,11 @@ class ResourceJobManager {
       }
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->monitorMode !== null) {
+      $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
+      $xfer += $output->writeI32($this->monitorMode);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
index faf2b05..3e8db10 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
@@ -41,11 +41,11 @@ class ComputeResourcePreference {
           ),
         3 => array(
           'var' => 'preferredJobSubmissionProtocol',
-          'type' => TType::STRING,
+          'type' => TType::I32,
           ),
         4 => array(
           'var' => 'preferredDataMovementProtocol',
-          'type' => TType::STRING,
+          'type' => TType::I32,
           ),
         5 => array(
           'var' => 'preferredBatchQueue',
@@ -120,15 +120,15 @@ class ComputeResourcePreference {
           }
           break;
         case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->preferredJobSubmissionProtocol);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->preferredJobSubmissionProtocol);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->preferredDataMovementProtocol);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->preferredDataMovementProtocol);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -178,13 +178,13 @@ class ComputeResourcePreference {
       $xfer += $output->writeFieldEnd();
     }
     if ($this->preferredJobSubmissionProtocol !== null) {
-      $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::STRING, 3);
-      $xfer += $output->writeString($this->preferredJobSubmissionProtocol);
+      $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::I32, 3);
+      $xfer += $output->writeI32($this->preferredJobSubmissionProtocol);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->preferredDataMovementProtocol !== null) {
-      $xfer += $output->writeFieldBegin('preferredDataMovementProtocol', TType::STRING, 4);
-      $xfer += $output->writeString($this->preferredDataMovementProtocol);
+      $xfer += $output->writeFieldBegin('preferredDataMovementProtocol', TType::I32, 4);
+      $xfer += $output->writeI32($this->preferredDataMovementProtocol);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->preferredBatchQueue !== null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
new file mode 100644
index 0000000..30528b7
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Monitoring modes
+ * 
+ * PUSH:
+ * Server will push job status changes.
+ * 
+ * PULL:
+ * Need to pull and get the Job status changes.
+ * 
+ * 
+ */
+@SuppressWarnings("all") public enum MonitorMode implements org.apache.thrift.TEnum {
+  PUSH(0),
+  PULL(1);
+
+  private final int value;
+
+  private MonitorMode(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static MonitorMode findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return PUSH;
+      case 1:
+        return PULL;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
index 680a40a..d0487b1 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
@@ -74,6 +74,7 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField PUSH_MONITORING_ENDPOINT_FIELD_DESC = new org.apache.thrift.protocol.TField("pushMonitoringEndpoint", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_BIN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerBinPath", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerCommands", org.apache.thrift.protocol.TType.MAP, (short)5);
+  private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -86,6 +87,7 @@ import org.slf4j.LoggerFactory;
   private String pushMonitoringEndpoint; // optional
   private String jobManagerBinPath; // optional
   private Map<JobManagerCommand,String> jobManagerCommands; // optional
+  private MonitorMode monitorMode; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -97,7 +99,12 @@ import org.slf4j.LoggerFactory;
     RESOURCE_JOB_MANAGER_TYPE((short)2, "resourceJobManagerType"),
     PUSH_MONITORING_ENDPOINT((short)3, "pushMonitoringEndpoint"),
     JOB_MANAGER_BIN_PATH((short)4, "jobManagerBinPath"),
-    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands");
+    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands"),
+    /**
+     * 
+     * @see MonitorMode
+     */
+    MONITOR_MODE((short)6, "monitorMode");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -122,6 +129,8 @@ import org.slf4j.LoggerFactory;
           return JOB_MANAGER_BIN_PATH;
         case 5: // JOB_MANAGER_COMMANDS
           return JOB_MANAGER_COMMANDS;
+        case 6: // MONITOR_MODE
+          return MONITOR_MODE;
         default:
           return null;
       }
@@ -162,7 +171,7 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS};
+  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS,_Fields.MONITOR_MODE};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -178,6 +187,8 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
             new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobManagerCommand.class), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResourceJobManager.class, metaDataMap);
   }
@@ -227,6 +238,9 @@ import org.slf4j.LoggerFactory;
       }
       this.jobManagerCommands = __this__jobManagerCommands;
     }
+    if (other.isSetMonitorMode()) {
+      this.monitorMode = other.monitorMode;
+    }
   }
 
   public ResourceJobManager deepCopy() {
@@ -241,6 +255,7 @@ import org.slf4j.LoggerFactory;
     this.pushMonitoringEndpoint = null;
     this.jobManagerBinPath = null;
     this.jobManagerCommands = null;
+    this.monitorMode = null;
   }
 
   public String getResourceJobManagerId() {
@@ -377,6 +392,37 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public MonitorMode getMonitorMode() {
+    return this.monitorMode;
+  }
+
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public void setMonitorMode(MonitorMode monitorMode) {
+    this.monitorMode = monitorMode;
+  }
+
+  public void unsetMonitorMode() {
+    this.monitorMode = null;
+  }
+
+  /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
+  public boolean isSetMonitorMode() {
+    return this.monitorMode != null;
+  }
+
+  public void setMonitorModeIsSet(boolean value) {
+    if (!value) {
+      this.monitorMode = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case RESOURCE_JOB_MANAGER_ID:
@@ -419,6 +465,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case MONITOR_MODE:
+      if (value == null) {
+        unsetMonitorMode();
+      } else {
+        setMonitorMode((MonitorMode)value);
+      }
+      break;
+
     }
   }
 
@@ -439,6 +493,9 @@ import org.slf4j.LoggerFactory;
     case JOB_MANAGER_COMMANDS:
       return getJobManagerCommands();
 
+    case MONITOR_MODE:
+      return getMonitorMode();
+
     }
     throw new IllegalStateException();
   }
@@ -460,6 +517,8 @@ import org.slf4j.LoggerFactory;
       return isSetJobManagerBinPath();
     case JOB_MANAGER_COMMANDS:
       return isSetJobManagerCommands();
+    case MONITOR_MODE:
+      return isSetMonitorMode();
     }
     throw new IllegalStateException();
   }
@@ -522,6 +581,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_monitorMode = true && this.isSetMonitorMode();
+    boolean that_present_monitorMode = true && that.isSetMonitorMode();
+    if (this_present_monitorMode || that_present_monitorMode) {
+      if (!(this_present_monitorMode && that_present_monitorMode))
+        return false;
+      if (!this.monitorMode.equals(that.monitorMode))
+        return false;
+    }
+
     return true;
   }
 
@@ -588,6 +656,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMonitorMode()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -653,6 +731,16 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
+    if (isSetMonitorMode()) {
+      if (!first) sb.append(", ");
+      sb.append("monitorMode:");
+      if (this.monitorMode == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.monitorMode);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -756,6 +844,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 6: // MONITOR_MODE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+              struct.setMonitorModeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -808,6 +904,13 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldEnd();
         }
       }
+      if (struct.monitorMode != null) {
+        if (struct.isSetMonitorMode()) {
+          oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
+          oprot.writeI32(struct.monitorMode.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -837,7 +940,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetJobManagerCommands()) {
         optionals.set(2);
       }
-      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetMonitorMode()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
       if (struct.isSetPushMonitoringEndpoint()) {
         oprot.writeString(struct.pushMonitoringEndpoint);
       }
@@ -854,6 +960,9 @@ import org.slf4j.LoggerFactory;
           }
         }
       }
+      if (struct.isSetMonitorMode()) {
+        oprot.writeI32(struct.monitorMode.getValue());
+      }
     }
 
     @Override
@@ -863,7 +972,7 @@ import org.slf4j.LoggerFactory;
       struct.setResourceJobManagerIdIsSet(true);
       struct.resourceJobManagerType = ResourceJobManagerType.findByValue(iprot.readI32());
       struct.setResourceJobManagerTypeIsSet(true);
-      BitSet incoming = iprot.readBitSet(3);
+      BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
         struct.pushMonitoringEndpoint = iprot.readString();
         struct.setPushMonitoringEndpointIsSet(true);
@@ -887,6 +996,10 @@ import org.slf4j.LoggerFactory;
         }
         struct.setJobManagerCommandsIsSet(true);
       }
+      if (incoming.get(3)) {
+        struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+        struct.setMonitorModeIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index d1e7649..26bd817 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -81,8 +81,8 @@ import org.slf4j.LoggerFactory;
 
   private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField OVERRIDEBY_AIRAVATA_FIELD_DESC = new org.apache.thrift.protocol.TField("overridebyAiravata", org.apache.thrift.protocol.TType.BOOL, (short)2);
-  private static final org.apache.thrift.protocol.TField PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredJobSubmissionProtocol", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField PREFERRED_DATA_MOVEMENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredDataMovementProtocol", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredJobSubmissionProtocol", org.apache.thrift.protocol.TType.I32, (short)3);
+  private static final org.apache.thrift.protocol.TField PREFERRED_DATA_MOVEMENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredDataMovementProtocol", org.apache.thrift.protocol.TType.I32, (short)4);
   private static final org.apache.thrift.protocol.TField PREFERRED_BATCH_QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredBatchQueue", org.apache.thrift.protocol.TType.STRING, (short)5);
   private static final org.apache.thrift.protocol.TField SCRATCH_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("scratchLocation", org.apache.thrift.protocol.TType.STRING, (short)6);
   private static final org.apache.thrift.protocol.TField ALLOCATION_PROJECT_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("allocationProjectNumber", org.apache.thrift.protocol.TType.STRING, (short)7);
@@ -95,8 +95,8 @@ import org.slf4j.LoggerFactory;
 
   private String computeResourceId; // required
   private boolean overridebyAiravata; // required
-  private String preferredJobSubmissionProtocol; // optional
-  private String preferredDataMovementProtocol; // optional
+  private org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol preferredJobSubmissionProtocol; // optional
+  private org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol preferredDataMovementProtocol; // optional
   private String preferredBatchQueue; // optional
   private String scratchLocation; // optional
   private String allocationProjectNumber; // optional
@@ -105,7 +105,15 @@ import org.slf4j.LoggerFactory;
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     COMPUTE_RESOURCE_ID((short)1, "computeResourceId"),
     OVERRIDEBY_AIRAVATA((short)2, "overridebyAiravata"),
+    /**
+     * 
+     * @see org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol
+     */
     PREFERRED_JOB_SUBMISSION_PROTOCOL((short)3, "preferredJobSubmissionProtocol"),
+    /**
+     * 
+     * @see org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol
+     */
     PREFERRED_DATA_MOVEMENT_PROTOCOL((short)4, "preferredDataMovementProtocol"),
     PREFERRED_BATCH_QUEUE((short)5, "preferredBatchQueue"),
     SCRATCH_LOCATION((short)6, "scratchLocation"),
@@ -189,9 +197,9 @@ import org.slf4j.LoggerFactory;
     tmpMap.put(_Fields.OVERRIDEBY_AIRAVATA, new org.apache.thrift.meta_data.FieldMetaData("overridebyAiravata", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferredJobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol.class)));
     tmpMap.put(_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferredDataMovementProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol.class)));
     tmpMap.put(_Fields.PREFERRED_BATCH_QUEUE, new org.apache.thrift.meta_data.FieldMetaData("preferredBatchQueue", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SCRATCH_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("scratchLocation", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -304,11 +312,19 @@ import org.slf4j.LoggerFactory;
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEBYAIRAVATA_ISSET_ID, value);
   }
 
-  public String getPreferredJobSubmissionProtocol() {
+  /**
+   * 
+   * @see org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol
+   */
+  public org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol getPreferredJobSubmissionProtocol() {
     return this.preferredJobSubmissionProtocol;
   }
 
-  public void setPreferredJobSubmissionProtocol(String preferredJobSubmissionProtocol) {
+  /**
+   * 
+   * @see org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol
+   */
+  public void setPreferredJobSubmissionProtocol(org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol preferredJobSubmissionProtocol) {
     this.preferredJobSubmissionProtocol = preferredJobSubmissionProtocol;
   }
 
@@ -327,11 +343,19 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  public String getPreferredDataMovementProtocol() {
+  /**
+   * 
+   * @see org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol
+   */
+  public org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol getPreferredDataMovementProtocol() {
     return this.preferredDataMovementProtocol;
   }
 
-  public void setPreferredDataMovementProtocol(String preferredDataMovementProtocol) {
+  /**
+   * 
+   * @see org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol
+   */
+  public void setPreferredDataMovementProtocol(org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol preferredDataMovementProtocol) {
     this.preferredDataMovementProtocol = preferredDataMovementProtocol;
   }
 
@@ -441,7 +465,7 @@ import org.slf4j.LoggerFactory;
       if (value == null) {
         unsetPreferredJobSubmissionProtocol();
       } else {
-        setPreferredJobSubmissionProtocol((String)value);
+        setPreferredJobSubmissionProtocol((org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol)value);
       }
       break;
 
@@ -449,7 +473,7 @@ import org.slf4j.LoggerFactory;
       if (value == null) {
         unsetPreferredDataMovementProtocol();
       } else {
-        setPreferredDataMovementProtocol((String)value);
+        setPreferredDataMovementProtocol((org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol)value);
       }
       break;
 
@@ -845,16 +869,16 @@ import org.slf4j.LoggerFactory;
             }
             break;
           case 3: // PREFERRED_JOB_SUBMISSION_PROTOCOL
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.preferredJobSubmissionProtocol = iprot.readString();
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.preferredJobSubmissionProtocol = org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol.findByValue(iprot.readI32());
               struct.setPreferredJobSubmissionProtocolIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
           case 4: // PREFERRED_DATA_MOVEMENT_PROTOCOL
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.preferredDataMovementProtocol = iprot.readString();
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.preferredDataMovementProtocol = org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol.findByValue(iprot.readI32());
               struct.setPreferredDataMovementProtocolIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -908,14 +932,14 @@ import org.slf4j.LoggerFactory;
       if (struct.preferredJobSubmissionProtocol != null) {
         if (struct.isSetPreferredJobSubmissionProtocol()) {
           oprot.writeFieldBegin(PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
-          oprot.writeString(struct.preferredJobSubmissionProtocol);
+          oprot.writeI32(struct.preferredJobSubmissionProtocol.getValue());
           oprot.writeFieldEnd();
         }
       }
       if (struct.preferredDataMovementProtocol != null) {
         if (struct.isSetPreferredDataMovementProtocol()) {
           oprot.writeFieldBegin(PREFERRED_DATA_MOVEMENT_PROTOCOL_FIELD_DESC);
-          oprot.writeString(struct.preferredDataMovementProtocol);
+          oprot.writeI32(struct.preferredDataMovementProtocol.getValue());
           oprot.writeFieldEnd();
         }
       }
@@ -977,10 +1001,10 @@ import org.slf4j.LoggerFactory;
       }
       oprot.writeBitSet(optionals, 5);
       if (struct.isSetPreferredJobSubmissionProtocol()) {
-        oprot.writeString(struct.preferredJobSubmissionProtocol);
+        oprot.writeI32(struct.preferredJobSubmissionProtocol.getValue());
       }
       if (struct.isSetPreferredDataMovementProtocol()) {
-        oprot.writeString(struct.preferredDataMovementProtocol);
+        oprot.writeI32(struct.preferredDataMovementProtocol.getValue());
       }
       if (struct.isSetPreferredBatchQueue()) {
         oprot.writeString(struct.preferredBatchQueue);
@@ -1002,11 +1026,11 @@ import org.slf4j.LoggerFactory;
       struct.setOverridebyAiravataIsSet(true);
       BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
-        struct.preferredJobSubmissionProtocol = iprot.readString();
+        struct.preferredJobSubmissionProtocol = org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol.findByValue(iprot.readI32());
         struct.setPreferredJobSubmissionProtocolIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.preferredDataMovementProtocol = iprot.readString();
+        struct.preferredDataMovementProtocol = org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol.findByValue(iprot.readI32());
         struct.setPreferredDataMovementProtocolIsSet(true);
       }
       if (incoming.get(2)) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 62ebfe5..80a70df 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -83,6 +83,21 @@ enum JobManagerCommand {
 }
 
 /**
+* Monitoring modes
+*
+* PUSH:
+* Server will push job status changes.
+*
+* PULL:
+* Need to pull and get the Job status changes.
+*
+**/
+enum MonitorMode {
+   PUSH,
+   PULL
+}
+
+/**
  * Resource Job Manager Information
  *
  * resourceJobManagerType:
@@ -104,7 +119,8 @@ struct ResourceJobManager {
     2: required ResourceJobManagerType resourceJobManagerType,
     3: optional string pushMonitoringEndpoint,
     4: optional string jobManagerBinPath,
-    5: optional map<JobManagerCommand, string> jobManagerCommands
+    5: optional map<JobManagerCommand, string> jobManagerCommands,
+    6: optional MonitorMode monitorMode
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/96a673f0/airavata-api/thrift-interface-descriptions/gatewayResourceProfileModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/gatewayResourceProfileModel.thrift b/airavata-api/thrift-interface-descriptions/gatewayResourceProfileModel.thrift
index fb856b3..3839890 100644
--- a/airavata-api/thrift-interface-descriptions/gatewayResourceProfileModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/gatewayResourceProfileModel.thrift
@@ -21,6 +21,7 @@
 namespace java org.apache.airavata.model.appcatalog.gatewayprofile
 namespace php Airavata.Model.AppCatalog.GatewayProfile
 namespace cpp apache.airavata.model.appcatalog.gatewayprofile
+include "computeResourceModel.thrift"
 
 const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
 
@@ -54,8 +55,8 @@ const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
 struct ComputeResourcePreference {
     1: required string computeResourceId,
     2: required bool overridebyAiravata = 1,
-    3: optional string preferredJobSubmissionProtocol,
-    4: optional string preferredDataMovementProtocol,
+    3: optional computeResourceModel.JobSubmissionProtocol preferredJobSubmissionProtocol,
+    4: optional computeResourceModel.DataMovementProtocol preferredDataMovementProtocol,
     5: optional string preferredBatchQueue,
     6: optional string scratchLocation,
     7: optional string allocationProjectNumber


[40/44] git commit: adding EC2 provider changes

Posted by ch...@apache.org.
adding EC2 provider changes


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d856d246
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d856d246
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d856d246

Branch: refs/heads/gfac_appcatalog_int
Commit: d856d246e2651c5034bc6c125a14551a01bdf40c
Parents: 3e584f8
Author: chathuriw <ka...@gmail.com>
Authored: Wed Nov 5 10:14:50 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Nov 5 13:10:24 2014 -0500

----------------------------------------------------------------------
 .../airavata/gfac/core/utils/GFacUtils.java     |  15 +-
 .../apache/airavata/gfac/ec2/EC2Provider.java   |  46 ++-
 .../airavata/gfac/ec2/EC2ProviderTest.java      | 366 ++++++++++---------
 3 files changed, 232 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d856d246/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index b38808b..6fb2115 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -39,10 +39,7 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
-import org.apache.airavata.model.appcatalog.computeresource.GlobusJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -1289,5 +1286,15 @@ public class GFacUtils {
         }
     }
 
+    public static CloudJobSubmission getCloudJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getCloudJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving SSH job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d856d246/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
index 5c5af53..53e0f93 100644
--- a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
+++ b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
@@ -28,6 +28,7 @@ import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
 
+import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.GFacException;
@@ -39,6 +40,10 @@ import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.ec2.util.AmazonEC2Util;
 import org.apache.airavata.gfac.ec2.util.EC2ProviderUtil;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.ProviderName;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.Ec2ApplicationDeploymentType;
@@ -221,9 +226,8 @@ public class EC2Provider extends AbstractProvider {
                 /* Assuming that there is just a single result. If you want to add more results, update the necessary
                    logic below */
                 String paramName = outparamType.getName();
-                outParam.getType().changeType(StringParameterType.type);
-                ((StringParameterType) outParam.getType()).setValue(executionResult);
-                jobExecutionContext.getOutMessageContext().addParameter(paramName, outParam);
+                String value = outparamType.getValue();
+                jobExecutionContext.getOutMessageContext().addParameter(paramName, value);
             }
             GFacUtils.saveJobStatus(jobExecutionContext, details, JobState.COMPLETE);
         } catch (InvalidSshKeyException e) {
@@ -252,26 +256,28 @@ public class EC2Provider extends AbstractProvider {
      * @throws GFacProviderException GFacProviderException
      */
     private String createShellCmd(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        String command = "";
-        ApplicationDescription appDesc = jobExecutionContext.getApplicationContext().
-                getApplicationDeploymentDescription();
-
-        if(appDesc.getType() instanceof Ec2ApplicationDeploymentType) {
-            Ec2ApplicationDeploymentType type = (Ec2ApplicationDeploymentType) appDesc.getType();
-            if(type.getExecutable() != null) {
-                command = type.getExecutableType() + " " + type.getExecutable();
+        try {
+            String command = "";
+            JobSubmissionInterface submissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            CloudJobSubmission cloudJobSubmission = GFacUtils.getCloudJobSubmission(submissionInterface.getJobSubmissionInterfaceId());
+            String executablePath = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getExecutablePath();
+            if (cloudJobSubmission.getProviderName().equals(ProviderName.EC2)) {
+                if (cloudJobSubmission.getExecutableType() != null) {
+                    command = cloudJobSubmission.getExecutableType() + " " + executablePath;
+                } else {
+                    command = "sh" + " " + executablePath;
+                }
+                command = setCmdParams(jobExecutionContext, command);
+
             } else {
-                command = "sh" + " " + type.getExecutable();
+                command = "sh" + " " + executablePath;
+                command = setCmdParams(jobExecutionContext, command);
             }
-            command = setCmdParams(jobExecutionContext, command);
-
-        } else {
-            ApplicationDeploymentDescriptionType type = appDesc.getType();
-            command = "sh" + " " + type.getExecutableLocation();
-            command = setCmdParams(jobExecutionContext, command);
+            return command + '\n';
+        } catch (AppCatalogException e) {
+            log.error("Error while retrieving cloud job submission", e);
+            throw new GFacProviderException("Error while retrieving cloud job submission", e);
         }
-
-        return command + '\n';
     }
 
     private String setCmdParams(JobExecutionContext jobExecutionContext, String command) throws GFacProviderException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d856d246/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
index d558ab9..9f86197 100644
--- a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
+++ b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
@@ -1,171 +1,195 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.gfac.ec2;
-
-import org.apache.airavata.commons.gfac.type.*;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.schemas.gfac.*;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Your Amazon instance should be in a running state before running this test.
- */
-public class EC2ProviderTest {
-    private JobExecutionContext jobExecutionContext;
-
-    private static final String hostName = "ec2-host";
-
-    private static final String hostAddress = "ec2-address";
-
-    private static final String sequence1 = "RR042383.21413#CTGGCACGGAGTTAGCCGATCCTTATTCATAAAGTACATGCAAACGGGTATCCATA" +
-            "CTCGACTTTATTCCTTTATAAAAGAAGTTTACAACCCATAGGGCAGTCATCCTTCACGCTACTTGGCTGGTTCAGGCCTGCGCCCATTGACCAATATTCCTCA" +
-            "CTGCTGCCTCCCGTAGGAGTTTGGACCGTGTCTCAGTTCCAATGTGGGGGACCTTCCTCTCAGAACCCCTATCCATCGAAGACTAGGTGGGCCGTTACCCCGC" +
-            "CTACTATCTAATGGAACGCATCCCCATCGTCTACCGGAATACCTTTAATCATGTGAACATGCGGACTCATGATGCCATCTTGTATTAATCTTCCTTTCAGAAG" +
-            "GCTGTCCAAGAGTAGACGGCAGGTTGGATACGTGTTACTCACCGTGCCGCCGGTCGCCATCAGTCTTAGCAAGCTAAGACCATGCTGCCCCTGACTTGCATGT" +
-            "GTTAAGCCTGTAGCTTAGCGTTC";
-
-    private static final String sequence2 = "RR042383.31934#CTGGCACGGAGTTAGCCGATCCTTATTCATAAAGTACATGCAAACGGGTATCCATA" +
-            "CCCGACTTTATTCCTTTATAAAAGAAGTTTACAACCCATAGGGCAGTCATCCTTCACGCTACTTGGCTGGTTCAGGCTCTCGCCCATTGACCAATATTCCTCA" +
-            "CTGCTGCCTCCCGTAGGAGTTTGGACCGTGTCTCAGTTCCAATGTGGGGGACCTTCCTCTCAGAACCCCTATCCATCGAAGACTAGGTGGGCCGTTACCCCGC" +
-            "CTACTATCTAATGGAACGCATCCCCATCGTCTACCGGAATACCTTTAATCATGTGAACATGCGGACTCATGATGCCATCTTGTATTAAATCTTCCTTTCAGAA" +
-            "GGCTATCCAAGAGTAGACGGCAGGTTGGATACGTGTTACTCACCGTGCG";
-
-    /* Following variables are needed to be set in-order to run the test. Since these are account specific information,
-       I'm not adding the values here. It's the responsibility of the person who's running the test to update
-       these variables accordingly.
-       */
-
-    /* Username used to log into your ec2 instance eg.ec2-user */
-    private String userName = "";
-
-    /* Secret key used to connect to the image */
-    private String secretKey = "";
-
-    /* Access key used to connect to the image */
-    private String accessKey = "";
-
-    /* Instance id of the running instance of your image */
-    private String instanceId = "";
-
-    @Before
-    public void setUp() throws Exception {
-        URL resource = EC2ProviderTest.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        assert resource != null;
-        System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
-
-        /* EC2 Host */
-        HostDescription host = new HostDescription(Ec2HostType.type);
-        host.getType().setHostName(hostName);
-        host.getType().setHostAddress(hostAddress);
-
-        /* App */
-        ApplicationDescription ec2Desc = new ApplicationDescription(Ec2ApplicationDeploymentType.type);
-        Ec2ApplicationDeploymentType ec2App = (Ec2ApplicationDeploymentType)ec2Desc.getType();
-
-        String serviceName = "Gnome_distance_calculation_workflow";
-        ec2Desc.getType().addNewApplicationName().setStringValue(serviceName);
-        ec2App.setJobType(JobTypeType.EC_2);
-        ec2App.setExecutable("/home/ec2-user/run.sh");
-        ec2App.setExecutableType("sh");
-
-        /* Service */
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("GenomeEC2");
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-
-        InputParameterType input1 = InputParameterType.Factory.newInstance();
-        input1.setParameterName("genome_input1");
-        input1.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input1);
-
-        InputParameterType input2 = InputParameterType.Factory.newInstance();
-        input2.setParameterName("genome_input2");
-        input2.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input2);
-
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("genome_output");
-        output.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-
-        OutputParameterType[] outputParamList = outputList
-                .toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
-        ApplicationContext applicationContext = new ApplicationContext();
-        jobExecutionContext.setApplicationContext(applicationContext);
-        applicationContext.setServiceDescription(serv);
-        applicationContext.setApplicationDeploymentDescription(ec2Desc);
-        applicationContext.setHostDescription(host);
-
-        AmazonSecurityContext amazonSecurityContext =
-                new AmazonSecurityContext(userName, accessKey, secretKey, instanceId);
-        jobExecutionContext.addSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT, amazonSecurityContext);
-
-        MessageContext inMessage = new MessageContext();
-        ActualParameter genomeInput1 = new ActualParameter();
-        ((StringParameterType)genomeInput1.getType()).setValue(sequence1);
-        inMessage.addParameter("genome_input1", genomeInput1);
-
-        ActualParameter genomeInput2 = new ActualParameter();
-        ((StringParameterType)genomeInput2.getType()).setValue(sequence2);
-        inMessage.addParameter("genome_input2", genomeInput2);
-
-        MessageContext outMessage = new MessageContext();
-        ActualParameter echo_out = new ActualParameter();
-        outMessage.addParameter("distance", echo_out);
-
-        jobExecutionContext.setInMessageContext(inMessage);
-        jobExecutionContext.setOutMessageContext(outMessage);
-    }
-
-    @Test
-    public void testGramProvider() throws GFacException {
-        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
-        Assert.assertEquals(MappingFactory.
-                toString((ActualParameter) outMessageContext.getParameter("genome_output")), "476");
-    }
-}
-
-
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.gfac.ec2;
+//
+//import org.airavata.appcatalog.cpi.AppCatalog;
+//import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+//import org.apache.airavata.commons.gfac.type.*;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+//import org.apache.airavata.model.appcatalog.computeresource.*;
+//import org.apache.airavata.schemas.gfac.*;
+//import org.junit.Assert;
+//import org.junit.Before;
+//import org.junit.Test;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+///**
+// * Your Amazon instance should be in a running state before running this test.
+// */
+//public class EC2ProviderTest {
+//    private JobExecutionContext jobExecutionContext;
+//
+//    private static final String hostName = "ec2-host";
+//
+//    private static final String hostAddress = "ec2-address";
+//
+//    private static final String sequence1 = "RR042383.21413#CTGGCACGGAGTTAGCCGATCCTTATTCATAAAGTACATGCAAACGGGTATCCATA" +
+//            "CTCGACTTTATTCCTTTATAAAAGAAGTTTACAACCCATAGGGCAGTCATCCTTCACGCTACTTGGCTGGTTCAGGCCTGCGCCCATTGACCAATATTCCTCA" +
+//            "CTGCTGCCTCCCGTAGGAGTTTGGACCGTGTCTCAGTTCCAATGTGGGGGACCTTCCTCTCAGAACCCCTATCCATCGAAGACTAGGTGGGCCGTTACCCCGC" +
+//            "CTACTATCTAATGGAACGCATCCCCATCGTCTACCGGAATACCTTTAATCATGTGAACATGCGGACTCATGATGCCATCTTGTATTAATCTTCCTTTCAGAAG" +
+//            "GCTGTCCAAGAGTAGACGGCAGGTTGGATACGTGTTACTCACCGTGCCGCCGGTCGCCATCAGTCTTAGCAAGCTAAGACCATGCTGCCCCTGACTTGCATGT" +
+//            "GTTAAGCCTGTAGCTTAGCGTTC";
+//
+//    private static final String sequence2 = "RR042383.31934#CTGGCACGGAGTTAGCCGATCCTTATTCATAAAGTACATGCAAACGGGTATCCATA" +
+//            "CCCGACTTTATTCCTTTATAAAAGAAGTTTACAACCCATAGGGCAGTCATCCTTCACGCTACTTGGCTGGTTCAGGCTCTCGCCCATTGACCAATATTCCTCA" +
+//            "CTGCTGCCTCCCGTAGGAGTTTGGACCGTGTCTCAGTTCCAATGTGGGGGACCTTCCTCTCAGAACCCCTATCCATCGAAGACTAGGTGGGCCGTTACCCCGC" +
+//            "CTACTATCTAATGGAACGCATCCCCATCGTCTACCGGAATACCTTTAATCATGTGAACATGCGGACTCATGATGCCATCTTGTATTAAATCTTCCTTTCAGAA" +
+//            "GGCTATCCAAGAGTAGACGGCAGGTTGGATACGTGTTACTCACCGTGCG";
+//
+//    /* Following variables are needed to be set in-order to run the test. Since these are account specific information,
+//       I'm not adding the values here. It's the responsibility of the person who's running the test to update
+//       these variables accordingly.
+//       */
+//
+//    /* Username used to log into your ec2 instance eg.ec2-user */
+//    private String userName = "";
+//
+//    /* Secret key used to connect to the image */
+//    private String secretKey = "";
+//
+//    /* Access key used to connect to the image */
+//    private String accessKey = "";
+//
+//    /* Instance id of the running instance of your image */
+//    private String instanceId = "";
+//
+//    @Before
+//    public void setUp() throws Exception {
+//        URL resource = EC2ProviderTest.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        assert resource != null;
+//        System.out.println(resource.getFile());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+//
+//        /* EC2 Host */
+//        ComputeResourceDescription host = new ComputeResourceDescription();
+//        host.setHostName(hostName);
+//        host.setResourceDescription("EC2 compute resource");
+//        host.addToIpAddresses(hostAddress);
+//
+//        CloudJobSubmission cloudJobSubmission = new CloudJobSubmission();
+//        cloudJobSubmission.setProviderName(ProviderName.EC2);
+//        cloudJobSubmission.setExecutableType("sh");
+//        cloudJobSubmission.setNodeId(instanceId);
+//        cloudJobSubmission.setSecurityProtocol(SecurityProtocol.USERNAME_PASSWORD);
+//        cloudJobSubmission.setUserAccountName(userName);
+//
+//        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+//        String submissionId = appCatalog.getComputeResource().addCloudJobSubmission(cloudJobSubmission);
+//
+//        JobSubmissionInterface submissionInterface = new JobSubmissionInterface();
+//        submissionInterface.setJobSubmissionInterfaceId(submissionId);
+//        submissionInterface.setJobSubmissionProtocol(JobSubmissionProtocol.CLOUD);
+//        submissionInterface.setPriorityOrder(0);
+//
+//        host.addToJobSubmissionInterfaces(submissionInterface);
+//
+//        String computeResourceId = appCatalog.getComputeResource().addComputeResource(host);
+//
+//        /* App */
+//
+//        ApplicationDescription ec2Desc = new ApplicationDescription(Ec2ApplicationDeploymentType.type);
+//        Ec2ApplicationDeploymentType ec2App = (Ec2ApplicationDeploymentType)ec2Desc.getType();
+//
+//        String serviceName = "Gnome_distance_calculation_workflow";
+//        ec2Desc.getType().addNewApplicationName().setStringValue(serviceName);
+//        ec2App.setJobType(JobTypeType.EC_2);
+//        ec2App.setExecutable("/home/ec2-user/run.sh");
+//        ec2App.setExecutableType("sh");
+//
+//        /* Service */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("GenomeEC2");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//
+//        InputParameterType input1 = InputParameterType.Factory.newInstance();
+//        input1.setParameterName("genome_input1");
+//        input1.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input1);
+//
+//        InputParameterType input2 = InputParameterType.Factory.newInstance();
+//        input2.setParameterName("genome_input2");
+//        input2.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input2);
+//
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
+//
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("genome_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        applicationContext.setServiceDescription(serv);
+//        applicationContext.setApplicationDeploymentDescription(ec2Desc);
+//        applicationContext.setHostDescription(host);
+//
+//        AmazonSecurityContext amazonSecurityContext =
+//                new AmazonSecurityContext(userName, accessKey, secretKey, instanceId);
+//        jobExecutionContext.addSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT, amazonSecurityContext);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter genomeInput1 = new ActualParameter();
+//        ((StringParameterType)genomeInput1.getType()).setValue(sequence1);
+//        inMessage.addParameter("genome_input1", genomeInput1);
+//
+//        ActualParameter genomeInput2 = new ActualParameter();
+//        ((StringParameterType)genomeInput2.getType()).setValue(sequence2);
+//        inMessage.addParameter("genome_input2", genomeInput2);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+//        outMessage.addParameter("distance", echo_out);
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//    }
+//
+//    @Test
+//    public void testGramProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
+//        Assert.assertEquals(MappingFactory.
+//                toString((ActualParameter) outMessageContext.getParameter("genome_output")), "476");
+//    }
+//}
+//
+//