|
|
|
@ -126,14 +126,35 @@ protected static AtomicInteger vreId = new AtomicInteger(0);
|
|
|
|
|
* @param session the d4s session
|
|
|
|
|
* @param id the id of the VRE to be removed
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void removeVRE(ASLSession session, String id) {
|
|
|
|
|
System.out.println("ID RECEIVED TO REMOVE:" + id);
|
|
|
|
|
log.info("ID RECEIVED TO REMOVE:" + id);
|
|
|
|
|
String currScope = ScopeProvider.instance.get();
|
|
|
|
|
ScopeProvider.instance.set(scope);
|
|
|
|
|
factory().build().removeVRE(id);
|
|
|
|
|
ScopeProvider.instance.set(currScope);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param session the d4s session
|
|
|
|
|
* @param id the id of the VRE to be removed
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void undeployVRE(String id) {
|
|
|
|
|
System.out.println("ID RECEIVED TO UNDEPLOY:" + id);
|
|
|
|
|
String currScope = ScopeProvider.instance.get();
|
|
|
|
|
ScopeProvider.instance.set(scope);
|
|
|
|
|
modelPortType = manager().at(factory().build().getEPRbyId(id)).build();
|
|
|
|
|
log.info("Trying UNDEPLOY:" + id + " name="+ modelPortType.getDescription().name());
|
|
|
|
|
modelPortType.undeployVRE();
|
|
|
|
|
ScopeProvider.instance.set(currScope);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(10000);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public DeployReport checkVREStatus() throws RemoteException {
|
|
|
|
@ -276,7 +297,7 @@ protected static AtomicInteger vreId = new AtomicInteger(0);
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public boolean isCloudSelected() {
|
|
|
|
|
System.out.println("isCloudSelected()");
|
|
|
|
|
log.info("isCloudSelected()");
|
|
|
|
|
String currScope = ScopeProvider.instance.get();
|
|
|
|
|
ScopeProvider.instance.set(scope);
|
|
|
|
|
boolean toReturn = modelPortType.isUseCloud();
|
|
|
|
|