You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/01/20 22:01:33 UTC

[3/3] airavata git commit: adding getAllGatewayProfiles

adding getAllGatewayProfiles


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

Branch: refs/heads/master
Commit: ea6de3712aeeacc5e8b1d701d12a1f885a8f5b16
Parents: 12bf4c5
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Jan 20 16:01:25 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Jan 20 16:01:25 2015 -0500

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    14 +
 .../java/org/apache/airavata/api/Airavata.java  | 25087 +++++++++--------
 .../main/resources/lib/airavata/Airavata.cpp    |   396 +-
 .../src/main/resources/lib/airavata/Airavata.h  |   143 +
 .../lib/airavata/Airavata_server.skeleton.cpp   |     5 +
 .../resources/lib/Airavata/API/Airavata.php     |   294 +-
 .../airavataAPI.thrift                          |    10 +
 .../appcatalog/cpi/GwyResourceProfile.java      |     1 +
 .../data/impl/GwyResourceProfileImpl.java       |    21 +
 .../data/resources/GatewayProfileResource.java  |    31 +-
 10 files changed, 13994 insertions(+), 12008 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ea6de371/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 c98850f..612fc8e 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
@@ -2585,6 +2585,20 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public List<GatewayResourceProfile> getAllGatewayComputeResources() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
+            return gatewayProfile.getAllGatewayProfiles();
+        } catch (AppCatalogException e) {
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while reading retrieving all gateway profiles. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Update a Compute Resource Preference to a registered gateway profile.
      *