airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/2] airavata git commit: Updating API calls to use gatewayId - AIRAVATA-1607
Date Tue, 03 Mar 2015 22:36:53 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 8be598817 -> b1f0b00d3


http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
index 8567c74..27a4063 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
@@ -159,7 +159,7 @@ public class RegisterUS3Application {
             System.out.println("\n #### Registering Application Modules #### \n");
 
             //Register Echo
-            ultrascanModuleId = airavataClient.registerApplicationModule(
+            ultrascanModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY,
                     RegisterSampleApplicationsUtils.createApplicationModule(
                             "ultrascan", "1.0", "ultrascan application"));
             System.out.println("Ultrascan Module Id " + ultrascanModuleId);
@@ -191,7 +191,7 @@ public class RegisterUS3Application {
             List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
             applicationOutputs.add(output1);
   
-            ultrascanAppId = airavataClient.registerApplicationInterface(
+            ultrascanAppId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
                     RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("ultrascan",
"ultrascan application",
                             appModules, applicationInputs, applicationOutputs));
             System.out.println("Ultrascan Application Interface Id " + ultrascanAppId);
@@ -206,17 +206,17 @@ public class RegisterUS3Application {
 			System.out.println("#### Registering Application Deployments on Stampede #### \n");
 
 			// Register Stampede
-			String ultascanStamplede = airavataClient.registerApplicationDeployment(RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
+			String ultascanStamplede = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
 					stampedeResourceId, "/home1/01623/us3/bin/us_mpi_analysis", ApplicationParallelismType.MPI,
"ultrascan application", null, null, null));
 			System.out.println("Ultrascan on stampede deployment Id " + ultascanStamplede);
 			
-			String ultascanTrestles = airavataClient.registerApplicationDeployment(RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
+			String ultascanTrestles = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
 					trestlesResourceId, "/home/us3/trestles/bin/us_mpi_analysis", ApplicationParallelismType.MPI,
"ultrascan application", null, null, null));
 			System.out.println("Ultrascan on trestles deployment Id " + ultascanTrestles);
-			String ultascanLonestar = airavataClient.registerApplicationDeployment(RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
+			String ultascanLonestar = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
 					lonestarResourceId, "/home1/01623/us3/bin/us_mpi_analysis", ApplicationParallelismType.MPI,
"ultrascan application", null, null ,null));
 			System.out.println("Ultrascan on lonestar deployment Id " + ultascanLonestar);
-			String ultascanAlamo = airavataClient.registerApplicationDeployment(RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
+			String ultascanAlamo = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId,
 					alamoResourceId, "/home/us3/bin/us_mpi_analysis.sh", ApplicationParallelismType.MPI,
"ultrascan application", null, null ,null));
 			System.out.println("Ultrascan on alamo deployment Id " + ultascanAlamo);
 		} catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
index 17107cf..d56c2b8 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
@@ -103,7 +103,7 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
         exOut.add(output);
 
         Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
-        String projectId = getClient().createProject(project);
+        String projectId = getClient().createProject("default", project);
 
         Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId,
"admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
         simpleExperiment.setExperimentOutputs(exOut);
@@ -177,7 +177,7 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
         exOut.add(output);
 
         Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
-        String projectId = getClient().createProject(project);
+        String projectId = getClient().createProject("default", project);
 
         Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId,
"admin", "echoExperiment", "SimpleEcho3", "SimpleEcho3", exInputs);
         simpleExperiment.setExperimentOutputs(exOut);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
index c768b68..a23fff0 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
@@ -83,7 +83,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
     private void addProjects() throws TException {
         for (int i = 0; i < projects.length; i++){
         	Project project = ProjectModelUtil.createProject(projects[i], "admin", "test project");
-            String projectId = getClient().createProject(project);
+            String projectId = getClient().createProject("default", project);
             projectIds.add(projectId);
         }
     }
@@ -161,7 +161,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 	public List<Experiment> listUserExperiments(String user) throws ApplicationSettingsException,
 			AiravataClientConnectException, InvalidRequestException,
 			AiravataClientException, AiravataSystemException, TException {
-		return getClient().getAllUserExperiments(user);
+		return getClient().getAllUserExperiments("default", user);
 	}
 
 	public List<Experiment> listProjectExperiments(String projectID) throws ApplicationSettingsException,
