This commit is contained in:
Lucio Lelii 2010-11-16 16:56:25 +00:00
parent d42bd179cf
commit f97de64fe2
3 changed files with 48 additions and 9 deletions

View File

@ -11,7 +11,6 @@ import org.gcube.common.core.faults.GCUBEFault;
import org.gcube.common.core.faults.GCUBEUnrecoverableFault;
import org.gcube.common.core.types.VOID;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.vremanagement.resourcemanager.stubs.resourcemanager.ResourceManagerPortType;
import org.gcube.vremanagement.vremodeler.db.DBInterface;
import org.gcube.vremanagement.vremodeler.impl.deploy.DeployVRE;
import org.gcube.vremanagement.vremodeler.impl.util.ModelerCollection;
@ -484,6 +483,7 @@ public class ModelerService {
* @throws Exception
*/
public String checkStatus(VOID var) throws Exception{
logger.trace("is deploy Report null?"+(getResource().getDeployReport()==null));
return Utils.toXML(getResource().getDeployReport());
}

View File

@ -52,9 +52,30 @@ public class FunctionalityReport implements Serializable{
this.functionalityName = functioanlityName;
}
public int hashCode(){
return this.functionalityId.hashCode();
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((functionalityId == null) ? 0 : functionalityId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FunctionalityReport other = (FunctionalityReport) obj;
if (functionalityId == null) {
if (other.functionalityId != null)
return false;
} else if (!functionalityId.equals(other.functionalityId))
return false;
return true;
}
}

View File

@ -37,17 +37,34 @@ public class ModelerTest {
ModelerFactoryServiceAddressingLocator mfal =new ModelerFactoryServiceAddressingLocator();
/*EndpointReferenceType epr= results.get(0).getAccessPoint().getEndpoint("gcube/vremanagement/vremodeler/ModelerFactoryService");
System.out.println(epr);*/
EndpointReferenceType epr= new EndpointReferenceType(new URI("http://nb-lelii.isti.cnr.it:8080/wsrf/services/gcube/vremanagement/vremodeler/ModelerFactoryService"));
EndpointReferenceType epr= new EndpointReferenceType(new URI("http://node18.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/vremanagement/vremodeler/ModelerFactoryService"));
ModelerFactoryPortType mfptp= mfal.getModelerFactoryPortTypePort(epr);
mfptp = GCUBERemotePortTypeContext.getProxy(mfptp, GCUBEScope.getScope(args[0]));
EndpointReferenceType eprModelerRes= mfptp.createResource(new VOID());
EndpointReferenceType eprModelerRes= mfptp.getEPRbyId("c85ef4c0-f178-11df-9ffd-b8524462ccae");
ModelerServiceAddressingLocator msal= new ModelerServiceAddressingLocator();
ModelerServicePortType msptp=msal.getModelerServicePortTypePort(eprModelerRes);
msptp = GCUBERemotePortTypeContext.getProxy(msptp, GCUBEScope.getScope(args[0]));
System.out.println(msptp.isUseCloud(new VOID()));
System.out.println(msptp.getCloudVMs(new VOID()));
System.out.println(msptp.checkStatus(new VOID()));
DeployReport dr=Utils.fromXML(msptp.checkStatus(new VOID()));
System.out.println(dr.getState());
//System.out.println(msptp.checkStatus(new VOID()));
/*
System.out.println("creation requested");
@ -80,7 +97,7 @@ public class ModelerTest {
for (FunctionalityItem fchild:fitem.getChilds())
System.out.println(fchild.getName()+" "+fchild.getId());
}
*/
System.out.println("collection set");
@ -98,7 +115,7 @@ public class ModelerTest {
/*
msptp.setUseCloud(false);
msptp.setGHNs(new GHNArray(new String[]{"038bab20-eccd-11df-890f-bfe609d68cc0","046da6b0-eccd-11df-90ca-ecd7051b065f"},"038bab20-eccd-11df-890f-bfe609d68cc0"));
*/
msptp.deployVRE(new VOID());
DeployReport deployReport;
@ -109,6 +126,7 @@ public class ModelerTest {
deployReport= Utils.fromXML(report);
Thread.sleep(15000);
}while (deployReport.getState()==State.Running);
*/
}catch(Exception e){e.printStackTrace();}
}