use of alien4cloud.paas.model.PaaSTopologyDeploymentContext in project alien4cloud by alien4cloud.
the class DeploymentRuntimeService method triggerOperationExecution.
/**
* Trigger the execution of an operation on a node.
*
* @param request the operation's execution description ( see {@link alien4cloud.paas.model.OperationExecRequest})
* @param callback the callback when execution finishes
* @throws alien4cloud.paas.exception.OperationExecutionException runtime exception during an operation
*/
public void triggerOperationExecution(OperationExecRequest request, IPaaSCallback<Map<String, String>> callback) throws OperationExecutionException {
PaaSTopologyDeploymentContext context = buildPaaSTopologyDeploymentContext(request);
IOrchestratorPlugin orchestratorPlugin = orchestratorPluginService.getOrFail(context.getDeployment().getOrchestratorId());
orchestratorPlugin.executeOperation(context, request, callback);
}
use of alien4cloud.paas.model.PaaSTopologyDeploymentContext in project alien4cloud by alien4cloud.
the class ArtifactProcessorService method processDeploymentArtifacts.
private void processDeploymentArtifacts(PaaSTopologyDeploymentContext deploymentContext) {
if (deploymentContext.getDeploymentTopology().getNodeTemplates() != null) {
// Artifact which comes from the archive or from internal repository
getDeploymentArtifactStream(deploymentContext).filter(deploymentArtifact -> !isArtifactFromTopologyEditor(deploymentArtifact)).forEach(this::processArtifact);
// Artifact which does not come from the archive, which comes from topology's edition
getDeploymentArtifactStream(deploymentContext).filter(this::isArtifactFromTopologyEditor).forEach(deploymentArtifact -> {
Path artifactPath = editorRepositoryService.resolveArtifact(deploymentContext.getDeploymentTopology().getInitialTopologyId(), deploymentArtifact.getArtifactRef());
deploymentArtifact.setArtifactPath(artifactPath.toString());
});
}
}
use of alien4cloud.paas.model.PaaSTopologyDeploymentContext in project alien4cloud by alien4cloud.
the class DeploymentService method getCloudActiveDeploymentContexts.
public Map<String, PaaSTopologyDeploymentContext> getCloudActiveDeploymentContexts(String orchestratorId) {
Deployment[] deployments = getOrchestratorActiveDeployments(orchestratorId);
Map<String, PaaSTopologyDeploymentContext> activeDeploymentContexts = Maps.newHashMap();
for (Deployment deployment : deployments) {
DeploymentTopology topology = deploymentRuntimeStateService.getRuntimeTopology(deployment.getId());
activeDeploymentContexts.put(deployment.getOrchestratorDeploymentId(), deploymentContextService.buildTopologyDeploymentContext(null, deployment, deploymentTopologyService.getLocations(topology), topology));
}
return activeDeploymentContexts;
}
Aggregations