airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: fixing GFACSSHUtils.java
Date Wed, 20 Aug 2014 12:21:14 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 3a927d855 -> 5bdb49d77


fixing GFACSSHUtils.java


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

Branch: refs/heads/master
Commit: 5bdb49d7716461fcb1e70180ac0315eef3ee7442
Parents: 3a927d8
Author: lahiru <lahiru@apache.org>
Authored: Wed Aug 20 17:51:01 2014 +0530
Committer: lahiru <lahiru@apache.org>
Committed: Wed Aug 20 17:51:01 2014 +0530

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5bdb49d7/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 3753f97..ab1896e 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -57,10 +57,10 @@ public class GFACSSHUtils {
 
     public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws
GFacException, ApplicationSettingsException {
         HostDescription registeredHost = jobExecutionContext.getApplicationContext().getHostDescription();
-        if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType()
instanceof UnicoreHostType
-                || registeredHost.getType() instanceof GsisshHostType) {
+        if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType()
instanceof UnicoreHostType) {
             logger.error("This is a wrong method to invoke to non ssh host types,please check
your gfac-config.xml");
-        } else if (registeredHost.getType() instanceof SSHHostType) {
+        } else if (registeredHost.getType() instanceof SSHHostType
+                || registeredHost.getType() instanceof GsisshHostType) {
             SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
             String credentialStoreToken = jobExecutionContext.getCredentialStoreToken();
// this is set by the framework
             RequestData requestData = new RequestData(ServerSettings.getDefaultUserGateway());
@@ -71,10 +71,10 @@ public class GFACSSHUtils {
             Cluster pbsCluster = null;
             try {
                 TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
-                String installedParentPath = "/";
-                if (((SSHHostType) registeredHost.getType()).getHpcResource()) {
-                    installedParentPath = ((HpcApplicationDeploymentType)
+                String installedParentPath = ((HpcApplicationDeploymentType)
                             jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType()).getInstalledParentPath();
+                if(installedParentPath== null) {
+                    installedParentPath = "/";
                 }
                 SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();// this
is just a call to get and set credentials in to this object,data will be used
                 serverInfo.setUserName(credentials.getPortalUserName());


Mime
View raw message