git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@8268 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6afc48c727
commit
12eefb9f6c
|
@ -6,7 +6,7 @@ import java.sql.ResultSet;
|
|||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
//import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPath;
|
||||
|
@ -23,7 +23,6 @@ import org.gcube.common.core.resources.impl.kxml.KGCUBEResource;
|
|||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.common.vremanagement.ghnmanager.impl.contexts.ServiceContext;
|
||||
import org.gcube.metadatamanagement.metadatabrokerlibrary.util.GenericResourceRetriever;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.AddResourcesParameters;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.OptionsParameters;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.ResourceItem;
|
||||
|
@ -93,16 +92,19 @@ public class DeployVRE implements Runnable{
|
|||
throws Exception {
|
||||
try{
|
||||
AddResourcesParameters arp= new AddResourcesParameters();
|
||||
System.out.println("fin qui ci sono 1");
|
||||
ServiceList services= new ServiceList();
|
||||
ServiceItem[] service= new ServiceItem[1];
|
||||
service[0].setServiceClass("VREManagement");
|
||||
service[0].setServiceName("VREManager");
|
||||
service[0].setServiceVersion("1.00.00");
|
||||
services.setService(service);
|
||||
System.out.println("fin qui ci sono 2");
|
||||
services.setGHN(new String[]{this.getParameter().second});
|
||||
arp.setServices(services);
|
||||
arp.setTargetScope(ServiceContext.getContext().getScope().toString()+"/"+this.getParameter().first);
|
||||
String reportId=mbportType.addResources(arp);
|
||||
System.out.println("fin qui ci sono 3");
|
||||
String report;
|
||||
int attempt=0;
|
||||
do{
|
||||
|
|
|
@ -41,15 +41,16 @@ public abstract class VREManagerServiceHandler<T, P> extends GCUBEServiceHandler
|
|||
|
||||
@Override
|
||||
protected List<EndpointReferenceType> findInstances() throws Exception {
|
||||
ISClient client = GHNContext.getImplementation(ISClient.class);
|
||||
GCUBERIQuery query = client.getQuery(GCUBERIQuery.class);
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceName", "VREManager"));
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceClass", "VREManagement"));
|
||||
List<EndpointReferenceType> eprs = new ArrayList<EndpointReferenceType>();
|
||||
for (GCUBERunningInstance instance : client.execute(query, ServiceContext.getContext().getScope()))
|
||||
eprs.add(instance.getAccessPoint().getEndpoint("gcube/vremanagement/VREManager"));
|
||||
return eprs;
|
||||
|
||||
try{
|
||||
ISClient client = GHNContext.getImplementation(ISClient.class);
|
||||
GCUBERIQuery query = client.getQuery(GCUBERIQuery.class);
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceName", "VREManager"));
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceClass", "VREManagement"));
|
||||
List<EndpointReferenceType> eprs = new ArrayList<EndpointReferenceType>();
|
||||
for (GCUBERunningInstance instance : client.execute(query, ServiceContext.getContext().getScope()))
|
||||
eprs.add(instance.getAccessPoint().getEndpoint("gcube/vremanagement/VREManager"));
|
||||
return eprs;
|
||||
}catch(Exception e){e.printStackTrace(); throw e;}
|
||||
}
|
||||
|
||||
protected abstract T makeCall(VREManagerPortType mbportType) throws Exception;
|
||||
|
@ -62,7 +63,7 @@ public abstract class VREManagerServiceHandler<T, P> extends GCUBEServiceHandler
|
|||
mbpt= mbsal.getVREManagerPortTypePort(arg0);
|
||||
mbpt = GCUBERemotePortTypeContext.getProxy(mbpt,ServiceContext.getContext().getScope());
|
||||
this.setReturnValue(this.makeCall(mbpt));
|
||||
}catch(Exception e){throw e;}
|
||||
}catch(Exception e){e.printStackTrace();throw e; }
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue