airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [21/31] airavata git commit: correcting the registry code, testing not yet complete
Date Fri, 07 Oct 2016 20:52:48 GMT
correcting the registry code, testing not yet complete


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

Branch: refs/heads/develop
Commit: 8469effce22ffe3a54255d3920ee33b9d9035c06
Parents: 81c6ea8
Author: Anuj Bhandar <bhandar.anuj@gmail.com>
Authored: Fri Oct 7 11:48:58 2016 -0400
Committer: Anuj Bhandar <bhandar.anuj@gmail.com>
Committed: Fri Oct 7 11:48:58 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    41 +-
 .../java/org/apache/airavata/api/Airavata.java  | 39895 +++++++++--------
 .../main/resources/lib/airavata/Airavata.cpp    | 26659 +++++++----
 .../src/main/resources/lib/airavata/Airavata.h  |  2449 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |   282 +-
 .../resources/lib/airavata/airavata_api_types.h |     1 +
 .../resources/lib/airavata/job_model_types.cpp  |    30 +-
 .../resources/lib/airavata/job_model_types.h    |    12 +-
 .../lib/airavata/process_model_types.cpp        |    60 +-
 .../lib/airavata/process_model_types.h          |    22 +-
 .../resources/lib/airavata/task_model_types.cpp |    60 +-
 .../resources/lib/airavata/task_model_types.h   |    18 +-
 .../user_resource_profile_model_constants.cpp   |    34 +
 .../user_resource_profile_model_constants.h     |    41 +
 .../user_resource_profile_model_types.cpp       |   714 +
 .../user_resource_profile_model_types.h         |   321 +
 .../resources/lib/Airavata/API/Airavata.php     | 17440 ++++---
 .../lib/Airavata/Model/Process/Types.php        |    44 +-
 .../resources/lib/Airavata/Model/Task/Types.php |    44 +-
 .../lib/apache/airavata/api/Airavata-remote     |    91 +
 .../lib/apache/airavata/api/Airavata.py         | 15318 ++++---
 .../resources/lib/apache/airavata/api/ttypes.py |     1 +
 .../lib/apache/airavata/model/job/ttypes.py     |    22 +-
 .../lib/apache/airavata/model/process/ttypes.py |    42 +-
 .../lib/apache/airavata/model/task/ttypes.py    |    46 +-
 .../catalog/impl/UsrResourceProfileImpl.java    |    65 +-
 .../model/UserComputeResourcePreference.java    |    17 +-
 .../model/UserComputeResourcePreferencePK.java  |    12 +-
 .../app/catalog/model/UserResourceProfile.java  |     7 +-
 .../catalog/model/UserStoragePreference.java    |    15 +-
 .../catalog/model/UserStoragePreferencePK.java  |     9 -
 .../resources/AppCatAbstractResource.java       |    20 +-
 .../UserComputeHostPreferenceResource.java      |    76 +-
 .../resources/UserResourceProfileResource.java  |    63 +-
 .../UserStoragePreferenceResource.java          |    71 +-
 .../app/catalog/util/AppCatalogJPAUtils.java    |    72 +
 .../experiment/catalog/ExpCatResourceUtils.java |    12 +-
 .../src/main/resources/META-INF/persistence.xml |     3 +
 .../app/catalog/UserResourceProfileTest.java    |   121 +
 .../registry/cpi/UsrResourceProfile.java        |     3 +
 .../service/handler/RegistryServerHandler.java  |   566 +-
 .../airavata/registry/api/RegistryService.java  |  6585 ++-
 .../api/exception/RegistryServiceException.java |     2 +-
 .../airavata-apis/airavata_api.thrift           |    47 +
 .../component-cpis/registry-api.thrift          |    34 +
 45 files changed, 69095 insertions(+), 42392 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8469effc/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 3f7773f..9520246 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
@@ -3281,7 +3281,7 @@ public class AiravataServerHandler implements Airavata.Iface {
      */
     @Override
     @SecurityCheck
-    public ComputeResourcePreference getUserComputeResourcePreference(AuthzToken authzToken,
String userId, String gatewayID, String userComputeResourceId)
+    public UserComputeResourcePreference getUserComputeResourcePreference(AuthzToken authzToken,
String userId, String gatewayID, String userComputeResourceId)
             throws InvalidRequestException, AiravataClientException, AiravataSystemException,
AuthorizationException, TException {
         try {
             return getRegistryServiceClient().getUserComputeResourcePreference(userId, gatewayID,
userComputeResourceId);
@@ -3296,7 +3296,7 @@ public class AiravataServerHandler implements Airavata.Iface {
 
     @Override
     @SecurityCheck
-    public StoragePreference getUserStoragePreference(AuthzToken authzToken, String userId,
String gatewayID, String userStorageId) throws InvalidRequestException, AiravataClientException,
AiravataSystemException, AuthorizationException, TException {
+    public UserStoragePreference getUserStoragePreference(AuthzToken authzToken, String userId,
String gatewayID, String userStorageId) throws InvalidRequestException, AiravataClientException,
AiravataSystemException, AuthorizationException, TException {
         try {
             return getRegistryServiceClient().getUserStoragePreference(userId, gatewayID,
userStorageId);
         } catch (ApplicationSettingsException | RegistryServiceException e) {
@@ -3308,6 +3308,43 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    /**
+     * Fetch all User Compute Resource Preferences of a registered gateway profile.
+     *
+     * @param userId
+     * @param gatewayID The identifier for the gateway profile to be requested
+     * @return computeResourcePreference
+     * Returns the ComputeResourcePreference object.
+     */
+    @Override
+    @SecurityCheck
+    public List<UserComputeResourcePreference> getAllUserComputeResourcePreferences(AuthzToken
authzToken, String userId, String gatewayID)
+            throws InvalidRequestException, AiravataClientException, AiravataSystemException,
AuthorizationException, TException {
+        try {
+            return getRegistryServiceClient().getAllUserComputeResourcePreferences(userId,
gatewayID);
+        } catch (ApplicationSettingsException | RegistryServiceException e) {
+            logger.error(userId, "Error while reading User compute resource preferences...",
e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while reading User compute resource preferences.
More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
+    @SecurityCheck
+    public List<UserStoragePreference> getAllUserStoragePreferences(AuthzToken authzToken,
String userId, String gatewayID) throws InvalidRequestException, AiravataClientException,
AiravataSystemException, AuthorizationException, TException {
+        try {
+            return getRegistryServiceClient().getAllUserStoragePreferences(userId, gatewayID);
+        } catch (ApplicationSettingsException | RegistryServiceException e) {
+            logger.error(userId, "Error while reading User data storage preferences...",
e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error while reading User data storage preferences. More
info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
     @Override
     @SecurityCheck
     public List<UserResourceProfile> getAllUserResourceProfiles(AuthzToken authzToken)
throws InvalidRequestException,


Mime
View raw message