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 2022/05/05 01:08:33 UTC
[airavata-mft] branch master updated: Adding Swift storage fetch feature for generic resources
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
The following commit(s) were added to refs/heads/master by this push:
new 39db7d2 Adding Swift storage fetch feature for generic resources
39db7d2 is described below
commit 39db7d21e89e2aaf57e441fca0239e0c54784157
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Wed May 4 21:08:25 2022 -0400
Adding Swift storage fetch feature for generic resources
---
.../mft/resource/server/backend/sql/SQLResourceBackend.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/services/resource-service/server/src/main/java/org/apache/airavata/mft/resource/server/backend/sql/SQLResourceBackend.java b/services/resource-service/server/src/main/java/org/apache/airavata/mft/resource/server/backend/sql/SQLResourceBackend.java
index 5194a21..d2b28c4 100644
--- a/services/resource-service/server/src/main/java/org/apache/airavata/mft/resource/server/backend/sql/SQLResourceBackend.java
+++ b/services/resource-service/server/src/main/java/org/apache/airavata/mft/resource/server/backend/sql/SQLResourceBackend.java
@@ -140,6 +140,12 @@ public class SQLResourceBackend implements ResourceBackend {
builder.setAzureStorage(azureStorage.orElseThrow(() -> new Exception("Could not find a Azure storage with id "
+ resourceEty.getStorageId() + " for resource " + resourceEty.getResourceId())));
break;
+ case SWIFT:
+ Optional<SwiftStorage> swiftStorage = getSwiftStorage(SwiftStorageGetRequest.newBuilder()
+ .setStorageId(resourceEty.getStorageId()).build());
+ builder.setSwiftStorage(swiftStorage.orElseThrow(() -> new Exception("Could not find a Swift storage with id "
+ + resourceEty.getStorageId() + " for resource " + resourceEty.getResourceId())));
+ break;
}
return builder.build();