@@ -173,7 +173,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 	public List<Project> listUserProjects(String user) throws ApplicationSettingsException,
 			AiravataClientConnectException, InvalidRequestException,
 			AiravataClientException, AiravataSystemException, TException {
-		return getClient().getAllUserProjects(user);
+		return getClient().getAllUserProjects("default", user);
 	}
 
 	public String runExperiment(String user, String project) throws ApplicationSettingsException,
AiravataClientConnectException,
@@ -209,7 +209,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 		simpleExperiment.setUserConfigurationData(userConfigurationData);
 
 		Client client = getClient();
-		final String expId = client.createExperiment(simpleExperiment);
+		final String expId = client.createExperiment("default", simpleExperiment);
 
 		client.launchExperiment(expId, "testToken");
 		return expId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
index 81d1383..0b94c43 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
@@ -77,7 +77,7 @@ public class SimpleEchoIT extends SingleAppIntegrationTestBase {
         exOut.add(output);
 
         Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
-        String projectId = getClient().createProject(project);
+        String projectId = getClient().createProject("default", project);
 
         Experiment simpleExperiment =
                 ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment",
appId, appId, exInputs);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/SingleAppIntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SingleAppIntegrationTestBase.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SingleAppIntegrationTestBase.java
index bd2593a..a2f0b91 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SingleAppIntegrationTestBase.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SingleAppIntegrationTestBase.java
@@ -37,7 +37,7 @@ import org.junit.Assert;
 public class SingleAppIntegrationTestBase extends AbstractIntegrationTest {
 
     protected String createExperiment(Experiment experiment) throws AiravataSystemException,
InvalidRequestException, TException {
-        return getClient().createExperiment(experiment);
+        return getClient().createExperiment("default", experiment);
     }
 
     protected void launchExperiment(String expId) throws ExperimentNotFoundException, AiravataSystemException,
InvalidRequestException, TException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
index f0e4242..b6528f0 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
@@ -184,7 +184,7 @@ public abstract class WorkflowIntegrationTestBase {
 //    }
 
     protected String createExperiment (Experiment experiment) throws AiravataSystemException,
InvalidRequestException, AiravataClientException, TException, AiravataClientConnectException
{
-        return getClient().createExperiment(experiment);
+        return getClient().createExperiment("default", experiment);
     }
 
     protected void launchExperiment (String expId) throws ExperimentNotFoundException, AiravataSystemException,
InvalidRequestException, AiravataClientException, TException, AiravataClientConnectException
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
index 2823202..281fc90 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
@@ -50,6 +50,7 @@ import java.util.*;
 
 public class DocumentCreatorNew {
 
+    private static final String DEFAULT_GATEWAY = "default.registry.gateway";
     private AppCatalog appcatalog = null;
     private String trestleshpcHostAddress = "trestles.sdsc.edu";
     private String lonestarHostAddress = "lonestar.tacc.utexas.edu";
@@ -92,7 +93,7 @@ public class DocumentCreatorNew {
 
         //Define application module
         ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.0.0",
"Local host echo applications");
-        module.setAppModuleId(client.registerApplicationModule(module));
+        module.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module));
 
         //Define application interfaces
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
@@ -101,11 +102,11 @@ public class DocumentCreatorNew {
         application.addToApplicationModules(module.getAppModuleId());
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", "Echo Input Data", null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         //Define application deployment
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "Local echo app depoyment");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         //Define gateway profile
         ComputeResourcePreference computeResourcePreference = DocumentCreatorUtils.createComputeResourcePreference(
@@ -161,11 +162,11 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.1",
null);
-        module.setAppModuleId(client.registerApplicationModule(module));
+        module.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module));
         ;
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "SSHEchoApplication");
-        client.registerApplicationDeployment(deployment);
+        client.registerApplicationDeployment(DEFAULT_GATEWAY, deployment);
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
 //    	application.setIsEmpty(false);
@@ -173,7 +174,7 @@ public class DocumentCreatorNew {
         application.addToApplicationModules(module.getAppModuleId());
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", null, null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
-        client.registerApplicationInterface(application);
+        client.registerApplicationInterface(DEFAULT_GATEWAY, application);
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/tmp", null, false, null, null, null));
         return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
     }
@@ -291,7 +292,7 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule module1 = DocumentCreatorUtils.createApplicationModule("echo",
"1.2", null);
-        module1.setAppModuleId(client.registerApplicationModule(module1));
+        module1.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module1));
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
 //    	application.setIsEmpty(false);
@@ -300,10 +301,10 @@ public class DocumentCreatorNew {
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", "echo_input", null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
 
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module1.getAppModuleId(), "/home/ogce/echo.sh", ApplicationParallelismType.SERIAL, "Echo application");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
         return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
