Updating API calls to use gatewayId - AIRAVATA-1607
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b1f0b00d Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b1f0b00d Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b1f0b00d Branch: refs/heads/master Commit: b1f0b00d3340bc935f025817a13a786798c3a94e Parents: 8be5988 Author: Suresh Marru <[email protected]> Authored: Tue Mar 3 17:36:21 2015 -0500 Committer: Suresh Marru <[email protected]> Committed: Tue Mar 3 17:36:21 2015 -0500 ---------------------------------------------------------------------- .../server/handler/AiravataServerHandler.java | 42 ++++---- .../client/samples/CreateLaunchExperiment.java | 62 ++++++------ .../samples/CreateLaunchExperimentUS3.java | 20 ++-- .../client/samples/RegisterSampleData.java | 36 +++---- .../samples/TestCreateLaunchExperiment.java | 10 +- .../tools/RegisterOGCEUS3Application.java | 8 +- .../tools/RegisterSampleApplications.java | 100 +++++++++---------- .../client/tools/RegisterUS3Application.java | 12 +-- .../apache/airavata/integration/BaseCaseIT.java | 4 +- .../airavata/integration/DataRetrievalIT.java | 8 +- .../airavata/integration/SimpleEchoIT.java | 2 +- .../SingleAppIntegrationTestBase.java | 2 +- .../WorkflowIntegrationTestBase.java | 2 +- .../integration/tools/DocumentCreatorNew.java | 67 +++++++------ .../registry/JCRComponentRegistry.java | 3 +- .../dialogs/workflow/WorkflowImportWindow.java | 3 +- .../ui/experiment/LaunchApplicationWindow.java | 8 +- .../RegistryWorkflowPublisherWindow.java | 3 +- .../WorkflowInterpreterLaunchWindow.java | 9 +- 19 files changed, 205 insertions(+), 196 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/b1f0b00d/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 c449119..ff90bb2 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 @@ -251,7 +251,7 @@ public class AiravataServerHandler implements Airavata.Iface { * @param project */ @Override - public String createProject(Project project) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public String createProject(String gatewayId, Project project) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { registry = RegistryFactory.getDefaultRegistry(); if (!validateString(project.getName()) || !validateString(project.getOwner())){ @@ -341,7 +341,7 @@ public class AiravataServerHandler implements Airavata.Iface { * @param userName */ @Override - public List<Project> getAllUserProjects(String userName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<Project> getAllUserProjects(String gatewayId, String userName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { if (!validateString(userName)){ logger.error("Username cannot be empty. Please provide a valid user.."); AiravataSystemException exception = new AiravataSystemException(); @@ -375,7 +375,7 @@ public class AiravataServerHandler implements Airavata.Iface { } } - public List<Project> searchProjectsByProjectName(String userName, String projectName) throws InvalidRequestException, + public List<Project> searchProjectsByProjectName(String gatewayId, String userName, String projectName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { @@ -413,7 +413,7 @@ public class AiravataServerHandler implements Airavata.Iface { } } - public List<Project> searchProjectsByProjectDesc(String userName, String description) throws InvalidRequestException, + public List<Project> searchProjectsByProjectDesc(String gatewayId, String userName, String description) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { @@ -451,7 +451,7 @@ public class AiravataServerHandler implements Airavata.Iface { } } - public List<ExperimentSummary> searchExperimentsByName(String userName, String expName) throws InvalidRequestException, + public List<ExperimentSummary> searchExperimentsByName(String gatewayId, String userName, String expName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { @@ -489,7 +489,7 @@ public class AiravataServerHandler implements Airavata.Iface { } } - public List<ExperimentSummary> searchExperimentsByDesc(String userName, String description) throws InvalidRequestException, + public List<ExperimentSummary> searchExperimentsByDesc(String gatewayId, String userName, String description) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { @@ -527,7 +527,7 @@ public class AiravataServerHandler implements Airavata.Iface { } } - public List<ExperimentSummary> searchExperimentsByApplication(String userName, String applicationId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ExperimentSummary> searchExperimentsByApplication(String gatewayId, String userName, String applicationId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { if (!validateString(userName)){ logger.error("Username cannot be empty. Please provide a valid user.."); AiravataSystemException exception = new AiravataSystemException(); @@ -563,7 +563,7 @@ public class AiravataServerHandler implements Airavata.Iface { } @Override - public List<ExperimentSummary> searchExperimentsByStatus(String userName, ExperimentState experimentState) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ExperimentSummary> searchExperimentsByStatus(String gatewayId, String userName, ExperimentState experimentState) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { if (!validateString(userName)){ logger.error("Username cannot be empty. Please provide a valid user.."); AiravataSystemException exception = new AiravataSystemException(); @@ -599,7 +599,7 @@ public class AiravataServerHandler implements Airavata.Iface { } @Override - public List<ExperimentSummary> searchExperimentsByCreationTime(String userName, long fromTime, long toTime) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ExperimentSummary> searchExperimentsByCreationTime(String gatewayId, String userName, long fromTime, long toTime) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { if (!validateString(userName)){ logger.error("Username cannot be empty. Please provide a valid user.."); AiravataSystemException exception = new AiravataSystemException(); @@ -684,7 +684,7 @@ public class AiravataServerHandler implements Airavata.Iface { * @param userName */ @Override - public List<Experiment> getAllUserExperiments(String userName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<Experiment> getAllUserExperiments(String gatewayId, String userName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { if (!validateString(userName)){ logger.error("Username cannot be empty. Please provide a valid user.."); AiravataSystemException exception = new AiravataSystemException(); @@ -741,7 +741,7 @@ public class AiravataServerHandler implements Airavata.Iface { * rather an Airavata Administrator will be notified to take corrective action. */ @Override - public String createExperiment(Experiment experiment) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public String createExperiment(String gatewayId, Experiment experiment) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { registry = RegistryFactory.getDefaultRegistry(); if (!validateString(experiment.getName())){ @@ -753,7 +753,7 @@ public class AiravataServerHandler implements Airavata.Iface { } String experimentId = (String)registry.add(ParentDataType.EXPERIMENT, experiment); if (ServerSettings.isRabbitMqPublishEnabled()){ - String gatewayId = ServerSettings.getDefaultUserGateway(); + gatewayId = ServerSettings.getDefaultUserGateway(); ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.CREATED, experimentId, gatewayId); @@ -1354,7 +1354,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns a server-side generated airavata appModule globally unique identifier. */ @Override - public String registerApplicationModule(ApplicationModule applicationModule) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public String registerApplicationModule(String gatewayId, ApplicationModule applicationModule) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationInterface().addApplicationModule(applicationModule); @@ -1412,7 +1412,7 @@ public class AiravataServerHandler implements Airavata.Iface { } @Override - public List<ApplicationModule> getAllAppModules() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ApplicationModule> getAllAppModules(String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationInterface().getAllApplicationModules(); @@ -1453,7 +1453,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns a server-side generated airavata appModule globally unique identifier. */ @Override - public String registerApplicationDeployment(ApplicationDeploymentDescription applicationDeployment) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public String registerApplicationDeployment(String gatewayId, ApplicationDeploymentDescription applicationDeployment) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationDeployment().addApplicationDeployment(applicationDeployment); @@ -1539,7 +1539,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns the list of all application Deployment Objects. */ @Override - public List<ApplicationDeploymentDescription> getAllApplicationDeployments() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ApplicationDeploymentDescription> getAllApplicationDeployments(String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationDeployment().getAllApplicationDeployements(); @@ -1587,7 +1587,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns a server-side generated airavata application interface globally unique identifier. */ @Override - public String registerApplicationInterface(ApplicationInterfaceDescription applicationInterface) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public String registerApplicationInterface(String gatewayId, ApplicationInterfaceDescription applicationInterface) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationInterface().addApplicationInterface(applicationInterface); @@ -1672,7 +1672,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns a list of application interfaces with corresponsing id's */ @Override - public Map<String, String> getAllApplicationInterfaceNames() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public Map<String, String> getAllApplicationInterfaceNames(String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); List<ApplicationInterfaceDescription> allApplicationInterfaces = appCatalog.getApplicationInterface().getAllApplicationInterfaces(); @@ -1699,7 +1699,7 @@ public class AiravataServerHandler implements Airavata.Iface { * Returns a list of application interfaces documents */ @Override - public List<ApplicationInterfaceDescription> getAllApplicationInterfaces() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List<ApplicationInterfaceDescription> getAllApplicationInterfaces(String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { appCatalog = AppCatalogFactory.getAppCatalog(); return appCatalog.getApplicationInterface().getAllApplicationInterfaces(); @@ -2841,7 +2841,7 @@ public class AiravataServerHandler implements Airavata.Iface { } @Override - public List<String> getAllWorkflows() throws InvalidRequestException, + public List<String> getAllWorkflows(String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { return getWorkflowCatalog().getAllWorkflows(); @@ -2885,7 +2885,7 @@ public class AiravataServerHandler implements Airavata.Iface { } @Override - public String registerWorkflow(Workflow workflow) + public String registerWorkflow(String gatewayId, Workflow workflow) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { 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/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 9d07028..01f017a 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 @@ -179,7 +179,7 @@ public class CreateLaunchExperiment { List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho3", echoAppId, exInputs); @@ -196,7 +196,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -272,7 +272,7 @@ public class CreateLaunchExperiment { userConfigurationData.setAdvanceOutputDataHandling(dataHandling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -333,7 +333,7 @@ public class CreateLaunchExperiment { userConfigurationData.setAdvanceOutputDataHandling(dataHandling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -410,7 +410,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -497,7 +497,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -595,7 +595,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -668,7 +668,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -727,7 +727,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -780,7 +780,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -905,7 +905,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -979,7 +979,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1038,7 +1038,7 @@ public class CreateLaunchExperiment { exOut.add(output); Project project = ProjectModelUtil.createProject("project1", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "Echo Test", echoAppId, exInputs); @@ -1055,7 +1055,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1132,7 +1132,7 @@ public class CreateLaunchExperiment { List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho3", echoAppId, exInputs); @@ -1149,7 +1149,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1256,7 +1256,7 @@ public class CreateLaunchExperiment { exOut.add(output); Project project = ProjectModelUtil.createProject("default", "lahiru", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "lahiru", "sshEchoExperiment", "SimpleEchoBR", echoAppId, exInputs); @@ -1273,7 +1273,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1319,7 +1319,7 @@ public class CreateLaunchExperiment { List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "sshEchoExperiment", "SimpleEchoBR", amberAppId, exInputs); @@ -1337,7 +1337,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1384,7 +1384,7 @@ public class CreateLaunchExperiment { Project project = ProjectModelUtil.createProject("default", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "sshEchoExperiment", "SimpleEchoBR", amberAppId, exInputs); @@ -1401,7 +1401,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1447,7 +1447,7 @@ public class CreateLaunchExperiment { List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "sshEchoExperiment", "SimpleEchoBR", amberAppId, exInputs); @@ -1465,7 +1465,7 @@ public class CreateLaunchExperiment { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } } } @@ -1511,7 +1511,7 @@ public class CreateLaunchExperiment { public static List<Experiment> getExperimentsForUser(Airavata.Client client, String user) { try { - return client.getAllUserExperiments(user); + return client.getAllUserExperiments(DEFAULT_GATEWAY, user); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1526,7 +1526,7 @@ public class CreateLaunchExperiment { public static List<Project> getAllUserProject(Airavata.Client client, String user) { try { - return client.getAllUserProjects(user); + return client.getAllUserProjects(DEFAULT_GATEWAY, user); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1541,7 +1541,7 @@ public class CreateLaunchExperiment { public static List<Project> searchProjectsByProjectName(Airavata.Client client, String user, String projectName) { try { - return client.searchProjectsByProjectName(user, projectName); + return client.searchProjectsByProjectName(DEFAULT_GATEWAY, user, projectName); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1556,7 +1556,7 @@ public class CreateLaunchExperiment { public static List<Project> searchProjectsByProjectDesc(Airavata.Client client, String user, String desc) { try { - return client.searchProjectsByProjectDesc(user, desc); + return client.searchProjectsByProjectDesc(DEFAULT_GATEWAY, user, desc); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1572,7 +1572,7 @@ public class CreateLaunchExperiment { public static List<ExperimentSummary> searchExperimentsByName(Airavata.Client client, String user, String expName) { try { - return client.searchExperimentsByName(user, expName); + return client.searchExperimentsByName(DEFAULT_GATEWAY, user, expName); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1587,7 +1587,7 @@ public class CreateLaunchExperiment { public static List<ExperimentSummary> searchExperimentsByDesc(Airavata.Client client, String user, String desc) { try { - return client.searchExperimentsByDesc(user, desc); + return client.searchExperimentsByDesc(DEFAULT_GATEWAY, user, desc); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -1602,7 +1602,7 @@ public class CreateLaunchExperiment { public static List<ExperimentSummary> searchExperimentsByApplication(Airavata.Client client, String user, String app) { try { - return client.searchExperimentsByApplication(user, app); + return client.searchExperimentsByApplication(DEFAULT_GATEWAY, user, app); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { 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/samples/CreateLaunchExperimentUS3.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java index 3849d82..bf82ed3 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java @@ -158,7 +158,7 @@ public class CreateLaunchExperimentUS3 { exOut.add(output); Project project = ProjectModelUtil.createProject("project1", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "US3EchoExperimentTrestles", "US3EchoTrestles", "US3EchoTrestles", exInputs); @@ -171,7 +171,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); @@ -225,7 +225,7 @@ public class CreateLaunchExperimentUS3 { // exOut.add(output2); Project project = ProjectModelUtil.createProject("ultrascan", "ultrascan", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "ultrascan", "US3ExperimentTrestles", "US3AppTrestles", "ultrascan_7ce6cd43-622c-44e0-87c5-fb7a6528c799", exInputs); simpleExperiment.setExperimentOutputs(exOut); @@ -243,7 +243,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); @@ -297,7 +297,7 @@ public class CreateLaunchExperimentUS3 { // exOut.add(output2); Project project = ProjectModelUtil.createProject("project1", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "ultrascan", "US3ExperimentStampede", "US3AppStampede", "ultrascan_7ce6cd43-622c-44e0-87c5-fb7a6528c799", exInputs); simpleExperiment.setExperimentOutputs(exOut); @@ -316,7 +316,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setAdvanceOutputDataHandling(dataHandling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); @@ -388,7 +388,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setAdvanceOutputDataHandling(dataHandling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); @@ -461,7 +461,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setAdvanceOutputDataHandling(dataHandling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); @@ -493,7 +493,7 @@ public class CreateLaunchExperimentUS3 { exOut.add(output); Project project = ProjectModelUtil.createProject("project1", "admin", "test project"); - String projectId = client.createProject(project); + String projectId = client.createProject(DEFAULT_GATEWAY, project); Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "US3EchoExperimentStatus", "US3EchoStampede", "US3EchoStampede", exInputs); @@ -507,7 +507,7 @@ public class CreateLaunchExperimentUS3 { userConfigurationData.setOverrideManualScheduledParams(false); userConfigurationData.setComputationalResourceScheduling(scheduling); simpleExperiment.setUserConfigurationData(userConfigurationData); - return client.createExperiment(simpleExperiment); + return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment); } catch (AiravataSystemException e) { logger.error("Error occured while creating the experiment...", e.getMessage()); throw new AiravataSystemException(e); 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/samples/RegisterSampleData.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java index f5a79de..8b23643 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java @@ -142,7 +142,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String addApplicationInterfaceId = airavataClient.registerApplicationInterface( + String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Gaussian", "Gaussian application", appModules, applicationInputs, applicationOutputs)); System.out.println("Gaussian Application Interface Id " + addApplicationInterfaceId); @@ -190,7 +190,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String addApplicationInterfaceId = airavataClient.registerApplicationInterface( + String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Tinker_Monte", "Monte application", appModules, applicationInputs, applicationOutputs)); System.out.println("Monte Application Interface Id " + addApplicationInterfaceId); @@ -203,42 +203,42 @@ public class RegisterSampleData { private void registerApplicationDeployments() throws TException { System.out.println("#### Registering Application Deployments on Localhost ####"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, localhostId, sampleScriptDir + "/echo.sh", ApplicationParallelismType.SERIAL, "Echo application description", null, null, null)); System.out.println("Successfully registered Echo application on localhost, application Id = " + echoAppDeployId); //Register Add application - String addAppDeployId = airavataClient.registerApplicationDeployment( + String addAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(addModuleId, localhostId, sampleScriptDir + "/add.sh", ApplicationParallelismType.SERIAL, "Add application description", null, null, null)); System.out.println("Successfully registered Add application on localhost, application Id = " + addAppDeployId); //Register Multiply application - String multiplyAppDeployId = airavataClient.registerApplicationDeployment( + String multiplyAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(multiplyModuleId, localhostId, sampleScriptDir + "/multiply.sh", ApplicationParallelismType.SERIAL, "Multiply application description", null, null, null)); System.out.println("Successfully registered Multiply application on localhost, application Id = " + multiplyAppDeployId); //Register Subtract application - String subtractAppDeployId = airavataClient.registerApplicationDeployment( + String subtractAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(subtractModuleId, localhostId, sampleScriptDir + "/subtract.sh", ApplicationParallelismType.SERIAL, "Subtract application description ", null, null, null)); System.out.println("Successfully registered Subtract application on localhost, application Id = " + subtractAppDeployId); //Register Tinker monte application - String tinkerMonteAppDeployId = airavataClient.registerApplicationDeployment( + String tinkerMonteAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(monteXModuleId, localhostId, sampleScriptDir + "/monte.x", ApplicationParallelismType.SERIAL, "Grid chem tinker monte application description ", null, null, null)); System.out.println("Successfully registered tinker monte application on localhost, application Id = " + tinkerMonteAppDeployId); //Register Tinker monte application - String gaussianAppDeployId = airavataClient.registerApplicationDeployment( + String gaussianAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gaussianModuleId, localhostId, sampleScriptDir + "/gaussian.sh", ApplicationParallelismType.SERIAL, "Grid chem Gaussian application description ", null, null, null)); @@ -247,28 +247,28 @@ public class RegisterSampleData { private void registerApplicationModules() throws TException { //Register Echo - echoModuleId = airavataClient.registerApplicationModule( + echoModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Echo", "1.0", "Echo application description")); //Register Echo - addModuleId = airavataClient.registerApplicationModule( + addModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Add", "1.0", "Add application description")); //Register Echo - multiplyModuleId = airavataClient.registerApplicationModule( + multiplyModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Multiply", "1.0", "Multiply application description")); //Register Echo - subtractModuleId = airavataClient.registerApplicationModule( + subtractModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Subtract", "1.0", "Subtract application description")); //Register Monte - monteXModuleId = airavataClient.registerApplicationModule( + monteXModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Tinker Monte", "1.0", "Grid chem tinker monte application description")); // Register gaussian application - gaussianModuleId = airavataClient.registerApplicationModule( + gaussianModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "Gaussian", "1.0", "Grid Chem Gaussian application description")); @@ -294,7 +294,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String echoInterfaceId = airavataClient.registerApplicationInterface( + String echoInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Echo", "Echo application description", appModules, applicationInputs, applicationOutputs)); System.out.println("Echo Application Interface Id " + echoInterfaceId); @@ -326,7 +326,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String addApplicationInterfaceId = airavataClient.registerApplicationInterface( + String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Add", "Add two numbers", appModules, applicationInputs, applicationOutputs)); System.out.println("Add Application Interface Id " + addApplicationInterfaceId); @@ -358,7 +358,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String multiplyApplicationInterfaceId = airavataClient.registerApplicationInterface( + String multiplyApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Multiply", "Multiply two numbers", appModules, applicationInputs, applicationOutputs)); System.out.println("Multiply Application Interface Id " + multiplyApplicationInterfaceId); @@ -390,7 +390,7 @@ public class RegisterSampleData { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String subtractApplicationInterfaceId = airavataClient.registerApplicationInterface( + String subtractApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Subtract", "Subtract two numbers", appModules, applicationInputs, applicationOutputs)); System.out.println("Subtract Application Interface Id " + subtractApplicationInterfaceId); 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/samples/TestCreateLaunchExperiment.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java index 84c053d..8cfbd65 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java @@ -109,7 +109,7 @@ public class TestCreateLaunchExperiment { public static List<Experiment> getExperimentsForUser (Airavata.Client client, String user){ try { - return client.getAllUserExperiments(user); + return client.getAllUserExperiments(DEFAULT_GATEWAY, user); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -154,7 +154,7 @@ public class TestCreateLaunchExperiment { public static List<ExperimentSummary> getExperimentsForApplication (Airavata.Client client, String user, String application){ try { - return client.searchExperimentsByApplication(user, application); + return client.searchExperimentsByApplication(DEFAULT_GATEWAY, user, application); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -169,7 +169,7 @@ public class TestCreateLaunchExperiment { public static List<ExperimentSummary> searchExperimentsByStatus (Airavata.Client client, String user, ExperimentState experimentState){ try { - return client.searchExperimentsByStatus(user, experimentState); + return client.searchExperimentsByStatus(DEFAULT_GATEWAY, user, experimentState); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -184,7 +184,7 @@ public class TestCreateLaunchExperiment { public static List<ExperimentSummary> searchExperimentsByDate (Airavata.Client client, String user, Long from, Long to){ try { - return client.searchExperimentsByCreationTime(user, from, to); + return client.searchExperimentsByCreationTime(DEFAULT_GATEWAY, user, from, to); } catch (AiravataSystemException e) { e.printStackTrace(); } catch (InvalidRequestException e) { @@ -218,7 +218,7 @@ public class TestCreateLaunchExperiment { public static void getAllAppInterfaces (Airavata.Client client){ try { - Map<String, String> allApps = client.getAllApplicationInterfaceNames(); + Map<String, String> allApps = client.getAllApplicationInterfaceNames(DEFAULT_GATEWAY); for (String id : allApps.keySet()){ System.out.println("app id : " + id); System.out.println("app name : " + allApps.get(id)); 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/RegisterOGCEUS3Application.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java index d046710..c1f5cc8 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java @@ -159,7 +159,7 @@ public class RegisterOGCEUS3Application { System.out.println("\n #### Registering Application Modules #### \n"); //Register Echo - ultrascanModuleId = airavataClient.registerApplicationModule( + ultrascanModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( "ultrascan_ogce", "1.0", "ultrascan application")); System.out.println("Ultrascan Module Id " + ultrascanModuleId); @@ -191,7 +191,7 @@ public class RegisterOGCEUS3Application { 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,12 +206,12 @@ public class RegisterOGCEUS3Application { 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/01437/ogce/xsede_apps/ultrascan/bin/us_mpi_analysis", ApplicationParallelismType.MPI, "ultrascan OGCE 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/ogce/xsede_app/ultrascan/bin/us_mpi_analysis", ApplicationParallelismType.MPI, "ultrascan OGCE application", null, null, null)); System.out.println("Ultrascan on trestles deployment Id " + ultascanTrestles); 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/RegisterSampleApplications.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java index c311dde..7f7ac1d 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java @@ -238,81 +238,81 @@ public class RegisterSampleApplications { System.out.println("\n #### Registering Application Modules #### \n"); //Register Echo - echoModuleId = airavataClient.registerApplicationModule( + echoModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( echoName, "1.0", echoDescription)); System.out.println("Echo Module Id " + echoModuleId); - mpiModuleId = airavataClient.registerApplicationModule( + mpiModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( mpiName, "1.0", mpiDescription)); System.out.println("MPI Module Id " + mpiModuleId); //Register Amber - amberModuleId = airavataClient.registerApplicationModule( + amberModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( amberName, "12.0", amberDescription)); System.out.println("Amber Module Id " + amberModuleId); //Register AutoDock - autoDockModuleId = airavataClient.registerApplicationModule( + autoDockModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( autoDockName, "4.2", autoDockDescription)); System.out.println("AutoDock Module Id " + autoDockModuleId); //Register ESPRESSO - espressoModuleId = airavataClient.registerApplicationModule( + espressoModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( espressoName, "5.0.3", espressoDescription)); System.out.println("ESPRESSO Module Id " + espressoModuleId); //Register GROMACS - gromacsModuleId = airavataClient.registerApplicationModule( + gromacsModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( gromacsName, "4.6.5", gromacsDescription)); System.out.println("GROMACS Module Id " + gromacsModuleId); //Register LAMMPS - lammpsModuleId = airavataClient.registerApplicationModule( + lammpsModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( lammpsName, "20Mar14", lammpsDescription)); System.out.println("LAMMPS Module Id " + lammpsModuleId); //Register NWChem - nwChemModuleId = airavataClient.registerApplicationModule( + nwChemModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( nwChemName, "6.3", nwChemDescription)); System.out.println("NWChem Module Id " + nwChemModuleId); //Register Trinity - trinityModuleId = airavataClient.registerApplicationModule( + trinityModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( trinityName, "r20130225", trinityDescription)); System.out.println("Trinity Module Id " + trinityModuleId); //Register WRF - wrfModuleId = airavataClient.registerApplicationModule( + wrfModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( wrfName, "3.5.1", wrfDescription)); System.out.println("WRF Module Id " + wrfModuleId); //Register PHASTA - phastaModuleId = airavataClient.registerApplicationModule( + phastaModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( phastaName, "1.0", phastaDescription)); System.out.println("phasta Module Id " + phastaModuleId); - monteXModuleId = airavataClient.registerApplicationModule( + monteXModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( monteXName, "1.0", monteXDescription)); System.out.println("Tinker Monte Module Id " + monteXModuleId); - gaussianModuleId = airavataClient.registerApplicationModule( + gaussianModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( gaussianName, "1.0", gaussianDescription)); //Register GAMESS - gamessModuleId = airavataClient.registerApplicationModule( + gamessModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationModule( gamessName, "17May13", gamessDescription)); System.out.println("Gamess Module Id " + gamessModuleId); @@ -415,7 +415,7 @@ public class RegisterSampleApplications { "", DataType.URI, false, true)); - gamessInterfaceId = airavataClient.registerApplicationInterface( + gamessInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("gamess", "gamess", appModules, applicationInputs, applicationOutputs)); @@ -445,7 +445,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - echoLocalInterfaceId = airavataClient.registerApplicationInterface( + echoLocalInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(echoName, echoDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Local Echo Application Interface Id " + echoLocalInterfaceId); @@ -484,7 +484,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output1); - echoInterfaceId = airavataClient.registerApplicationInterface( + echoInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(echoName, echoDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Echo Application Interface Id " + echoInterfaceId); @@ -515,7 +515,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output1); - mpiInterfaceId = airavataClient.registerApplicationInterface( + mpiInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(mpiName, mpiDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("MPI Application Interface Id " + mpiInterfaceId); @@ -561,7 +561,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output5); applicationOutputs.add(output6); - amberInterfaceId = airavataClient.registerApplicationInterface( + amberInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(amberName, amberDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Amber Application Interface Id " + amberInterfaceId); @@ -598,7 +598,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - autoDockInterfaceId = airavataClient.registerApplicationInterface( + autoDockInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(autoDockName, autoDockDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("AutoDock Application Interface Id " + autoDockInterfaceId); @@ -636,7 +636,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output3); applicationOutputs.add(output4); - espressoInterfaceId = airavataClient.registerApplicationInterface( + espressoInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(espressoName, espressoDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Espresso Application Interface Id " + espressoInterfaceId); @@ -676,7 +676,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output4); applicationOutputs.add(output5); - gromacsInterfaceId = airavataClient.registerApplicationInterface( + gromacsInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(gromacsName, gromacsDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Gromacs Application Interface Id " + gromacsInterfaceId); @@ -704,7 +704,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - lammpsInterfaceId = airavataClient.registerApplicationInterface( + lammpsInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(lammpsName, lammpsDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("LAMMPS Application Interface Id " + lammpsInterfaceId); @@ -733,7 +733,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - nwChemInterfaceId = airavataClient.registerApplicationInterface( + nwChemInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(nwChemName, nwChemDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("NWChem Application Interface Id " + nwChemInterfaceId); @@ -768,7 +768,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output1); applicationOutputs.add(output2); - trinityInterfaceId = airavataClient.registerApplicationInterface( + trinityInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(trinityName, trinityDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("Trinity Application Interface Id " + trinityInterfaceId); @@ -810,7 +810,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output1); applicationOutputs.add(output2); - wrfInterfaceId = airavataClient.registerApplicationInterface( + wrfInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(wrfName, wrfDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("WRF Application Interface Id " + wrfInterfaceId); @@ -848,7 +848,7 @@ public class RegisterSampleApplications { applicationOutputs.add(output1); applicationOutputs.add(output2); - amberInterfaceId = airavataClient.registerApplicationInterface( + amberInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(phastaName, phastaDescription, appModules, applicationInputs, applicationOutputs)); System.out.println("phasta Application Interface Id " + phastaInterfaceId); @@ -862,7 +862,7 @@ public class RegisterSampleApplications { try { System.out.println("#### Registering Application Deployments on Localhost #### \n"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, localhostId, "/bin/echo", ApplicationParallelismType.SERIAL, echoDescription, null, null, null)); @@ -892,7 +892,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String addApplicationInterfaceId = airavataClient.registerApplicationInterface( + String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Gaussian", "Gaussian application", appModules, applicationInputs, applicationOutputs)); System.out.println("Gaussian Application Interface Id " + addApplicationInterfaceId); @@ -939,7 +939,7 @@ public class RegisterSampleApplications { List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); - String addApplicationInterfaceId = airavataClient.registerApplicationInterface( + String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Tinker_Monte", "Monte application", appModules, applicationInputs, applicationOutputs)); System.out.println("Monte Application Interface Id " + addApplicationInterfaceId); @@ -955,28 +955,28 @@ public class RegisterSampleApplications { System.out.println("#### Registering Application Deployments on Stampede #### \n"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/echo_wrapper.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null,null)); System.out.println("Echo on stampede deployment Id " + echoAppDeployId); //Register Amber - String amberAppDeployId = airavataClient.registerApplicationDeployment( + String amberAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(amberModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.MPI, amberDescription, null, null, null)); System.out.println("Amber on stampede deployment Id " + amberAppDeployId); //Register ESPRESSO - String espressoAppDeployId = airavataClient.registerApplicationDeployment( + String espressoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(espressoModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/espresso_wrapper.sh", ApplicationParallelismType.MPI, espressoDescription, null, null, null)); System.out.println("ESPRESSO on stampede deployment Id " + espressoAppDeployId); //Register GROMACS - String gromacsAppDeployId = airavataClient.registerApplicationDeployment( + String gromacsAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gromacsModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/gromacs_wrapper.sh", ApplicationParallelismType.MPI, gromacsDescription, null, null ,null)); @@ -985,7 +985,7 @@ public class RegisterSampleApplications { //Register LAMMPS List<String> preJobCommands = new ArrayList<String>(); preJobCommands.add("cp /home1/00421/ccguser/apps/ds_lammps/data/* $workingDir"); - String lammpsAppDeployId = airavataClient.registerApplicationDeployment( + String lammpsAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, stampedeResourceId, "~/apps/ds_lammps/bin/lmp_stampede", ApplicationParallelismType.MPI, lammpsDescription,null, preJobCommands, null)); @@ -994,21 +994,21 @@ public class RegisterSampleApplications { //Register NWChem List<String> nwChemModuleCmds = new ArrayList<String>(); nwChemModuleCmds.add("module load nwchem"); - String nwChemAppDeployId = airavataClient.registerApplicationDeployment( + String nwChemAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(nwChemModuleId, stampedeResourceId, "nwchem", ApplicationParallelismType.MPI, nwChemDescription, nwChemModuleCmds, null, null)); System.out.println("NWChem on stampede deployment Id " + nwChemAppDeployId); //Register Trinity - String trinityAppDeployId = airavataClient.registerApplicationDeployment( + String trinityAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(trinityModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/trinity_wrapper.sh", ApplicationParallelismType.MPI, trinityDescription, null, null, null)); System.out.println("Trinity on stampede deployment Id " + trinityAppDeployId); //Register WRF - String wrfAppDeployId = airavataClient.registerApplicationDeployment( + String wrfAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(wrfModuleId, stampedeResourceId, "/home1/01437/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, wrfDescription, null, null , null)); @@ -1020,7 +1020,7 @@ public class RegisterSampleApplications { // monteXModuleCmds.add("module load uberftp"); monteXModuleCmds.add("module load fftw3"); - String monteXAppDeployId = airavataClient.registerApplicationDeployment( + String monteXAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(monteXModuleId, stampedeResourceId, "/home1/00421/ccguser/apps/tinker/tinker/bin/monte.x", ApplicationParallelismType.OPENMP, monteXDescription, monteXModuleCmds, null, null)); @@ -1035,28 +1035,28 @@ public class RegisterSampleApplications { System.out.println("#### Registering Application Deployments on Trestles #### \n"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/echo_wrapper.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null, null)); System.out.println("Echo on trestles deployment Id " + echoAppDeployId); //Register Amber - String amberAppDeployId = airavataClient.registerApplicationDeployment( + String amberAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(amberModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.MPI, amberDescription, null, null, null)); System.out.println("Amber on trestles deployment Id " + amberAppDeployId); //Register GROMACS - String gromacsAppDeployId = airavataClient.registerApplicationDeployment( + String gromacsAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gromacsModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/gromacs_wrapper.sh", ApplicationParallelismType.MPI, gromacsDescription, null, null, null)); System.out.println("GROMACS on trestles deployment Id " + gromacsAppDeployId); //Register LAMMPS - String lammpsAppDeployId = airavataClient.registerApplicationDeployment( + String lammpsAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/lammps_wrapper.sh", ApplicationParallelismType.MPI, lammpsDescription, null, null , null)); @@ -1065,7 +1065,7 @@ public class RegisterSampleApplications { //Register GAMESS List<String> moduleLoadCmd = new ArrayList<String>(); moduleLoadCmd.add("module load gamess"); - String gamessAppDeployId = airavataClient.registerApplicationDeployment( + String gamessAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gamessModuleId, trestlesResourceId, "/opt/gamess/rungms", ApplicationParallelismType.MPI, gamessDescription, moduleLoadCmd, null,null)); @@ -1074,7 +1074,7 @@ public class RegisterSampleApplications { List<String> gaussianMouldes = new ArrayList<String>(); gaussianMouldes.add("module load gaussian"); - String gaussianAppDeployId = airavataClient.registerApplicationDeployment( + String gaussianAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gaussianModuleId, trestlesResourceId, "g09", ApplicationParallelismType.OPENMP, gaussianDescription, gaussianMouldes , null, null)); System.out.println("Gaussian on trestles deployment Id " + gaussianAppDeployId); @@ -1089,21 +1089,21 @@ public class RegisterSampleApplications { System.out.println("#### Registering Application Deployments on BigRed II #### \n"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, bigredResourceId, "/N/u/cgateway/BigRed2/production/app_wrappers/echo_wrapper.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null, null)); System.out.println("Echo on bigredII deployment Id " + echoAppDeployId); //Register Amber - String amberAppDeployId = airavataClient.registerApplicationDeployment( + String amberAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(amberModuleId, bigredResourceId, "/N/u/cgateway/BigRed2/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.MPI, amberDescription, null, null, null)); System.out.println("Amber on bigredII deployment Id " + amberAppDeployId); //Register AutoDock - String autoDockDeployId = airavataClient.registerApplicationDeployment( + String autoDockDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(autoDockModuleId, bigredResourceId, "/N/u/cgateway/BigRed2/production/app_wrappers/auto_dock_wrapper.sh", ApplicationParallelismType.MPI, autoDockDescription, null, null, null)); @@ -1133,13 +1133,13 @@ public class RegisterSampleApplications { System.out.println("#### Registering Application Deployments on FSD #### \n"); //Register Echo - String echoAppDeployId = airavataClient.registerApplicationDeployment( + String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, fsdResourceId, "/bin/echo", ApplicationParallelismType.SERIAL, echoDescription, null, null, null)); System.out.println("Echo on FSD deployment Id: " + echoAppDeployId); //Register MPI - String mpiAppDeployId = airavataClient.registerApplicationDeployment( + String mpiAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(mpiModuleId, fsdResourceId, "/home/bes/hellompi", ApplicationParallelismType.OPENMP_MPI, mpiDescription, null, null, null)); System.out.println("MPI on FSD deployment Id: " + mpiAppDeployId);
