Search in sources :

Example 1 with PrepareModelRelationshipVisitor

use of org.opentosca.toscana.plugins.cloudformation.visitor.PrepareModelRelationshipVisitor in project TOSCAna by StuPro-TOSCAna.

the class CloudFormationLifecycle method prepare.

@Override
public void prepare() {
    logger.info("Prepare model for compatibility to CloudFormation");
    Set<RootNode> nodes = model.getNodes();
    Graph<RootNode, RootRelationship> topology = model.getTopology();
    PrepareModelNodeVisitor prepareModelNodeVisitor = new PrepareModelNodeVisitor(context, cfnModule);
    logger.info("Prepare nodes");
    visitComputeNodesFirst(nodes, prepareModelNodeVisitor);
    logger.info("Prepare relationships");
    PrepareModelRelationshipVisitor prepareModelRelationshipVisitor = new PrepareModelRelationshipVisitor(context, cfnModule);
    visitAllRelationships(topology.edgeSet(), prepareModelRelationshipVisitor);
}
Also used : PrepareModelNodeVisitor(org.opentosca.toscana.plugins.cloudformation.visitor.PrepareModelNodeVisitor) RootNode(org.opentosca.toscana.model.node.RootNode) PrepareModelRelationshipVisitor(org.opentosca.toscana.plugins.cloudformation.visitor.PrepareModelRelationshipVisitor) RootRelationship(org.opentosca.toscana.model.relation.RootRelationship)

Aggregations

RootNode (org.opentosca.toscana.model.node.RootNode)1 RootRelationship (org.opentosca.toscana.model.relation.RootRelationship)1 PrepareModelNodeVisitor (org.opentosca.toscana.plugins.cloudformation.visitor.PrepareModelNodeVisitor)1 PrepareModelRelationshipVisitor (org.opentosca.toscana.plugins.cloudformation.visitor.PrepareModelRelationshipVisitor)1