You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2021/02/18 18:47:14 UTC
[airavata-mft] branch master updated (979800e -> 13ff874)
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git.
from 979800e Upgrade sshj to 0.27 to fix "Unrecognized PKCS5 key type: OPENSSH" error
new 539d631 Fixes for refactored storages api
new 92eebea Fixing resourcePath when there is childPath
new 3d96e11 Fix getFileResourceMetadata
new 13ff874 Switch back to resource based metadata retrieval
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../airavata/mft/core/api/MetadataCollector.java | 27 +++++++++++++---------
.../transport/azure/AzureMetadataCollector.java | 4 ++--
.../mft/transport/box/BoxMetadataCollector.java | 4 ++--
.../dropbox/DropboxMetadataCollector.java | 4 ++--
.../mft/transport/ftp/FTPMetadataCollector.java | 4 ++--
.../mft/transport/gcp/GCSMetadataCollector.java | 4 ++--
.../transport/local/LocalMetadataCollector.java | 4 ++--
.../mft/transport/s3/S3MetadataCollector.java | 4 ++--
.../mft/transport/scp/SCPMetadataCollector.java | 22 +++++++++---------
9 files changed, 41 insertions(+), 36 deletions(-)
[airavata-mft] 01/04: Fixes for refactored storages api
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
commit 539d63111cc764b3032acca100a8578c1a7dfb08
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Feb 2 16:22:02 2021 -0500
Fixes for refactored storages api
---
.../airavata/mft/transport/scp/SCPMetadataCollector.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
index ac09acb..ffdbf8b 100644
--- a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
+++ b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
@@ -50,6 +50,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -203,17 +204,17 @@ public class SCPMetadataCollector implements MetadataCollector {
}
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String resourceId, String resourcePath, String credentialToken) throws Exception {
ResourceServiceClient resourceClient = ResourceServiceClientBuilder.buildClient(resourceServiceHost, resourceServicePort);
- SCPStorage scpStorage = resourceClient.scp().getSCPStorage(SCPStorageGetRequest.newBuilder().setStorageId(storageId).build());
+ SCPResource scpPResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(resourceId).build());
SecretServiceClient secretClient = SecretServiceClientBuilder.buildClient(secretServiceHost, secretServicePort);
SCPSecret scpSecret = secretClient.scp().getSCPSecret(SCPSecretGetRequest.newBuilder().setSecretId(credentialToken).build());
-
- SCPResource scpResource = SCPResource.newBuilder().setScpStorage(scpStorage)
- .setDirectory(DirectoryResource.newBuilder()
- .setResourcePath(resourcePath).build()).build();
+ String childPath = Paths.get(scpPResource.getDirectory().getResourcePath(), resourcePath).toString();
+ SCPResource scpResource = SCPResource.newBuilder()
+ .setDirectory(DirectoryResource.newBuilder().setResourcePath(childPath).build())
+ .setScpStorage(scpPResource.getScpStorage()).build();
return getDirectoryResourceMetadata(scpResource, scpSecret);
}
[airavata-mft] 04/04: Switch back to resource based metadata
retrieval
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
commit 13ff87466309db6d0998d829776e395ab06ee2ca
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Feb 17 16:38:32 2021 -0500
Switch back to resource based metadata retrieval
---
.../airavata/mft/core/api/MetadataCollector.java | 27 +++++++++++++---------
.../transport/azure/AzureMetadataCollector.java | 4 ++--
.../mft/transport/box/BoxMetadataCollector.java | 4 ++--
.../dropbox/DropboxMetadataCollector.java | 4 ++--
.../mft/transport/ftp/FTPMetadataCollector.java | 4 ++--
.../mft/transport/gcp/GCSMetadataCollector.java | 4 ++--
.../transport/local/LocalMetadataCollector.java | 4 ++--
.../mft/transport/s3/S3MetadataCollector.java | 4 ++--
.../mft/transport/scp/SCPMetadataCollector.java | 8 +++----
9 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/core/src/main/java/org/apache/airavata/mft/core/api/MetadataCollector.java b/core/src/main/java/org/apache/airavata/mft/core/api/MetadataCollector.java
index 38a5529..761861f 100644
--- a/core/src/main/java/org/apache/airavata/mft/core/api/MetadataCollector.java
+++ b/core/src/main/java/org/apache/airavata/mft/core/api/MetadataCollector.java
@@ -42,16 +42,18 @@ public interface MetadataCollector {
*/
public FileResourceMetadata getFileResourceMetadata(String resourceId, String credentialToken) throws Exception;
- /**
- * Fetches a metadata of given File Resource
+ /*
+ * Fetches a metadata of given File Resource inside a registered directory resource. Target file might be living in
+ * multiple level below the parent directory
*
- * @param storageId id of the storage resource
- * @param resourcePath resource path
+ * @param parentResourceId parent directory resource id
+ * @param resourcePath path of the target resource. This should be a child path of the parent resource
* @param credentialToken credential token for the resource
* @return an object of {@link FileResourceMetadata}
- * @throws Exception if the resource id is not a File Resource type or the resource can't be fetched from the resource service
+ * @throws Exception if the parent resource is not a Directory resource or the target resource is not a File Resource type
+ * or the resource can't be fetched from the resource service
*/
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception;
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception;
/**
* Fetches a metadata of given Directory Resource
@@ -64,14 +66,17 @@ public interface MetadataCollector {
public DirectoryResourceMetadata getDirectoryResourceMetadata(String resourceId, String credentialToken) throws Exception;
/**
- * Fetches a metadata of given Directory Resource
+ * Fetches a metadata of given Directory Resource inside a registered directory resource. Target directory might be living in
+ * multiple level below the parent directory
*
- * @param storageId id of the storage resource
- * @param resourcePath resource path
+ * @param parentResourceId parent directory resource id
+ * @param resourcePath path of the target resource. This should be a child path of the parent resource
+ * @param credentialToken credential token for the resource
* @return an object of {@link DirectoryResourceMetadata}
- * @throws Exception if the resource id is not a Directory Resource type or the resource can't be fetched from the resource service
+ * @throws Exception if the parent resource is not a Directory resource or the target resource is not a Directory Resource type
+ * or the resource can't be fetched from the resource service
*/
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception;
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception;
/**
* Check whether the resource is available in the actual storage
diff --git a/transport/azure-transport/src/main/java/org/apache/airavata/mft/transport/azure/AzureMetadataCollector.java b/transport/azure-transport/src/main/java/org/apache/airavata/mft/transport/azure/AzureMetadataCollector.java
index 76a6f13..e043dc2 100644
--- a/transport/azure-transport/src/main/java/org/apache/airavata/mft/transport/azure/AzureMetadataCollector.java
+++ b/transport/azure-transport/src/main/java/org/apache/airavata/mft/transport/azure/AzureMetadataCollector.java
@@ -98,7 +98,7 @@ public class AzureMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -107,7 +107,7 @@ public class AzureMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/box-transport/src/main/java/org/apache/airavata/mft/transport/box/BoxMetadataCollector.java b/transport/box-transport/src/main/java/org/apache/airavata/mft/transport/box/BoxMetadataCollector.java
index 5e77e72..6d597a0 100644
--- a/transport/box-transport/src/main/java/org/apache/airavata/mft/transport/box/BoxMetadataCollector.java
+++ b/transport/box-transport/src/main/java/org/apache/airavata/mft/transport/box/BoxMetadataCollector.java
@@ -87,7 +87,7 @@ public class BoxMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -96,7 +96,7 @@ public class BoxMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/dropbox-transport/src/main/java/org/apache/airavata/mft/transport/dropbox/DropboxMetadataCollector.java b/transport/dropbox-transport/src/main/java/org/apache/airavata/mft/transport/dropbox/DropboxMetadataCollector.java
index 2d00e10..14f040d 100644
--- a/transport/dropbox-transport/src/main/java/org/apache/airavata/mft/transport/dropbox/DropboxMetadataCollector.java
+++ b/transport/dropbox-transport/src/main/java/org/apache/airavata/mft/transport/dropbox/DropboxMetadataCollector.java
@@ -81,7 +81,7 @@ public class DropboxMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -90,7 +90,7 @@ public class DropboxMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/ftp-transport/src/main/java/org/apache/airavata/mft/transport/ftp/FTPMetadataCollector.java b/transport/ftp-transport/src/main/java/org/apache/airavata/mft/transport/ftp/FTPMetadataCollector.java
index 5f6f7af..cdd8ae0 100644
--- a/transport/ftp-transport/src/main/java/org/apache/airavata/mft/transport/ftp/FTPMetadataCollector.java
+++ b/transport/ftp-transport/src/main/java/org/apache/airavata/mft/transport/ftp/FTPMetadataCollector.java
@@ -102,7 +102,7 @@ public class FTPMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -111,7 +111,7 @@ public class FTPMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/gcp-transport/src/main/java/org/apache/airavata/mft/transport/gcp/GCSMetadataCollector.java b/transport/gcp-transport/src/main/java/org/apache/airavata/mft/transport/gcp/GCSMetadataCollector.java
index 0d1a1a8..c753c0f 100644
--- a/transport/gcp-transport/src/main/java/org/apache/airavata/mft/transport/gcp/GCSMetadataCollector.java
+++ b/transport/gcp-transport/src/main/java/org/apache/airavata/mft/transport/gcp/GCSMetadataCollector.java
@@ -102,7 +102,7 @@ public class GCSMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -111,7 +111,7 @@ public class GCSMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/local-transport/src/main/java/org/apache/airavata/mft/transport/local/LocalMetadataCollector.java b/transport/local-transport/src/main/java/org/apache/airavata/mft/transport/local/LocalMetadataCollector.java
index 9faa70a..191a677 100644
--- a/transport/local-transport/src/main/java/org/apache/airavata/mft/transport/local/LocalMetadataCollector.java
+++ b/transport/local-transport/src/main/java/org/apache/airavata/mft/transport/local/LocalMetadataCollector.java
@@ -95,7 +95,7 @@ public class LocalMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -104,7 +104,7 @@ public class LocalMetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3MetadataCollector.java b/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3MetadataCollector.java
index 58be5b6..741bd2f 100644
--- a/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3MetadataCollector.java
+++ b/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3MetadataCollector.java
@@ -88,7 +88,7 @@ public class S3MetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
@@ -97,7 +97,7 @@ public class S3MetadataCollector implements MetadataCollector {
throw new UnsupportedOperationException("Method not implemented"); }
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
throw new UnsupportedOperationException("Method not implemented");
}
diff --git a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
index aa6f159..5759791 100644
--- a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
+++ b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
@@ -133,9 +133,9 @@ public class SCPMetadataCollector implements MetadataCollector {
}
@Override
- public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
+ public FileResourceMetadata getFileResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
ResourceServiceClient resourceClient = ResourceServiceClientBuilder.buildClient(resourceServiceHost, resourceServicePort);
- SCPResource scpResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(storageId).build());
+ SCPResource scpResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(parentResourceId).build());
SecretServiceClient secretClient = SecretServiceClientBuilder.buildClient(secretServiceHost, secretServicePort);
SCPSecret scpSecret = secretClient.scp().getSCPSecret(SCPSecretGetRequest.newBuilder().setSecretId(credentialToken).build());
@@ -204,9 +204,9 @@ public class SCPMetadataCollector implements MetadataCollector {
}
@Override
- public DirectoryResourceMetadata getDirectoryResourceMetadata(String resourceId, String resourcePath, String credentialToken) throws Exception {
+ public DirectoryResourceMetadata getDirectoryResourceMetadata(String parentResourceId, String resourcePath, String credentialToken) throws Exception {
ResourceServiceClient resourceClient = ResourceServiceClientBuilder.buildClient(resourceServiceHost, resourceServicePort);
- SCPResource scpPResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(resourceId).build());
+ SCPResource scpPResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(parentResourceId).build());
SecretServiceClient secretClient = SecretServiceClientBuilder.buildClient(secretServiceHost, secretServicePort);
SCPSecret scpSecret = secretClient.scp().getSCPSecret(SCPSecretGetRequest.newBuilder().setSecretId(credentialToken).build());
[airavata-mft] 03/04: Fix getFileResourceMetadata
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
commit 3d96e11b8b861b9e06a61bddcf3d448f71b22b16
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Thu Feb 11 15:39:49 2021 -0500
Fix getFileResourceMetadata
---
.../apache/airavata/mft/transport/scp/SCPMetadataCollector.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
index 1be5448..aa6f159 100644
--- a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
+++ b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
@@ -135,17 +135,17 @@ public class SCPMetadataCollector implements MetadataCollector {
@Override
public FileResourceMetadata getFileResourceMetadata(String storageId, String resourcePath, String credentialToken) throws Exception {
ResourceServiceClient resourceClient = ResourceServiceClientBuilder.buildClient(resourceServiceHost, resourceServicePort);
- SCPStorage scpStorage = resourceClient.scp().getSCPStorage(SCPStorageGetRequest.newBuilder().setStorageId(storageId).build());
+ SCPResource scpResource = resourceClient.scp().getSCPResource(SCPResourceGetRequest.newBuilder().setResourceId(storageId).build());
SecretServiceClient secretClient = SecretServiceClientBuilder.buildClient(secretServiceHost, secretServicePort);
SCPSecret scpSecret = secretClient.scp().getSCPSecret(SCPSecretGetRequest.newBuilder().setSecretId(credentialToken).build());
- SCPResource scpResource = SCPResource.newBuilder()
+ SCPResource scpResource2 = SCPResource.newBuilder()
.setFile(FileResource.newBuilder()
.setResourcePath(resourcePath).build())
- .setScpStorage(scpStorage).build();
+ .setScpStorage(scpResource.getScpStorage()).build();
- return getFileResourceMetadata(scpResource, scpSecret);
+ return getFileResourceMetadata(scpResource2, scpSecret);
}
private DirectoryResourceMetadata getDirectoryResourceMetadata(SCPResource scpResource, SCPSecret scpSecret) throws Exception {
[airavata-mft] 02/04: Fixing resourcePath when there is childPath
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
commit 92eebea38ddbfe1c444334ce5f7443587e179af8
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Feb 9 17:56:06 2021 -0500
Fixing resourcePath when there is childPath
`childPath` specified in FetchResourceMetadataRequest should be the
`resourcePath` for child directories as returned for the parent directory.
---
.../org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
index ffdbf8b..1be5448 100644
--- a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
+++ b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
@@ -211,9 +211,8 @@ public class SCPMetadataCollector implements MetadataCollector {
SecretServiceClient secretClient = SecretServiceClientBuilder.buildClient(secretServiceHost, secretServicePort);
SCPSecret scpSecret = secretClient.scp().getSCPSecret(SCPSecretGetRequest.newBuilder().setSecretId(credentialToken).build());
- String childPath = Paths.get(scpPResource.getDirectory().getResourcePath(), resourcePath).toString();
SCPResource scpResource = SCPResource.newBuilder()
- .setDirectory(DirectoryResource.newBuilder().setResourcePath(childPath).build())
+ .setDirectory(DirectoryResource.newBuilder().setResourcePath(resourcePath).build())
.setScpStorage(scpPResource.getScpStorage()).build();
return getDirectoryResourceMetadata(scpResource, scpSecret);