@@ -332,7 +333,7 @@ public class DocumentCreatorNew {
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
 
         ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0",
null);
-        module2.setAppModuleId(client.registerApplicationModule(module2));
+        module2.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module2));
         ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
 //    	application2.setIsEmpty(false);
         application2.setApplicationName("WRF");
@@ -343,10 +344,10 @@ public class DocumentCreatorNew {
 
         application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output",
null, DataType.URI));
         application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log",
null, DataType.URI));
-        application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
+        application2.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application2));
 
         ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module2.getAppModuleId(), "/home/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI,
"WRF");
-        deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
+        deployment2.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment2));
         return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
     }
 
@@ -372,7 +373,7 @@ public class DocumentCreatorNew {
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
 
         ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0",
null);
-        module2.setAppModuleId(client.registerApplicationModule(module2));
+        module2.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module2));
         ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
         //    	application2.setIsEmpty(false);
         application2.setApplicationName("WRF");
@@ -383,10 +384,10 @@ public class DocumentCreatorNew {
 
         application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output",
null, DataType.URI));
         application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log",
null, DataType.URI));
-        application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
+        application2.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application2));
 
         ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module2.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI,
"WRF");
-        deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
+        deployment2.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment2));
         return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
 
     }
@@ -410,7 +411,7 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.3",
null);
-        module.setAppModuleId(client.registerApplicationModule(module));
+        module.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module));
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
 //    	application.setIsEmpty(false);
@@ -418,10 +419,10 @@ public class DocumentCreatorNew {
         application.addToApplicationModules(module.getAppModuleId());
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", null, null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
         return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
@@ -447,7 +448,7 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.4",
null);
-        module.setAppModuleId(client.registerApplicationModule(module));
+        module.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module));
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
 //    	application.setIsEmpty(false);
@@ -455,10 +456,10 @@ public class DocumentCreatorNew {
         application.addToApplicationModules(module.getAppModuleId());
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", null, null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
         return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
@@ -655,17 +656,17 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.5",
null);
-        module.setAppModuleId(client.registerApplicationModule(module));
+        module.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, module));
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
         application.setApplicationName("SimpleEchoBR");
         application.addToApplicationModules(module.getAppModuleId());
         application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input",
"echo_input", null, null, DataType.STRING));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output",
null, DataType.STRING));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
module.getAppModuleId(), "/N/u/lginnali/BigRed2/myjob/test.sh", ApplicationParallelismType.SERIAL,
"EchoLocal");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         String date = (new Date()).toString();
         date = date.replaceAll(" ", "_");
@@ -703,7 +704,7 @@ public class DocumentCreatorNew {
 
 
         ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber",
"12.0", null);
-        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+        amodule.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, amodule));
 
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
@@ -716,10 +717,10 @@ public class DocumentCreatorNew {
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst",
null, DataType.URI));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
amodule.getAppModuleId(), "/N/u/cgateway/BigRed2/sandbox/amber_wrapper.sh", ApplicationParallelismType.SERIAL,
"AmberBR2");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
 
         String date = (new Date()).toString();
@@ -753,7 +754,7 @@ public class DocumentCreatorNew {
         scpDataMovement.setSshPort(22);
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
         ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber",
"12.0", null);
-        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+        amodule.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, amodule));
 
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
@@ -766,10 +767,10 @@ public class DocumentCreatorNew {
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst",
null, DataType.URI));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
amodule.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL,
"AmberStampede");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
 
@@ -797,7 +798,7 @@ public class DocumentCreatorNew {
         client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
 
         ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber",
"12.0", null);
-        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+        amodule.setAppModuleId(client.registerApplicationModule(DEFAULT_GATEWAY, amodule));
 
 
         ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
@@ -810,10 +811,10 @@ public class DocumentCreatorNew {
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out",
null, DataType.URI));
         application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst",
null, DataType.URI));
-        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(DEFAULT_GATEWAY,
application));
 
         ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(),
amodule.getAppModuleId(), "/home/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL,
"AmberStampede");
-        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(DEFAULT_GATEWAY,
deployment));
 
         client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(),
