fix the query for services profile retrieval when deploying

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@85234 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-11-08 16:03:38 +00:00
parent 5b89e5423a
commit f532f36926
1 changed files with 3 additions and 3 deletions

View File

@ -217,7 +217,7 @@ public class ManagementUtils {
checker.validate(servicesID != null && servicesID.length != 0, new ResourceParameterException("Invalid servicesID parameter. It cannot be null or empty.")); checker.validate(servicesID != null && servicesID.length != 0, new ResourceParameterException("Invalid servicesID parameter. It cannot be null or empty."));
checker.validate(scope != null, new Exception("Cannot retrieve the scope.")); checker.validate(scope != null, new Exception("Cannot retrieve the scope."));
AbstractResourceManager resource = ResourceFactory.createResourceManager(AllowedResourceTypes.Service);
RMBinderLibrary manager = ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getResourceManager(scope.toString()); RMBinderLibrary manager = ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getResourceManager(scope.toString());
System.out.println("\n\n**** These are the service ids to deploy on SCOPE " + scope); System.out.println("\n\n**** These are the service ids to deploy on SCOPE " + scope);
@ -239,7 +239,7 @@ public class ManagementUtils {
prepareServices: for (String serviceID : servicesID) { prepareServices: for (String serviceID : servicesID) {
System.out.println("\n\n**** Query the ICClient to get the profile"); System.out.println("\n\n**** Query the ICClient to get the profile");
query = queryFor(Software.class); query = queryFor(Software.class);
query.addCondition("$resource/Profile/ID/text() eq '" + serviceID + "'"); query.addCondition("$resource/ID/text() eq '" + serviceID + "'");
System.out.println("**** Query : " + query.toString()); System.out.println("**** Query : " + query.toString());
String curr = ScopeProvider.instance.get(); String curr = ScopeProvider.instance.get();
@ -291,7 +291,7 @@ public class ManagementUtils {
} }
serviceList.suggestedTargetGHNNames = arrayGHNSids; serviceList.suggestedTargetGHNNames = arrayGHNSids;
serviceList.software = serviceProfiles; serviceList.software = serviceProfiles;
AddResourcesParameters addResourcesParameters = new AddResourcesParameters(); AddResourcesParameters addResourcesParameters = new AddResourcesParameters();
addResourcesParameters.softwareList = serviceList; addResourcesParameters.softwareList = serviceList;
addResourcesParameters.setTargetScope(scope.toString()); addResourcesParameters.setTargetScope(scope.toString());