airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [airavata-mft] machristie commented on a change in pull request #28: Fixes for refactored storages api
Date Thu, 04 Feb 2021 19:27:34 GMT

machristie commented on a change in pull request #28:

File path: transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/
@@ -203,17 +204,17 @@ public DirectoryResourceMetadata getDirectoryResourceMetadata(String
-    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,
-        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,
         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:
       I discussed with @DImuthuUpe and decided that the childPath should be the full path.
Actually, the childPath value passed should be the same as the resourcePath returned for that
resource when the listing was returned for the parent.  That is, the API client can call getDirectoryResourceMetadata
and take the resourcePath for each returned directory and then call getDirectoryResourceMetadata
with that resourcePath as the childPath value.

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:

View raw message