git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@32170 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3cbdc4717f
commit
a92029a6b1
|
@ -137,6 +137,21 @@ public class DeployGHNsOnCloud{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureAndStartContainers(Eolus eolus, VM[] hostnames) throws Exception {
|
private void configureAndStartContainers(Eolus eolus, VM[] hostnames) throws Exception {
|
||||||
|
/*
|
||||||
|
String[] wgetRes;
|
||||||
|
for (int i=0; i<hostnames.length; i++){
|
||||||
|
wgetRes = eolus.execCMD("wget --no-check-certificate http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/ghn-distribution/ServiceMaps/ServiceMap_devNext.xml -O /root/gCore/config/ServiceMap_devNext.xml", hostnames[i].getName()).getItem();
|
||||||
|
if (wgetRes.length > 1)
|
||||||
|
System.out.println("Stdout: "+wgetRes[0]);
|
||||||
|
if (wgetRes.length > 2){
|
||||||
|
this.report.getDeployingState()[i]= State.Failed;
|
||||||
|
logger.trace("std error "+wgetRes[1]);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//waiting few seconds before start the container
|
||||||
|
Thread.sleep(30000);
|
||||||
|
|
||||||
String[] scopes=ServiceContext.getContext().getScope().toString().split("/");
|
String[] scopes=ServiceContext.getContext().getScope().toString().split("/");
|
||||||
String cmdtorun = "configureGHN.sh "+scopes[1]+" "+scopes[2];
|
String cmdtorun = "configureGHN.sh "+scopes[1]+" "+scopes[2];
|
||||||
logger.trace("configuring ghns with command "+cmdtorun);
|
logger.trace("configuring ghns with command "+cmdtorun);
|
||||||
|
|
|
@ -37,15 +37,18 @@ public class ModelerTest {
|
||||||
ModelerFactoryServiceAddressingLocator mfal =new ModelerFactoryServiceAddressingLocator();
|
ModelerFactoryServiceAddressingLocator mfal =new ModelerFactoryServiceAddressingLocator();
|
||||||
/*EndpointReferenceType epr= results.get(0).getAccessPoint().getEndpoint("gcube/vremanagement/vremodeler/ModelerFactoryService");
|
/*EndpointReferenceType epr= results.get(0).getAccessPoint().getEndpoint("gcube/vremanagement/vremodeler/ModelerFactoryService");
|
||||||
System.out.println(epr);*/
|
System.out.println(epr);*/
|
||||||
EndpointReferenceType epr= new EndpointReferenceType(new URI("http://node18.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/vremanagement/vremodeler/ModelerFactoryService"));
|
EndpointReferenceType epr= new EndpointReferenceType(new URI("http://nb-lelii.isti.cnr.it:8080/wsrf/services/gcube/vremanagement/vremodeler/ModelerFactoryService"));
|
||||||
ModelerFactoryPortType mfptp= mfal.getModelerFactoryPortTypePort(epr);
|
ModelerFactoryPortType mfptp= mfal.getModelerFactoryPortTypePort(epr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mfptp = GCUBERemotePortTypeContext.getProxy(mfptp, GCUBEScope.getScope(args[0]));
|
mfptp = GCUBERemotePortTypeContext.getProxy(mfptp, GCUBEScope.getScope(args[0]));
|
||||||
|
|
||||||
|
EndpointReferenceType eprModelerRes= mfptp.createResource(new VOID());
|
||||||
|
ModelerServiceAddressingLocator msal= new ModelerServiceAddressingLocator();
|
||||||
|
ModelerServicePortType msptp=msal.getModelerServicePortTypePort(eprModelerRes);
|
||||||
|
|
||||||
|
/*
|
||||||
EndpointReferenceType eprModelerRes= mfptp.getEPRbyId("c85ef4c0-f178-11df-9ffd-b8524462ccae");
|
EndpointReferenceType eprModelerRes= mfptp.getEPRbyId("c85ef4c0-f178-11df-9ffd-b8524462ccae");
|
||||||
|
|
||||||
ModelerServiceAddressingLocator msal= new ModelerServiceAddressingLocator();
|
ModelerServiceAddressingLocator msal= new ModelerServiceAddressingLocator();
|
||||||
|
@ -64,7 +67,9 @@ public class ModelerTest {
|
||||||
|
|
||||||
//System.out.println(msptp.checkStatus(new VOID()));
|
//System.out.println(msptp.checkStatus(new VOID()));
|
||||||
|
|
||||||
/*
|
*/
|
||||||
|
|
||||||
|
msptp = GCUBERemotePortTypeContext.getProxy(msptp, GCUBEScope.getScope(args[0]));
|
||||||
|
|
||||||
System.out.println("creation requested");
|
System.out.println("creation requested");
|
||||||
|
|
||||||
|
@ -90,7 +95,7 @@ public class ModelerTest {
|
||||||
System.out.println(i+" - "+cl.getList(i));
|
System.out.println(i+" - "+cl.getList(i));
|
||||||
|
|
||||||
msptp.setCollection(new CollectionArray(new String[]{cl.getList(0).getId()}));
|
msptp.setCollection(new CollectionArray(new String[]{cl.getList(0).getId()}));
|
||||||
/*
|
|
||||||
FunctionalityList flist=msptp.getFunctionality(new VOID());
|
FunctionalityList flist=msptp.getFunctionality(new VOID());
|
||||||
|
|
||||||
for (FunctionalityItem fitem: flist.getList()){
|
for (FunctionalityItem fitem: flist.getList()){
|
||||||
|
@ -115,7 +120,7 @@ public class ModelerTest {
|
||||||
/*
|
/*
|
||||||
msptp.setUseCloud(false);
|
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.setGHNs(new GHNArray(new String[]{"038bab20-eccd-11df-890f-bfe609d68cc0","046da6b0-eccd-11df-90ca-ecd7051b065f"},"038bab20-eccd-11df-890f-bfe609d68cc0"));
|
||||||
|
*/
|
||||||
|
|
||||||
msptp.deployVRE(new VOID());
|
msptp.deployVRE(new VOID());
|
||||||
DeployReport deployReport;
|
DeployReport deployReport;
|
||||||
|
@ -126,7 +131,7 @@ public class ModelerTest {
|
||||||
deployReport= Utils.fromXML(report);
|
deployReport= Utils.fromXML(report);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(15000);
|
||||||
}while (deployReport.getState()==State.Running);
|
}while (deployReport.getState()==State.Running);
|
||||||
*/
|
|
||||||
}catch(Exception e){e.printStackTrace();}
|
}catch(Exception e){e.printStackTrace();}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue