using storage preferences and resources in gfac
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b9baeeb8 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b9baeeb8 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b9baeeb8 Branch: refs/heads/master Commit: b9baeeb8828ebbd846c344adf9630d1ba9274899 Parents: 1f03378 Author: Chathuri Wimalasena <[email protected]> Authored: Tue Nov 24 12:16:48 2015 -0500 Committer: scnakandala <[email protected]> Committed: Tue Dec 15 21:08:46 2015 -0500 ---------------------------------------------------------------------- .../apache/airavata/gfac/impl/task/SCPDataStageTask.java | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/b9baeeb8/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java index 5437717..ef34be2 100644 --- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java +++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java @@ -164,6 +164,17 @@ public class SCPDataStageTask implements Task { inputPath = storagePreference.getFileSystemRootLocation(); } + StorageResourceDescription storageResource = taskContext.getParentProcessContext().getStorageResource(); + StoragePreference storagePreference = taskContext.getParentProcessContext().getStoragePreference(); + if (storageResource != null){ + hostName = storageResource.getHostName(); + } + + if (storagePreference != null){ + userName = storagePreference.getLoginUserName(); + inputPath = storagePreference.getFileSystemRootLocation(); + } + ServerInfo serverInfo = new ServerInfo(userName, hostName, DEFAULT_SSH_PORT); Session sshSession = Factory.getSSHSession(authenticationInfo, serverInfo); if (processState == ProcessState.INPUT_DATA_STAGING) {
