Search in sources :

Example 6 with DeallocateAction

use of org.iobserve.planning.systemadaptation.DeallocateAction in project iobserve-analysis by research-iobserve.

the class AssemblyContextActionFactory method generateDeallocateAction.

/**
 * Create a deallocation action.
 *
 * @param runtimeNode
 *            node to be deallocated
 * @return returns the deallocation action
 */
public static DeallocateAction generateDeallocateAction(final ComponentNode runtimeNode) {
    final SystemadaptationFactory factory = SystemadaptationFactory.eINSTANCE;
    final DeallocateAction action = factory.createDeallocateAction();
    AssemblyContextActionFactory.setSourceAssemblyContext(action, runtimeNode.getAssemblyContextID());
    final Allocation runAllocation = ActionFactory.getRuntimeModels().getAllocationModel();
    action.setOldAllocationContext(ActionFactory.getAllocationContext(runtimeNode.getAllocationContextID(), runAllocation));
    return action;
}
Also used : Allocation(org.palladiosimulator.pcm.allocation.Allocation) SystemadaptationFactory(org.iobserve.planning.systemadaptation.SystemadaptationFactory) DeallocateAction(org.iobserve.planning.systemadaptation.DeallocateAction)

Example 7 with DeallocateAction

use of org.iobserve.planning.systemadaptation.DeallocateAction in project iobserve-analysis by research-iobserve.

the class ResourceContainerActionFactory method createDeallocateAction.

/**
 * Create a deallocate action.
 *
 * @param runtimeServer
 *            the node going to be deallocated
 * @return the action
 */
public static DeallocateAction createDeallocateAction(final DeploymentNode runtimeServer) {
    final DeallocateAction action = SystemadaptationFactory.eINSTANCE.createDeallocateAction();
    final ResourceEnvironment runtimeResourceEnvironment = ActionFactory.getRuntimeModels().getResourceEnvironmentModel();
    ResourceContainerActionFactory.initializeResourceContainerAction(action, runtimeServer, runtimeResourceEnvironment);
    return action;
}
Also used : ResourceEnvironment(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment) DeallocateAction(org.iobserve.planning.systemadaptation.DeallocateAction)

Aggregations

DeallocateAction (org.iobserve.planning.systemadaptation.DeallocateAction)7 DeploymentNode (org.iobserve.adaptation.data.graph.DeploymentNode)3 AllocateAction (org.iobserve.planning.systemadaptation.AllocateAction)3 ChangeRepositoryComponentAction (org.iobserve.planning.systemadaptation.ChangeRepositoryComponentAction)2 MigrateAction (org.iobserve.planning.systemadaptation.MigrateAction)2 SystemAdaptation (org.iobserve.planning.systemadaptation.SystemAdaptation)2 Test (org.junit.Test)2 AdaptationData (org.iobserve.adaptation.data.AdaptationData)1 DeallocateNodeAction (org.iobserve.adaptation.executionplan.DeallocateNodeAction)1 DisconnectNodeAction (org.iobserve.adaptation.executionplan.DisconnectNodeAction)1 ExecutionPlan (org.iobserve.adaptation.executionplan.ExecutionPlan)1 AcquireAction (org.iobserve.planning.systemadaptation.AcquireAction)1 DereplicateAction (org.iobserve.planning.systemadaptation.DereplicateAction)1 ReplicateAction (org.iobserve.planning.systemadaptation.ReplicateAction)1 SystemadaptationFactory (org.iobserve.planning.systemadaptation.SystemadaptationFactory)1 TerminateAction (org.iobserve.planning.systemadaptation.TerminateAction)1 Allocation (org.palladiosimulator.pcm.allocation.Allocation)1 ResourceEnvironment (org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment)1