use of org.opentosca.toscana.plugins.cloudformation.visitor.CheckModelNodeVisitor in project TOSCAna by StuPro-TOSCAna.
the class CloudFormationLifecycle method checkModel.
@Override
public boolean checkModel() {
logger.info("Check model for compatibility to CloudFormation");
Set<RootNode> nodes = model.getNodes();
Set<RootRelationship> relationships = model.getTopology().edgeSet();
try {
CheckModelNodeVisitor checkModelNodeVisitor = new CheckModelNodeVisitor(context);
logger.info("Check nodes");
visitAllNodes(nodes, checkModelNodeVisitor);
CheckModelRelationshipVisitor checkModelRelationshipVisitor = new CheckModelRelationshipVisitor(context);
logger.info("Check relationships");
visitAllRelationships(relationships, checkModelRelationshipVisitor);
} catch (UnsupportedTypeException ute) {
logger.error(ute.getMessage());
return false;
}
return true;
}
Aggregations