Search in sources :

Example 1 with NodeVisitor

use of org.opentosca.toscana.plugins.cloudfoundry.visitor.NodeVisitor in project TOSCAna by StuPro-TOSCAna.

the class CloudFoundryLifecycle method fillApplications.

/**
 *     Fills the Applications with the sorted Node structure
 */
public void fillApplications() {
    filledApplications = new ArrayList<>();
    for (Application app : applications) {
        for (int i = 0; i < app.getStack().getNodes().size(); i++) {
            nodeApplicationMap.put(app.getStack().getNodes().get(i).getNode(), app);
        }
    }
    for (Application application : applications) {
        NodeVisitor visitor = new NodeVisitor(application, nodeApplicationMap, graph, logger);
        for (KubernetesNodeContainer s : application.getStack().getNodes()) {
            s.getNode().accept(visitor);
        }
        Application filledApplication = visitor.getFilledApp();
        filledApplications.add(filledApplication);
    }
}
Also used : KubernetesNodeContainer(org.opentosca.toscana.plugins.kubernetes.util.KubernetesNodeContainer) Application(org.opentosca.toscana.plugins.cloudfoundry.application.Application) NodeVisitor(org.opentosca.toscana.plugins.cloudfoundry.visitor.NodeVisitor)

Aggregations

Application (org.opentosca.toscana.plugins.cloudfoundry.application.Application)1 NodeVisitor (org.opentosca.toscana.plugins.cloudfoundry.visitor.NodeVisitor)1 KubernetesNodeContainer (org.opentosca.toscana.plugins.kubernetes.util.KubernetesNodeContainer)1