host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(),
"/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
index c1d3c65..ccaae5e 100644
--- a/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
+++ b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
@@ -48,7 +48,8 @@ public class JCRComponentRegistry extends ComponentRegistry {
     public List<ComponentReference> getComponentReferenceList() {
         List<ComponentReference> tree = new ArrayList<ComponentReference>();
         try {
-        	List<ApplicationInterfaceDescription> allApplicationInterfaces = client.getAllApplicationInterfaces();
+        	//FIXME: Pass Gateway ID to the UI and use it to fetch the applications
+            List<ApplicationInterfaceDescription> allApplicationInterfaces = client.getAllApplicationInterfaces("default");
         	for (ApplicationInterfaceDescription interfaceDescription : allApplicationInterfaces)
{
         		JCRComponentReference jcr = new JCRComponentReference(interfaceDescription.getApplicationName(),interfaceDescription);
                 tree.add(jcr);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
index a5f366f..0931ebc 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
@@ -110,7 +110,8 @@ public class WorkflowImportWindow {
                     SwingUtilities.invokeLater(new Runnable() {
                         public void run() {
                             try {
-								List<String> resultList = getClient().getAllWorkflows();
+								//FIXME: Update the gateway id fetched from UI
+                                List<String> resultList = getClient().getAllWorkflows("default");
 								if (resultList == null || resultList.size() == 0) {
 								    /*
 								     * OGCEXRegistryLoaderWindow.this.list.getList(). setListData( new

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
index 26d2c6f..adfa726 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
@@ -298,7 +298,8 @@ public class LaunchApplicationWindow {
         String owner = this.thriftClientData.getUsername();        
         if(owner.equals(""))owner="NotKnown";              
         project.setOwner(owner);
-        project.setProjectID(airavataClient.createProject(project));
+        //FIXME:: use gatewayId from UI
+        project.setProjectID(airavataClient.createProject("default", project));
 //        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
         final List<DataPort> inputPorts = node.getInputPorts();
         final Experiment experiment = new Experiment();
@@ -366,8 +367,9 @@ public class LaunchApplicationWindow {
             elem.setValue("");
 			experiment.addToExperimentOutputs(elem );
         }
-  
-        experiment.setExperimentID(airavataClient.createExperiment(experiment));
+
+        //FIXME:: use gatewayId from UI
+        experiment.setExperimentID(airavataClient.createExperiment("default", experiment));
         airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
         hide();
         JOptionPane.showMessageDialog(null, "Experiment Launched. You will be alerted on
completion.");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
index c2eef03..e8ea5d8 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
@@ -102,7 +102,8 @@ public class RegistryWorkflowPublisherWindow {
     			org.apache.airavata.model.Workflow workflowData = new org.apache.airavata.model.Workflow();
     			workflowData.setName(workflowTemplateName);
     			workflowData.setGraph(workflowAsString);
-    			client.registerWorkflow(workflowData);
+                //FIXME: Use the gatewayId from the UI
+    			client.registerWorkflow("default", workflowData);
     			hide();
         	}
 		} catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index c542aa7..7e7a8ba 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -270,7 +270,8 @@ public class WorkflowInterpreterLaunchWindow {
 		org.apache.airavata.model.Workflow w = new org.apache.airavata.model.Workflow();
 		w.setName(workflowClone.getName());
         w.setGraph(JSONUtil.jsonElementToString(workflowClone.toJSON()));
-		w.setTemplateId(airavataClient.registerWorkflow(w));
+		//FIXME:: use gatewayId from UI
+        w.setTemplateId(airavataClient.registerWorkflow("default", w));
         String instanceName = this.instanceNameTextField.getText();
         if (instanceName.trim().equals("")){
         	JOptionPane.showMessageDialog(engine.getGUI().getFrame(),
@@ -291,7 +292,8 @@ public class WorkflowInterpreterLaunchWindow {
         Project project = new Project();
         project.setName("project1");
         project.setOwner(thriftClientData.getUsername());
-        project.setProjectID(airavataClient.createProject(project));
+        //FIXME:: use gatewayId from UI
+        project.setProjectID(airavataClient.createProject("default", project));
         final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
         final Experiment experiment = new Experiment();
         experiment.setApplicationId(w.getTemplateId());
@@ -354,7 +356,8 @@ public class WorkflowInterpreterLaunchWindow {
             throw new RuntimeException("Resource scheduling failed, target computer resource
host name is not defined");
         }
 
-        experiment.setExperimentID(airavataClient.createExperiment(experiment));
+        //FIXME:: use gatewayId from UI
+        experiment.setExperimentID(airavataClient.createExperiment("default", experiment));
 
         try {
             this.engine.getMonitor().subscribe(experiment.getExperimentID());


Mime
View raw message