use of org.eclipse.winery.model.ids.definitions.NodeTypeId in project winery by eclipse.
the class ConsistencyCheckerTest method openToscaNamespaceIsNotLowerCaseErrorNotRaisedAtQNameHavingCasedLocalName.
@ParameterizedTest()
@MethodSource("getCamelCasedOpenToscaQNames")
public void openToscaNamespaceIsNotLowerCaseErrorNotRaisedAtQNameHavingCasedLocalName(QName qname) {
NodeTypeId id = new NodeTypeId(qname);
ConsistencyErrorCollector errorLogger = new ConsistencyErrorCollector();
consistencyChecker.checkNamespaceUri(id);
assertEquals(Collections.emptyMap(), errorLogger.getErrorList());
}
use of org.eclipse.winery.model.ids.definitions.NodeTypeId in project winery by eclipse.
the class Ec2AmiRefinementPlugin method getDetectorGraphs.
@Override
protected List<TTopologyTemplate> getDetectorGraphs() {
IRepository repository = RepositoryFactory.getRepository();
TNodeType computeType = repository.getElement(new NodeTypeId(COMPUTE_QNAME));
TNodeTemplate compute = ModelUtilities.instantiateNodeTemplate(computeType);
LinkedHashMap<String, String> computeKvProperties = new LinkedHashMap<>();
String detectorPropertyRegex = typeByAmi.keySet().stream().collect(Collectors.joining("|", "(", ")"));
computeKvProperties.put(PROPERTY_EC2_AMI, detectorPropertyRegex);
TEntityTemplate.WineryKVProperties computeProperties = new TEntityTemplate.WineryKVProperties();
computeProperties.setKVProperties(computeKvProperties);
compute.setProperties(computeProperties);
return Collections.singletonList(new TTopologyTemplate.Builder().addNodeTemplate(compute).build());
}
use of org.eclipse.winery.model.ids.definitions.NodeTypeId in project winery by eclipse.
the class MySqlDbRefinementPlugin method getDetectorGraphs.
@Override
protected List<TTopologyTemplate> getDetectorGraphs() {
IRepository repository = RepositoryFactory.getRepository();
TNodeType mySQLType = repository.getElement(new NodeTypeId(mySqlDbQName));
TNodeTemplate mySQL_DBMS = ModelUtilities.instantiateNodeTemplate(mySQLType);
return Collections.singletonList(new TTopologyTemplate.Builder().addNodeTemplate(mySQL_DBMS).build());
}
use of org.eclipse.winery.model.ids.definitions.NodeTypeId in project winery by eclipse.
the class MySqlDbmsRefinementPlugin method getDetectorGraphs.
@Override
protected List<TTopologyTemplate> getDetectorGraphs() {
IRepository repository = RepositoryFactory.getRepository();
TNodeType mySQLType = repository.getElement(new NodeTypeId(mySqlName));
TNodeTemplate mySQL_DBMS = ModelUtilities.instantiateNodeTemplate(mySQLType);
return Collections.singletonList(new TTopologyTemplate.Builder().addNodeTemplate(mySQL_DBMS).build());
}
use of org.eclipse.winery.model.ids.definitions.NodeTypeId in project winery by eclipse.
the class SpringWebAppRefinementPlugin method createPetClinicDetector.
private TTopologyTemplate createPetClinicDetector(IRepository repository) {
TNodeType petClinicType = repository.getElement(new NodeTypeId(petClinic));
TNodeTemplate petClinic = ModelUtilities.instantiateNodeTemplate(petClinicType);
return new TTopologyTemplate.Builder().addNodeTemplate(petClinic).build();
}
Aggregations