You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/10/13 18:33:21 UTC
[28/30] airavata git commit: Adding Airavata Api level changes
associated with last commit
Adding Airavata Api level changes associated with last commit
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8e59d800
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8e59d800
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8e59d800
Branch: refs/heads/develop
Commit: 8e59d800f4bf6984d1c84d9f940161a0ba218638
Parents: ac76936
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 13:08:58 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 13:08:58 2016 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 28 +
.../java/org/apache/airavata/api/Airavata.java | 8473 ++++++++++--------
.../airavata-apis/airavata_api.thrift | 23 +
3 files changed, 5033 insertions(+), 3491 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e59d800/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 9441119..0b61e0f 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
@@ -516,6 +516,34 @@ public class AiravataServerHandler implements Airavata.Iface {
}
@Override
+ public List<CredentialSummary> getAllSSHPubKeysSummaryForUserInGateway(AuthzToken authzToken, String gatewayId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+ try {
+ List<CredentialSummary> allCredentialSummaries = new ArrayList<>();
+ if (csClient == null){
+ csClient = getCredentialStoreServiceClient();
+ }
+ List<SSHCredentialSummary> sshSummaryListForUser = csClient.getAllSSHCredentialSummaryForUserInGateway(gatewayId,userId);
+ for(SSHCredentialSummary key : sshSummaryListForUser){
+ CredentialSummary userPubKeySummary = new CredentialSummary();
+ userPubKeySummary.setGatewayId(key.getGatewayId());
+ userPubKeySummary.setUsername(key.getUsername());
+ userPubKeySummary.setPublicKey(key.getPublicKey());
+ userPubKeySummary.setDescription(key.getDescription());
+ userPubKeySummary.setPersistedTime(key.getPersistedTime());
+ allCredentialSummaries.add(userPubKeySummary);
+ }
+ logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId + " & user ID : " +userId);
+ return allCredentialSummaries;
+ }catch (Exception e){
+ logger.error("Error occurred while retrieving SSH public keys summaries for user : " + userId , e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error occurred while retrieving SSH public keys summaries for user : " + userId + ". More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
+ @Override
@SecurityCheck
public Map<String, String> getAllGatewayPWDCredentials(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {