bug fix #20505. New ServiceEndpoint with category Storage ##21245. Update to version 2.6.1-SNAPSHOT
This commit is contained in:
parent
59b841ba94
commit
e10b0d8012
|
@ -1,5 +1,8 @@
|
|||
# Changelog for storage-manager-wrapper
|
||||
|
||||
## [v2.6.1-SNAPSHOT] 2021-08-04
|
||||
* bug fix #20505
|
||||
|
||||
## [v2.6.0-SNAPSHOT] 2020-11-12
|
||||
|
||||
* adding new constructor with the backendType as input parameter
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.contentmanagement</groupId>
|
||||
<artifactId>storage-manager-wrapper</artifactId>
|
||||
<version>2.6.0-SNAPSHOT</version>
|
||||
<version>2.6.1-SNAPSHOT</version>
|
||||
<scm>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
|
||||
|
|
|
@ -63,7 +63,7 @@ public class ISClientConnector {
|
|||
ScopeProvider.instance.set(scope);
|
||||
}
|
||||
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
query.addCondition("$resource/Profile/Category/text() eq 'DataStorage' and $resource/Profile/Name eq 'StorageManager' ");
|
||||
query.addCondition("$resource/Profile/Category/text() eq 'Storage' and $resource/Profile/Name eq 'StorageManager' ");
|
||||
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
|
||||
List<ServiceEndpoint> resources = client.submit(query);
|
||||
if(scope!=null){
|
||||
|
@ -85,11 +85,13 @@ public class ISClientConnector {
|
|||
|
||||
private String[] fillConnectionFields(ServiceEndpoint resource) {
|
||||
if(resource!=null){
|
||||
String [] server=new String[resource.profile().accessPoints().size()];
|
||||
ArrayList<String> srvs=new ArrayList <String>();
|
||||
// String [] server=new String[resource.profile().accessPoints().size()];
|
||||
int i=0;
|
||||
for (AccessPoint ap:resource.profile().accessPoints()) {
|
||||
if (ap.name().equals("server"+(i+1))) {
|
||||
server[i] = ap.address();
|
||||
// server[i] = ap.address();
|
||||
srvs.add(ap.address());
|
||||
// if presents, try to get user and password
|
||||
setUsername(ap.username());
|
||||
// set password default value to empty string
|
||||
|
@ -105,6 +107,8 @@ public class ISClientConnector {
|
|||
i++;
|
||||
}
|
||||
}
|
||||
String [] server=new String[srvs.size()];
|
||||
server = srvs.toArray(server);
|
||||
setBackendType(retrievePropertyValue(resource, "type"));
|
||||
String [] volatileHost= new String [1];
|
||||
volatileHost[0]=retrievePropertyValue(resource, "volatile");
|
||||
|
|
Loading…
Reference in New Issue