airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airavata-mft] machristie commented on a change in pull request #28: Fixes for refactored storages api
Date Tue, 09 Feb 2021 22:57:10 GMT

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:
users@infra.apache.org



Mime
View raw message