airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject git commit: Using the simpler CPI method to fetch resource names
Date Thu, 10 Jul 2014 01:41:55 GMT
Repository: airavata
Updated Branches:
  refs/heads/master bee906831 -> 567437a27


Using the simpler CPI method to fetch resource names


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

Branch: refs/heads/master
Commit: 567437a27d8540495e8e5ff62d94f7d0884d991e
Parents: bee9068
Author: Suresh Marru <smarru@apache.org>
Authored: Wed Jul 9 21:41:48 2014 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Wed Jul 9 21:41:48 2014 -0400

----------------------------------------------------------------------
 .../api/server/handler/AiravataServerHandler.java  | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/567437a2/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 967294a..3547100 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
@@ -1365,8 +1365,8 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher
{
             appCatalog = AppCatalogFactory.getAppCatalog();
             Map<String, String> filters = new HashMap<String, String>();
             filters.put(AbstractResource.ApplicationDeploymentConstants.APP_MODULE_ID, appModuleId);
-            List<ApplicationDeploymentDescription> applicationDeployements = appCatalog.getApplicationDeployment().getApplicationDeployements(filters);
-            for (ApplicationDeploymentDescription description : applicationDeployements){
+            List<ApplicationDeploymentDescription> applicationDeployments = appCatalog.getApplicationDeployment().getApplicationDeployements(filters);
+            for (ApplicationDeploymentDescription description : applicationDeployments){
                 appDeployments.add(description.getAppDeploymentId());
             }
             return appDeployments;
@@ -1572,8 +1572,8 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher
{
             if (applicationModules != null && !applicationModules.isEmpty()){
                 for (String moduleId : applicationModules) {
                     filters.put(AbstractResource.ApplicationDeploymentConstants.APP_MODULE_ID,
moduleId);
-                    List<ApplicationDeploymentDescription> applicationDeployements
= applicationDeployment.getApplicationDeployements(filters);
-                    for (ApplicationDeploymentDescription deploymentDescription : applicationDeployements)
{
+                    List<ApplicationDeploymentDescription> applicationDeployments =
applicationDeployment.getApplicationDeployements(filters);
+                    for (ApplicationDeploymentDescription deploymentDescription : applicationDeployments)
{
                         if (!computeResourceIdList.contains(deploymentDescription.getComputeHostId())){
                             computeResourceIdList.add(deploymentDescription.getComputeHostId());
                         }
@@ -1643,14 +1643,7 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher
{
     public Map<String, String> getAllComputeResourceNames() throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
         try {
             appCatalog = AppCatalogFactory.getAppCatalog();
-            List<ComputeResourceDescription> allComputeResourceList = appCatalog.getComputeResource().getAllComputeResourceList();
-            Map<String, String> allComputeResources = new HashMap<String, String>();
-            if (allComputeResourceList != null && !allComputeResourceList.isEmpty()){
-                for (ComputeResourceDescription resourceDescription : allComputeResourceList){
-                    allComputeResources.put(resourceDescription.getComputeResourceId(), resourceDescription.getHostName());
-                }
-            }
-            return allComputeResources;
+            return appCatalog.getComputeResource().getAllComputeResourceIdList();
         } catch (AppCatalogException e) {
             logger.error("Error while retrieving compute resource...", e);
             AiravataSystemException exception = new AiravataSystemException();


Mime
View raw message