airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [02/13] airavata git commit: hard coded security protocol - AIRAVATA-1584
Date Wed, 25 Feb 2015 06:09:43 GMT
hard coded security protocol - AIRAVATA-1584


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

Branch: refs/heads/queue-gfac-rabbitmq
Commit: 350441038b7eb6c6f8ce704fee5c47100da07ce4
Parents: 32f10d1
Author: chathuriw <kamalasini@gmail.com>
Authored: Tue Feb 24 14:43:48 2015 -0500
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Feb 24 14:43:48 2015 -0500

----------------------------------------------------------------------
 .../catalog/data/impl/ComputeResourceImpl.java       | 15 +++++++++------
 .../data/util/AppCatalogThriftConversion.java        |  9 +++++++--
 2 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/35044103/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 4968a56..75b0987 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -206,12 +206,15 @@ public class ComputeResourceImpl implements ComputeResource {
 	public String addUNICOREJobSubmission(UnicoreJobSubmission unicoreJobSubmission)
 			throws AppCatalogException {
 		 try {
-			 	unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE"));
-			 	UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission);
-			 	resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL());
-			 	resource.save();
-	            return resource.getjobSubmissionInterfaceId();
-	        }catch (Exception e){
+             unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE"));
+             UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission);
+             resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL());
+             if (unicoreJobSubmission.getSecurityProtocol() !=  null){
+                 resource.setSecurityProtocol(unicoreJobSubmission.getSecurityProtocol().toString());
+             }
+             resource.save();
+             return resource.getjobSubmissionInterfaceId();
+         }catch (Exception e){
 	            logger.error("Error while retrieving SSH Job Submission...", e);
 	            throw new AppCatalogException(e);
 	        }

http://git-wip-us.apache.org/repos/asf/airavata/blob/35044103/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index aef23ae..904c215 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -337,7 +337,10 @@ public class AppCatalogThriftConversion {
     	UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
     	unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl());
     	unicoreJobSubmission.setJobSubmissionInterfaceId(submission.getjobSubmissionInterfaceId());
-    	unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        if (submission.getSecurityProtocol() != null){
+            unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
+        }
+
         return unicoreJobSubmission;
     }
 
@@ -345,7 +348,9 @@ public class AppCatalogThriftConversion {
         UnicoreDataMovement dataMovement = new UnicoreDataMovement();
         dataMovement.setUnicoreEndPointURL(resource.getUnicoreEndpointUrl());
         dataMovement.setDataMovementInterfaceId(resource.getDataMovementId());
-        dataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        if (resource.getSecurityProtocol() != null){
+            dataMovement.setSecurityProtocol(SecurityProtocol.valueOf(resource.getSecurityProtocol()));
+        }
         return dataMovement;
     }
 


Mime
View raw message