airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject git commit: added ConfigurationData support. AIRAVATA-1032
Date Wed, 26 Feb 2014 21:26:01 GMT
Repository: airavata
Updated Branches:
  refs/heads/master bc954ece5 -> 3a453bb14


added ConfigurationData support. AIRAVATA-1032


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

Branch: refs/heads/master
Commit: 3a453bb14856f7cfe909cda650a1fe66f15f99a5
Parents: bc954ec
Author: raminder <raminder@apache.org>
Authored: Wed Feb 26 16:25:44 2014 -0500
Committer: raminder <raminder@apache.org>
Committed: Wed Feb 26 16:25:44 2014 -0500

----------------------------------------------------------------------
 .../gfac/context/JobExecutionContext.java       | 35 +++++++++++++----
 .../java/org/apache/airavata/gfac/cpi/GFac.java |  2 -
 .../gfac/handler/GridFTPOutputHandler.java      | 10 ++---
 .../gfac/provider/impl/BESProvider.java         |  9 +++--
 .../provider/utils/ApplicationProcessor.java    |  5 ++-
 .../gfac/provider/utils/DataTransferrer.java    | 22 +++--------
 .../gfac/provider/utils/ResourceProcessor.java  | 21 +++++-----
 .../airavata/gfac/utils/GramRSLGenerator.java   | 41 +++++++++-----------
 .../gfac/services/impl/AbstractBESTest.java     | 10 ++---
 .../orchestrator/core/BaseOrchestratorTest.java |  2 -
 .../orchestrator/core/NewOrchestratorTest.java  |  4 +-
 .../core/OrchestratorTestWithGRAM.java          |  4 +-
 .../core/OrchestratorTestWithGSISSH.java        |  5 ++-
 .../xbaya/invoker/EmbeddedGFacInvoker.java      | 10 ++---
 14 files changed, 89 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
index 5d03005..b8e6f87 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
@@ -26,6 +26,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.notification.GFacNotifier;
 import org.apache.airavata.gfac.provider.GFacProvider;
+import org.apache.airavata.model.experiment.ConfigurationData;
 import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 
 import java.util.ArrayList;
