This commit is contained in:
Lucio Lelii 2009-01-14 19:29:04 +00:00
parent 6aeec21d60
commit 3782a28092
2 changed files with 10 additions and 9 deletions

View File

@ -43,8 +43,7 @@ import org.xml.sax.SAXException;
public class DeployVRE extends Thread{
private static GCUBELog logger= new GCUBELog(DeployVRE.class);
private ISPublisher publisher;
private ModelerResource wsResource= null;
private String resourceId;
private GCUBEScope startingScope;
@ -120,9 +119,9 @@ public class DeployVRE extends Thread{
report=mbportType.getReport(reportId);
attempt++;
getResource().setReportFirstStep(report);
/*System.out.println("---------");
System.out.println("---step 1------");
System.out.println(report);
System.out.println("---------");*/
System.out.println("---------");
}while (!isDeploymentStatusFinished(report) && attempt<10);
}catch(Exception e){e.printStackTrace(); throw e;}
return "";
@ -154,10 +153,8 @@ public class DeployVRE extends Thread{
throws Exception {
OptionsParameters ops;
ResultSet resGenericInfo = DBInterface.queryDB("select VRE.name from VRE where VRE.id='"+this.getParameter()+"'; ");
if (!resGenericInfo.next()) {
throw new GCUBEFault("The VRE with ID "+this.getParameter()+" cannot be retrieved on the DB");
}
ResultSet resGenericInfo = DBInterface.queryDB("select VRE.name, VRE.vredesigner, VRE.vremanager, VRE.IntervalTo, VRE.IntervalFrom, VRE.description from VRE where VRE.id='"+this.getParameter()+"'; ");
if (!resGenericInfo.next()) throw new GCUBEFault("The VRE with ID "+this.getParameter()+" cannot be retrieved");
ops=new OptionsParameters();
@ -263,8 +260,12 @@ public class DeployVRE extends Thread{
do{
this.wait(20000);
report=vreManPortType.getReport(reportId);
System.out.println("---step 2------");
System.out.println(report);
System.out.println("---------");
attempt++;
getResource().setReportSecondStep(report);
}while (!isDeploymentStatusFinished(report) && attempt<20);
return "";
}

View File

@ -65,7 +65,7 @@ public class ModelerTest {
msptp.setFunctionality(fida);
GHNArray ghnArray= new GHNArray();
ghnArray.setGHNElement(new String[]{"13e6a280-e0b4-11dd-aafb-8e705a88c80f","a9673990-c792-11dd-aa98-9dfda17b7a75"});
ghnArray.setGHNElement(new String[]{"fbd4db10-e268-11dd-bf95-b9ea85be7470","2baac080-ce27-11dd-a523-acaef5fbd79f"});
msptp.setGHNs(ghnArray);
System.out.println("-"+msptp.checkStatus(new VOID()).getReports(0)+"-");