machristie commented on a change in pull request #28:
URL: https://github.com/apache/airavata-mft/pull/28#discussion_r573307780



##########
File path: 
transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
##########
@@ -203,17 +204,17 @@ public DirectoryResourceMetadata 
getDirectoryResourceMetadata(String resourceId,
     }
 
     @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();

Review comment:
       @DImuthuUpe I've fixed the resourcePath to just be the received 
childPath, as we discussed last week.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to