@@ -44,8 +45,10 @@ public class JobExecutionContext extends AbstractContext{
     private MessageContext outMessageContext;
 
     private GFacNotifier notifier;
+    
+    private ConfigurationData configurationData;
 
-    private ContextHeaderDocument.ContextHeader contextHeader;
+//    private ContextHeaderDocument.ContextHeader contextHeader;
 
     // Keep track of the current path of the message. Before hitting provider its in-path.
     // After provider its out-path.
@@ -71,6 +74,8 @@ public class JobExecutionContext extends AbstractContext{
     private String serviceName;
 
     private String experimentID;
+    
+    private String status;
 
     /**
      *  Security context is used to handle authentication for input handlers and providers.
@@ -181,13 +186,21 @@ public class JobExecutionContext extends AbstractContext{
         this.inPath = false;
     }
 
-    public ContextHeaderDocument.ContextHeader getContextHeader() {
-        return contextHeader;
-    }
+//    public ContextHeaderDocument.ContextHeader getContextHeader() {
+//        return contextHeader;
+//    }
+//
+//    public void setContextHeader(ContextHeaderDocument.ContextHeader contextHeader) {
+//        this.contextHeader = contextHeader;
+//    }
 
-    public void setContextHeader(ContextHeaderDocument.ContextHeader contextHeader) {
-        this.contextHeader = contextHeader;
-    }
+	public ConfigurationData getConfigurationData() {
+		return configurationData;
+	}
+
+	public void setConfigurationData(ConfigurationData configurationData) {
+		this.configurationData = configurationData;
+	}
 
 	public SecurityContext getSecurityContext(String name) throws GFacException{
 		SecurityContext secContext = securityContext.get(name);
@@ -198,4 +211,12 @@ public class JobExecutionContext extends AbstractContext{
 		securityContext.put(name, value);
     }
 
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
index b18cdd9..2358735 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
@@ -22,8 +22,6 @@ package org.apache.airavata.gfac.cpi;
 
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
-import org.apache.airavata.model.experiment.ConfigurationData;
-import org.apache.airavata.registry.cpi.DataType;
 
 /**
  * This is the GFac CPI interface which needs to be implemented by an internal class, this
simply have a single method to submit a job to

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
index be4d250..55cf2f7 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
@@ -48,6 +48,7 @@ import org.apache.airavata.gfac.external.GridFtp;
 import org.apache.airavata.gfac.provider.GFacProviderException;
 import org.apache.airavata.gfac.utils.GFacUtils;
 import org.apache.airavata.gfac.utils.OutputUtils;
+import org.apache.airavata.model.experiment.ConfigurationData;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
@@ -178,15 +179,12 @@ public class GridFTPOutputHandler implements GFacHandler {
                                 "and ApplicationDescriptor output Parameter Names");
                     }
                     // If users has given an output Data path to download the output files
this will download the file on machine where GFac is installed
-                    ContextHeaderDocument.ContextHeader currentContextHeader = jobExecutionContext.getContextHeader();
-                    if(currentContextHeader != null && currentContextHeader.getWorkflowOutputDataHandling()
!= null){
-                    	ApplicationOutputDataHandling[] handlings = currentContextHeader.getWorkflowOutputDataHandling().getApplicationOutputDataHandlingArray();
-                        if(handlings != null && handlings.length != 0){
-                            String outputDataDirectory = handlings[0].getOutputDataDirectory();
+                    ConfigurationData configurationData =  jobExecutionContext.getConfigurationData();
+                    if(configurationData != null && configurationData.getAdvanceOutputDataHandling()
!= null){
+                    	String outputDataDirectory = configurationData.getAdvanceOutputDataHandling().getOutputdataDir();
                             if(outputDataDirectory != null && !"".equals(outputDataDirectory)){
                                 stageOutputFiles(jobExecutionContext,outputDataDirectory);
                             }
-                        }
                     }
                 } catch (ToolsException e) {
                     log.error(e.getMessage());

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
index 76ed230..a341f32 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
@@ -434,11 +434,12 @@ public class BESProvider implements GFacProvider {
     }
 
     private String getUserName(JobExecutionContext context) {
-        if (context.getContextHeader() != null) {
-            return context.getContextHeader().getUserIdentifier();
-        } else {
+    	//FIXME: get experiment user
+//        if (context.getContextHeader() != null) {
+//            return context.getContextHeader().getUserIdentifier();
+//        } else {
             return "";
-        }
+//        }
 
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
index d4b26a6..b9d7422 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ApplicationProcessor.java
@@ -112,9 +112,10 @@ public class ApplicationProcessor {
 	}
 	
 	public static String getUserNameFromContext(JobExecutionContext jobContext) {
-		if(jobContext.getContextHeader() == null)
+		if(jobContext.getConfigurationData() == null)
 			return null;
-		return jobContext.getContextHeader().getUserIdentifier();
+		//FIXME: Discuss to get user and change this
+		return "admin";
 	}
 	public static boolean isParallelJob(HpcApplicationDeploymentType appDepType) {
 		

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
index 52396f1..e008f37 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/DataTransferrer.java
@@ -34,13 +34,12 @@ import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
+import org.apache.airavata.model.experiment.ConfigurationData;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.StringArrayType;
 import org.apache.airavata.schemas.gfac.StringParameterType;
 import org.apache.airavata.schemas.gfac.URIParameterType;
-import org.apache.airavata.schemas.wec.ApplicationOutputDataHandlingDocument.ApplicationOutputDataHandling;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -232,20 +231,11 @@ public class DataTransferrer {
 	}
 	
 	private String getDownloadLocation() {
-		String outputDataDirectory = null;
-		ContextHeaderDocument.ContextHeader currentContextHeader = jobContext
-				.getContextHeader();
-		if (currentContextHeader != null
-				&& currentContextHeader.getWorkflowOutputDataHandling() != null) {
-			ApplicationOutputDataHandling[] handlings = currentContextHeader
-					.getWorkflowOutputDataHandling()
-					.getApplicationOutputDataHandlingArray();
-			if (handlings != null && handlings.length != 0) {
-				 outputDataDirectory = handlings[0]
-						.getOutputDataDirectory();
-				return outputDataDirectory;
-			}
+		ConfigurationData configurationData = jobContext.getConfigurationData();
+		if (configurationData != null && configurationData.getAdvanceOutputDataHandling()
!= null) {
+			String outputDataDirectory = configurationData.getAdvanceOutputDataHandling().getOutputdataDir();
+			return outputDataDirectory;
 		}
-		return outputDataDirectory;
+		return null;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
index 93c8c92..83f28f0 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/utils/ResourceProcessor.java
@@ -23,6 +23,8 @@ package org.apache.airavata.gfac.provider.utils;
 
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
+import org.apache.airavata.model.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.experiment.ConfigurationData;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.QueueType;
 import org.apache.airavata.schemas.wec.ContextHeaderDocument;
@@ -39,14 +41,11 @@ public class ResourceProcessor {
 				.getType();
 		
 		createMemory(value, appDepType);
-		ContextHeaderDocument.ContextHeader currentContextHeader = context.getContextHeader();
-	    if(currentContextHeader != null){
-        if (currentContextHeader.getWorkflowSchedulingContext() != null) {
-            if (currentContextHeader != null &&
-                    currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()
!= null &&
-                    currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray().length
> 0) {
+		ConfigurationData configurationData = context.getConfigurationData();
+	    if(configurationData != null && configurationData.isSetComputationalResourceScheduling()){
+	    	ComputationalResourceScheduling computionResource= configurationData.getComputationalResourceScheduling();
                 try {
-                    int cpuCount = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getCpuCount();
+                    int cpuCount = computionResource.getTotalCPUCount();
                     if(cpuCount>0){
 //                    	appDepType.setCpuCount(cpuCount);
                 		NumberOfProcessesType num = NumberOfProcessesType.Factory.newInstance();
@@ -58,7 +57,7 @@ public class ResourceProcessor {
                     new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    int nodeCount = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getNodeCount();
+                    int nodeCount = computionResource.getNodeCount();
                     if(nodeCount>0){
                     	appDepType.setNodeCount(nodeCount);
                     }
@@ -66,7 +65,7 @@ public class ResourceProcessor {
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    String queueName = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getQueueName();
+                    String queueName = computionResource.getQueueName();
                     if (queueName != null) {
                         if(appDepType.getQueue() == null){
                             QueueType queueType = appDepType.addNewQueue();
@@ -79,16 +78,14 @@ public class ResourceProcessor {
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    int maxwallTime = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getMaxWallTime();
+                    int maxwallTime = computionResource.getWallTimeLimit();
                     if(maxwallTime>0){
                     	appDepType.setMaxWallTime(maxwallTime);
                     }
                 } catch (NullPointerException e) {
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
-            }
         }
-	    }
 		
 		if (appDepType.getCpuCount() > 0) {
 			RangeValueType rangeType = new RangeValueType();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
index 3c05c89..16b1f3e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GramRSLGenerator.java
@@ -20,6 +20,10 @@
 */
 package org.apache.airavata.gfac.utils;
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.MappingFactory;
@@ -28,16 +32,18 @@ import org.apache.airavata.gfac.ToolsException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.gfac.provider.GFacProviderException;
-import org.apache.airavata.schemas.gfac.*;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
+import org.apache.airavata.model.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.experiment.ConfigurationData;
+import org.apache.airavata.schemas.gfac.FileArrayType;
+import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
+import org.apache.airavata.schemas.gfac.NameValuePairType;
+import org.apache.airavata.schemas.gfac.QueueType;
+import org.apache.airavata.schemas.gfac.StringArrayType;
+import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.globus.gram.GramAttributes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
 public class GramRSLGenerator {
     protected static final Logger log = LoggerFactory.getLogger(GramRSLGenerator.class);
 
@@ -104,14 +110,11 @@ public class GramRSLGenerator {
         }
         // Using the workflowContext Header values if user provided them in the request and
overwrite the default values in DD
         //todo finish the scheduling based on workflow execution context
-        ContextHeaderDocument.ContextHeader currentContextHeader = context.getContextHeader();
-        if(currentContextHeader != null){
-        if (currentContextHeader.getWorkflowSchedulingContext() != null) {
-            if (currentContextHeader != null &&
-                    currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()
!= null &&
-                    currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray().length
> 0) {
+        ConfigurationData configurationData = context.getConfigurationData();
+        if(configurationData != null && configurationData.getComputationalResourceScheduling()
!= null){
+        	 ComputationalResourceScheduling computionnalResource = configurationData.getComputationalResourceScheduling();
                 try {
-                    int cpuCount = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getCpuCount();
+                    int cpuCount = computionnalResource.getTotalCPUCount();
                     if(cpuCount>0){
                         app.setCpuCount(cpuCount);
                     }
@@ -120,7 +123,7 @@ public class GramRSLGenerator {
                     new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    int nodeCount = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getNodeCount();
+                    int nodeCount = computionnalResource.getNodeCount();
                     if(nodeCount>0){
                         app.setNodeCount(nodeCount);
                     }
@@ -129,7 +132,7 @@ public class GramRSLGenerator {
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    String queueName = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getQueueName();
+                    String queueName = computionnalResource.getQueueName();
                     if (queueName != null) {
                         if(app.getQueue() == null){
                             QueueType queueType = app.addNewQueue();
@@ -143,7 +146,7 @@ public class GramRSLGenerator {
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
                 try {
-                    int maxwallTime = currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getMaxWallTime();
+                    int maxwallTime = computionnalResource.getWallTimeLimit();
                     if(maxwallTime>0){
                         app.setMaxWallTime(maxwallTime);
                     }
@@ -151,12 +154,6 @@ public class GramRSLGenerator {
                     log.debug("No Value sent in WorkflowContextHeader for Node Count, value
in the Deployment Descriptor will be used");
                      new GFacProviderException("No Value sent in WorkflowContextHeader for
Node Count, value in the Deployment Descriptor will be used",e);
                 }
-            }
-        }
-//        if(currentContextHeader.getWorkflowOutputDataHandling() != null){
-//            if(currentContextHeader.getWorkflowOutputDataHandling().getApplicationOutputDataHandlingArray().length
!= 0)
-//            app.setOutputDataDirectory(currentContextHeader.getWorkflowOutputDataHandling().getApplicationOutputDataHandlingArray()[0].getOutputDataDirectory());
-//        }
         }
         if (app.getNodeCount() > 0) {
             jobAttr.set("hostCount", String.valueOf(app.getNodeCount()));

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/AbstractBESTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/AbstractBESTest.java
b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/AbstractBESTest.java
index 2dc4131..efbd164 100644
--- a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/AbstractBESTest.java
+++ b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/AbstractBESTest.java
@@ -103,11 +103,11 @@ public abstract class AbstractBESTest extends GFacBaseTestCase {
 	}
 
 	protected void submitJob() throws Exception {
-		ContextHeader contextHeader = ContextHeader.Factory.newInstance();
-		buildOutputLocation(contextHeader);
-		
-		buildUserName(contextHeader, userName);
-		jobExecutionContext.setContextHeader(contextHeader);
+//		ContextHeader contextHeader = ContextHeader.Factory.newInstance();
+//		buildOutputLocation(contextHeader);
+//		
+//		buildUserName(contextHeader, userName);
+//		jobExecutionContext.setContextHeader(contextHeader);
 	}
 
 	protected GFacConfiguration getGFACConfig() throws Exception {

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
index b3ec514..a10ce12 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -36,7 +36,6 @@ public class BaseOrchestratorTest {
     private GatewayResource gatewayResource;
     private WorkerResource workerResource;
     private UserResource userResource;
-    private OrchestratorDataResource orchestratorDataResource;
     private Initialize initialize;
     private DocumentCreator documentCreator;
 
@@ -46,7 +45,6 @@ public class BaseOrchestratorTest {
         gatewayResource = (GatewayResource) ResourceUtils.getGateway("default");
         workerResource = (WorkerResource) ResourceUtils.getWorker(gatewayResource.getGatewayName(),
"admin");
         userResource = (UserResource) gatewayResource.create(ResourceType.USER);
-        orchestratorDataResource = (OrchestratorDataResource) gatewayResource.create(ResourceType.ORCHESTRATOR);
         userResource.setUserName("admin");
         userResource.setPassword("admin");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
index e14d1e4..8bda644 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
@@ -55,7 +55,7 @@ public class NewOrchestratorTest extends BaseOrchestratorTest {
         createJobRequestWithDocuments(getAiravataAPI());
     }
 
-    private void createJobRequestWithDocuments(AiravataAPI airavataAPI) {
+    private void createJobRequestWithDocuments(AiravataAPI airavataAPI) throws Exception{
         // creating host description
 
         //Using new airavata-api methods to store experiment metadata
@@ -83,7 +83,7 @@ public class NewOrchestratorTest extends BaseOrchestratorTest {
         configurationData.setApplicationId("Echo");
 
         Registry registry = new RegistryImpl();
-        experimentID = (String) registry.add(ParentDataType.EXPERIMENT_BASIC_DATA, basicMetadata);
+        experimentID = (String) registry.add(ParentDataType.EXPERIMENT, basicMetadata);
         registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, configurationData, experimentID);
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
index 1c62a0d..b33ee65 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
@@ -51,7 +51,7 @@ public class OrchestratorTestWithGRAM extends BaseOrchestratorTest {
         createJobRequestWithDocuments();
     }
 
-    private void createJobRequestWithDocuments() {
+    private void createJobRequestWithDocuments() throws Exception{
         //Using new airavata-api methods to store experiment metadata
         BasicMetadata basicMetadata = new BasicMetadata();
         basicMetadata.setExperimentName("test-trestles");
@@ -76,7 +76,7 @@ public class OrchestratorTestWithGRAM extends BaseOrchestratorTest {
         configurationData.setApplicationId("SimpleEcho1");
 
         Registry registry = new RegistryImpl();
-        experimentID = (String) registry.add(ParentDataType.EXPERIMENT_BASIC_DATA, basicMetadata);
+        experimentID = (String) registry.add(ParentDataType.EXPERIMENT, basicMetadata);
         registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, configurationData, experimentID);
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
index 6393523..9d321f0 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 import junit.framework.Assert;
+
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.experiment.*;
@@ -52,7 +53,7 @@ public class OrchestratorTestWithGSISSH extends BaseOrchestratorTest {
          createJobRequestWithDocuments();
      }
 
-     private void createJobRequestWithDocuments() {
+     private void createJobRequestWithDocuments() throws Exception{
          //Using new airavata-api methods to store experiment metadata
          BasicMetadata basicMetadata = new BasicMetadata();
          basicMetadata.setExperimentName("test-trestles-gsissh");
@@ -77,7 +78,7 @@ public class OrchestratorTestWithGSISSH extends BaseOrchestratorTest {
          configurationData.setApplicationId("SimpleEcho2");
 
          Registry registry = new RegistryImpl();
-         experimentID = (String) registry.add(ParentDataType.EXPERIMENT_BASIC_DATA, basicMetadata);
+         experimentID = (String) registry.add(ParentDataType.EXPERIMENT, basicMetadata);
          registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, configurationData, experimentID);
      }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3a453bb1/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
index c76ab14..ccee415 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
@@ -404,9 +404,6 @@ public class EmbeddedGFacInvoker implements Invoker {
     private void addSecurityContext(HostDescription registeredHost, Properties configurationProperties,
                                     JobExecutionContext jobExecutionContext, ContextHeaderDocument.ContextHeader
contextHeader) throws WorkflowException {
         RequestData requestData;
-        if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType()
instanceof UnicoreHostType
-                || registeredHost.getType() instanceof GsisshHostType) {
-
             /* todo fix the credential store and uncomment following code block
             SecurityContextDocument.SecurityContext.CredentialManagementService credentialManagementService
                     = getCredentialManagementService(contextHeader);
@@ -473,12 +470,12 @@ public class EmbeddedGFacInvoker implements Invoker {
             }
 
             jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT,
context);
-        } else if (registeredHost.getType() instanceof Ec2HostType) {
+        //Adding Amanzon Keys
             if (this.configuration.getAmazonSecurityContext() != null) {
                 jobExecutionContext.addSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT,
                         this.configuration.getAmazonSecurityContext());
-            }
-        } else if (registeredHost.getType() instanceof SSHHostType) {
+         }
+      //Adding SSH security
             String sshUserName = configurationProperties.getProperty(Constants.SSH_USER_NAME);
             String sshPrivateKey = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY);
             String sshPrivateKeyPass = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY_PASS);
@@ -511,7 +508,6 @@ public class EmbeddedGFacInvoker implements Invoker {
                 sshSecurityContext.setKeyPass(sshPrivateKeyPass);
             }
             jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT,
sshSecurityContext);
-        }
     }
 
     /**


Mime
View raw message