Skip to content
Permalink
Browse files
Merge pull request #34 from isururanawaka/workflow_merge_23_jul_2021
Bug fix in StoragePreference
  • Loading branch information
isururanawaka committed Aug 10, 2021
2 parents 49b9add + c837db5 commit f223cebdd4f3fa9b6108fa431810e7b45c6232e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
@@ -39,8 +39,8 @@ mft.clientSecret=rtgrtgrtgrtgt

custos.host=custos.scigap.org
custos.port=31499
custos.id=custos-whedmgamitu357p4wuke-10002708
custos.secret=mrMdl86Ia1H94cikW7CvHoh7L0ASNXQVt2aRzSIj
custos.id=custos-ii8g0cfwsz6ruwezykn9-10002640
custos.secret=OxXECszt9dL4lHJQyL444UOU0lKN317D51ez067R

drms.host=localhost
drms.port=7070
@@ -25,7 +25,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.boot.data.jpa}</version>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>

@@ -17,7 +17,6 @@
package org.apache.airavata.drms.api.handlers;

import com.google.protobuf.Empty;
import io.grpc.Status;
import io.grpc.stub.StreamObserver;
import org.apache.airavata.datalake.drms.AuthenticatedUser;
import org.apache.airavata.datalake.drms.storage.*;
@@ -26,7 +25,6 @@
import org.apache.airavata.drms.core.constants.StorageConstants;
import org.apache.airavata.drms.core.constants.StoragePreferenceConstants;
import org.apache.airavata.drms.core.deserializer.AnyStoragePreferenceDeserializer;
import org.apache.airavata.drms.core.deserializer.TransferMappingDeserializer;
import org.apache.airavata.drms.core.serializer.AnyStoragePreferenceSerializer;
import org.apache.airavata.drms.core.serializer.AnyStorageSerializer;
import org.apache.custos.clients.CustosClientProvider;
@@ -124,13 +122,17 @@ public void createStoragePreference(StoragePreferenceCreateRequest request, Stre
Map<String, Object> parentPropertiesMap = null;
if (storage.getStorageCase().equals(AnyStoragePreference.StorageCase.S3_STORAGE_PREFERENCE)) {
storageId = storage.getS3StoragePreference().getStorage().getStorageId();
serializedMap.put(StoragePreferenceConstants.STORAGE_PREFERENCE_TYPE_LABEL,
StoragePreferenceConstants.S3_STORAGE_PREFERENCE_TYPE_LABEL);
parentPropertiesMap = AnyStorageSerializer.serializeToMap(AnyStorage
.newBuilder().setS3Storage(storage.getS3StoragePreference().getStorage()).build());

} else if (storage.getStorageCase()
.equals(AnyStoragePreference.StorageCase.SSH_STORAGE_PREFERENCE)) {

storageId = storage.getSshStoragePreference().getStorage().getStorageId();
serializedMap.put(StoragePreferenceConstants.STORAGE_PREFERENCE_TYPE_LABEL,
StoragePreferenceConstants.SSH_STORAGE_PREFERENCE_TYPE_LABEL);
parentPropertiesMap = AnyStorageSerializer.serializeToMap(AnyStorage
.newBuilder().setSshStorage(storage.getSshStoragePreference().getStorage()).build());
}
@@ -286,7 +288,4 @@ public void searchStoragePreference(StoragePreferenceSearchRequest request, Stre
}





}

0 comments on commit f223ceb

Please sign in to comment.