Beispiel #1
0
  private void buildApplicationAgnosticMetadata() {

    if (toscaParser.getServiceTemplateOfTopology() != null) {
      this.setApplicationAgnosticMetadata(
          new ApplicationAgnosticMetadata(toscaParser.getServiceTemplateOfTopology()));
    } else {
      this.setApplicationAgnosticMetadata(new ApplicationAgnosticMetadata());
    }
  }
Beispiel #2
0
  private List<AgnosticDeploymentArtifact> getAgnosticDeploymentArtifacts(
      TNodeTemplate nodeTemplate) throws TopologyTemplateFormatException {

    List<AgnosticDeploymentArtifact> result;
    List<TDeploymentArtifact> deploymentArtifacts = toscaParser.getDeploymentArtifact(nodeTemplate);
    result = getAgnosticDeploymentArtifacts(deploymentArtifacts);
    return result;
  }
Beispiel #3
0
 private void buildAgnosticComponentList()
     throws NodeTemplateTypeNotSupportedException, AgnosticPropertyException,
         TopologyTemplateFormatException {
   generatedAgnosticComponents = new LinkedList<>();
   for (TNodeTemplate nodeTemplate : toscaParser.getNodeTemplatesOfTopology()) {
     generatedAgnosticComponents.add(buildAgnosticComponent(nodeTemplate));
   }
 }
Beispiel #4
0
  private AgnosticDeploymentArtifact getAgnosticDeploymentArtifact(
      TDeploymentArtifact deploymentArtifact) throws TopologyTemplateFormatException {

    TArtifactTemplate artifactTemplate = toscaParser.getArtifactTemplate(deploymentArtifact);
    if (artifactTemplate == null) {
      throwExceptionForNotFoundArtifactTemplate(deploymentArtifact);
    }
    return new AgnosticDeploymentArtifact(artifactTemplate);
  }
Beispiel #5
0
  private void buildAgnosticComponentRelations() throws TopologyTemplateFormatException {

    MatchingDictionary capabilityIdsNodeTemplateIsDictionary =
        createCapabilityIdsNodeTemplateIdsDictionary(generatedAgnosticComponents);
    MatchingDictionary requirementIdsNodeTemplateIsDictionary =
        createRequirementIdsNodeTemplateIdsDictionary(generatedAgnosticComponents);
    agnosticRelations = new HashMap<>();
    for (TRelationshipTemplate relationshipTemplate :
        toscaParser.getRelationshipTemplatesOfTopology()) {
      addRelationTemplateToAgnosticRelation(
          relationshipTemplate,
          capabilityIdsNodeTemplateIsDictionary,
          requirementIdsNodeTemplateIsDictionary);
    }
  }
Beispiel #6
0
 private ToscaProcessor parsingApplicationTopology(File definitionFilePath)
     throws TopologyTemplateFormatException, NodeTemplateTypeNotSupportedException {
   toscaParser.parsingApplicationTopology(definitionFilePath);
   return this;
 }