Search in sources :

Example 1 with NotFoundException

use of org.opentosca.container.core.common.NotFoundException in project container by OpenTOSCA.

the class ManagementPlanController method addManagementPlanLogEntry.

@POST
@Path("/{plan}/instances/{instance}/logs")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.APPLICATION_XML })
@ApiOperation(hidden = true, value = "")
public Response addManagementPlanLogEntry(@PathParam("plan") final String plan, @PathParam("instance") final String instance, @Context final UriInfo uriInfo, final CreatePlanInstanceLogEntryRequest logEntry) throws NotFoundException {
    final String entry = logEntry.getLogEntry();
    if (entry == null || entry.length() <= 0) {
        LOGGER.error("Log entry is empty!");
        return Response.status(Status.BAD_REQUEST).build();
    }
    PlanInstance pi = planInstanceService.getPlanInstanceWithLogsByCorrelationId(instance);
    if (pi == null) {
        LOGGER.error("No plan instance found");
        throw new NotFoundException("No plan instance found");
    }
    final PlanInstanceEvent event = new PlanInstanceEvent("INFO", "PLAN_LOG", entry);
    planInstanceService.addLogToPlanInstance(pi, event);
    final URI resourceUri = uriInfo.getAbsolutePath();
    return Response.ok(resourceUri).build();
}
Also used : PlanInstance(org.opentosca.container.core.next.model.PlanInstance) PlanInstanceEvent(org.opentosca.container.core.next.model.PlanInstanceEvent) NotFoundException(org.opentosca.container.core.common.NotFoundException) URI(java.net.URI) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with NotFoundException

use of org.opentosca.container.core.common.NotFoundException in project container by OpenTOSCA.

the class ManagementBusServiceImpl method internalInvokeIA.

/**
 * Searches for the NodeType/RelationshipType of the given operation, updates the input parameters and passes the
 * request on to invoke the corresponding IA.
 *
 * @param exchange  exchange containing the header fields which identify the current operation
 * @param arguments a bundle-object containing all relevant invocation arguments
 */
private PlanInstanceEvent internalInvokeIA(IAInvocationArguments arguments, Exchange exchange) {
    LOG.debug("Starting Management Bus: InvokeIA");
    final Message message = exchange.getIn();
    // log event to monitor the IA execution time
    final PlanInstanceEvent event = new PlanInstanceEvent("INFO", "IA_DURATION_LOG", "Finished execution of IA for NodeTemplate '" + arguments.nodeTemplateId + "' interface '" + arguments.interfaceName + "' and operation '" + arguments.operationName + "'");
    final Csar csar = this.storage.findById(arguments.csarId);
    final TServiceTemplate serviceTemplate = csar.entryServiceTemplate();
    QName typeID = null;
    TEntityType type = null;
    if (Objects.nonNull(arguments.nodeTemplateId)) {
        final TNodeTemplate nodeTemplate = serviceTemplate.getTopologyTemplate().getNodeTemplate(arguments.nodeTemplateId);
        if (nodeTemplate != null) {
            typeID = nodeTemplate.getType();
        }
        type = csar.nodeTypes().stream().filter(x -> x.getQName().equals(nodeTemplate.getTypeAsQName())).findFirst().orElse(null);
    } else if (Objects.nonNull(arguments.relationshipTemplateId)) {
        final TRelationshipTemplate relationshipTemplate = serviceTemplate.getTopologyTemplate().getRelationshipTemplate(arguments.relationshipTemplateId);
        if (relationshipTemplate != null) {
            typeID = relationshipTemplate.getType();
        }
        type = csar.relationshipTypes().stream().filter(x -> x.getQName().equals(relationshipTemplate.getTypeAsQName())).findFirst().orElse(null);
    }
    if (typeID == null) {
        LOG.error(String.format("Could not resolve a type for the given nodeTemplateId/relationshipTemplateId [%s/%s]", arguments.nodeTemplateId, arguments.relationshipTemplateId));
        handleResponse(exchange);
        event.setEndTimestamp(new Date());
        return event;
    }
    // invocation is only possible with retrieved type which contains the operation
    if (!Objects.nonNull(typeID) || !Objects.nonNull(type)) {
        LOG.error("Unable to retrieve the NodeType/RelationshipType for NodeTemplate: {} and RelationshipTemplate: {}", arguments.nodeTemplateId, arguments.relationshipTemplateId);
        handleResponse(exchange);
        event.setEndTimestamp(new Date());
        return event;
    }
    // get NodeTemplateInstance object for the deployment distribution decision
    NodeTemplateInstance nodeInstance;
    final RelationshipTemplateInstance relationshipInstance;
    if (Objects.nonNull(arguments.nodeTemplateId)) {
        nodeInstance = mbUtils.getNodeTemplateInstance(arguments.serviceTemplateInstanceId, arguments.nodeTemplateId);
        relationshipInstance = null;
    } else if (Objects.nonNull(arguments.relationshipTemplateId)) {
        relationshipInstance = mbUtils.getRelationshipTemplateInstance(arguments.serviceTemplateInstanceId, arguments.relationshipTemplateId);
        // assuming type is a TRelationshipType, because otherwise this should be unreachable
        final TRelationshipType relationshipType = (TRelationshipType) type;
        if (Objects.nonNull(relationshipInstance) && Objects.nonNull(relationshipType)) {
            nodeInstance = ContainerEngine.resolveRelationshipOperationTarget(relationshipInstance, relationshipType, arguments.interfaceName, arguments.operationName);
        } else {
            nodeInstance = null;
        }
    } else {
        relationshipInstance = null;
        nodeInstance = null;
    }
    Csar replacementCsar = null;
    if (typeID.equals(Types.abstractOperatingSystemNodeType)) {
        // replace abstract operating system node instance
        nodeInstance = mbUtils.getAbstractOSReplacementInstance(nodeInstance);
        // if not, we're fucked anyways
        assert nodeInstance != null;
        final ServiceTemplateInstance replacementSTI = nodeInstance.getServiceTemplateInstance();
        replacementCsar = this.storage.findById(replacementSTI.getCsarId());
        try {
            final TServiceTemplate replacementST = ToscaEngine.resolveServiceTemplate(replacementCsar, replacementSTI.getTemplateId());
            final TNodeTemplate replacementTemplate = ToscaEngine.resolveNodeTemplate(replacementST, nodeInstance.getTemplateId());
            type = ToscaEngine.resolveNodeType(replacementCsar, replacementTemplate);
        } catch (final NotFoundException e) {
            LOG.error("Could not compute replacing type for abstract Operating System Node replacement. Aborting IA invocation.", e);
            handleResponse(exchange);
            event.setEndTimestamp(new Date());
            return event;
        }
    }
    // update input parameters for the operation call
    if (message.getBody() instanceof HashMap) {
        @SuppressWarnings("unchecked") Map<String, String> inputParams = (Map<String, String>) message.getBody();
        inputParams = this.parameterHandler.updateInputParams(inputParams, replacementCsar == null ? csar : replacementCsar, nodeInstance, relationshipInstance, arguments.interfaceName, arguments.operationName);
        message.setBody(inputParams);
    } else {
        LOG.warn("There are no input parameters specified.");
    }
    internalInvokeIA(exchange, replacementCsar != null ? replacementCsar : csar, arguments.serviceTemplateInstanceId, type, nodeInstance, arguments.interfaceName, arguments.operationName);
    event.setEndTimestamp(new Date());
    return event;
}
Also used : ICoreEndpointService(org.opentosca.container.core.service.ICoreEndpointService) Arrays(java.util.Arrays) Message(org.apache.camel.Message) Date(java.util.Date) URISyntaxException(java.net.URISyntaxException) LoggerFactory(org.slf4j.LoggerFactory) ContainerEngine(org.opentosca.container.core.engine.next.ContainerEngine) PlanType(org.opentosca.container.core.next.model.PlanType) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) ToscaEngine(org.opentosca.container.core.engine.ToscaEngine) ChoreographyHandler(org.opentosca.container.core.plan.ChoreographyHandler) Document(org.w3c.dom.Document) Map(java.util.Map) MBUtils(org.opentosca.bus.management.utils.MBUtils) ProducerTemplate(org.apache.camel.ProducerTemplate) URI(java.net.URI) PlanInstanceHandler(org.opentosca.bus.management.service.impl.instance.plan.PlanInstanceHandler) ParameterHandler(org.opentosca.bus.management.service.impl.util.ParameterHandler) Settings(org.opentosca.container.core.common.Settings) CsarId(org.opentosca.container.core.model.csar.CsarId) TEntityType(org.eclipse.winery.model.tosca.TEntityType) NodeTemplateInstance(org.opentosca.container.core.next.model.NodeTemplateInstance) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Collectors(java.util.stream.Collectors) TInterface(org.eclipse.winery.model.tosca.TInterface) IManagementBusDeploymentPluginService(org.opentosca.bus.management.deployment.plugin.IManagementBusDeploymentPluginService) ServiceTemplateInstance(org.opentosca.container.core.next.model.ServiceTemplateInstance) Objects(java.util.Objects) List(java.util.List) TPlan(org.eclipse.winery.model.tosca.TPlan) Endpoint(org.opentosca.container.core.next.model.Endpoint) DeploymentPluginCapabilityChecker(org.opentosca.bus.management.service.impl.util.DeploymentPluginCapabilityChecker) Entry(java.util.Map.Entry) Optional(java.util.Optional) PlanInstanceEvent(org.opentosca.container.core.next.model.PlanInstanceEvent) QName(javax.xml.namespace.QName) IManagementBusService(org.opentosca.bus.management.service.IManagementBusService) PluginHandler(org.opentosca.bus.management.service.impl.util.PluginHandler) Types(org.opentosca.container.core.convention.Types) DefaultExchange(org.apache.camel.support.DefaultExchange) PlanInstanceRepository(org.opentosca.container.core.next.repository.PlanInstanceRepository) Util(org.opentosca.bus.management.service.impl.util.Util) XMLHelper(org.opentosca.container.core.common.xml.XMLHelper) HashMap(java.util.HashMap) Exchange(org.apache.camel.Exchange) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ArtifactTemplateId(org.eclipse.winery.model.ids.definitions.ArtifactTemplateId) RelationshipTemplateInstance(org.opentosca.container.core.next.model.RelationshipTemplateInstance) Service(org.springframework.stereotype.Service) TArtifactReference(org.eclipse.winery.model.tosca.TArtifactReference) TEntityTypeImplementation(org.eclipse.winery.model.tosca.TEntityTypeImplementation) CorrelationIdAlreadySetException(org.opentosca.bus.management.service.impl.instance.plan.CorrelationIdAlreadySetException) Named(javax.inject.Named) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) DeploymentDistributionDecisionMaker(org.opentosca.bus.management.service.impl.collaboration.DeploymentDistributionDecisionMaker) LinkedList(java.util.LinkedList) MBHeader(org.opentosca.bus.management.header.MBHeader) CollaborationContext(org.opentosca.bus.management.service.impl.collaboration.CollaborationContext) SituationTriggerInstanceListener(org.opentosca.container.core.next.trigger.SituationTriggerInstanceListener) Csar(org.opentosca.container.core.model.csar.Csar) PlanInstance(org.opentosca.container.core.next.model.PlanInstance) TRequiredContainerFeature(org.eclipse.winery.model.tosca.TRequiredContainerFeature) Logger(org.slf4j.Logger) NotFoundException(org.opentosca.container.core.common.NotFoundException) TImplementationArtifact(org.eclipse.winery.model.tosca.TImplementationArtifact) CsarStorageService(org.opentosca.container.core.service.CsarStorageService) TTag(org.eclipse.winery.model.tosca.TTag) PlanLanguage(org.opentosca.container.core.next.model.PlanLanguage) TArtifactTemplate(org.eclipse.winery.model.tosca.TArtifactTemplate) Element(org.w3c.dom.Element) TRelationshipType(org.eclipse.winery.model.tosca.TRelationshipType) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) TOperation(org.eclipse.winery.model.tosca.TOperation) Collections(java.util.Collections) NodeTemplateInstance(org.opentosca.container.core.next.model.NodeTemplateInstance) Csar(org.opentosca.container.core.model.csar.Csar) Message(org.apache.camel.Message) PlanInstanceEvent(org.opentosca.container.core.next.model.PlanInstanceEvent) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) TEntityType(org.eclipse.winery.model.tosca.TEntityType) RelationshipTemplateInstance(org.opentosca.container.core.next.model.RelationshipTemplateInstance) NotFoundException(org.opentosca.container.core.common.NotFoundException) Date(java.util.Date) TRelationshipType(org.eclipse.winery.model.tosca.TRelationshipType) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) ServiceTemplateInstance(org.opentosca.container.core.next.model.ServiceTemplateInstance) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate)

Example 3 with NotFoundException

use of org.opentosca.container.core.common.NotFoundException in project container by OpenTOSCA.

the class ManagementBusServiceImpl method internalInvokeIA.

/**
 * Searches the right IA for the given operation and invokes it with the given parameters.
 *
 * @param exchange                  exchange containing the input parameters of the operation
 * @param csar                      the CSAR
 * @param serviceTemplateInstanceID ID of the service instance
 * @param type                      NodeType/RelationshipType that implements the operation
 * @param nodeTemplateInstance      NodeTemplateInstance for the deployment distribution decision
 * @param neededInterface           the interface of the searched operation
 * @param neededOperation           the searched operation
 */
private void internalInvokeIA(final Exchange exchange, final Csar csar, final Long serviceTemplateInstanceID, final TEntityType type, final NodeTemplateInstance nodeTemplateInstance, final String neededInterface, final String neededOperation) {
    LOG.debug("NodeType/RelationshipType: {}", type.getQName());
    final Message message = exchange.getIn();
    // check whether operation has output parameters
    final boolean hasOutputParams;
    try {
        final TInterface nodeTypeInterface = ToscaEngine.resolveInterface(csar, type, neededInterface);
        final TOperation operation = ToscaEngine.resolveOperation(nodeTypeInterface, neededOperation);
        hasOutputParams = operation.getOutputParameters() != null && !operation.getOutputParameters().isEmpty();
    } catch (final NotFoundException notFound) {
        LOG.error("Tried to invoke unknown operation '{}' in interface '{}!", neededOperation, neededInterface);
        return;
    }
    message.setHeader(MBHeader.HASOUTPUTPARAMS_BOOLEAN.toString(), hasOutputParams);
    final List<? extends TEntityTypeImplementation> typeImplementations = ToscaEngine.getTypeImplementations(csar, type);
    LOG.debug("List of Node/RelationshipTypeImplementations: {}", typeImplementations.toString());
    // invokable by available plug-ins
    for (final TEntityTypeImplementation implementation : typeImplementations) {
        message.setHeader(MBHeader.TYPEIMPLEMENTATIONID_QNAME.toString(), implementation.getQName());
        final List<? extends TImplementationArtifact> ias = Optional.ofNullable(implementation.getImplementationArtifacts()).orElse(Collections.emptyList());
        LOG.debug("List of Implementation Artifacts: {}", ias.stream().map(ia -> {
            return String.format("{%s, %s %s}", ia.getIdFromIdOrNameField(), ia.getOperationName(), ia.getArtifactRef());
        }).collect(Collectors.joining(", ")));
        for (final TImplementationArtifact ia : ias) {
            // try to invoke the operation on the current IA
            if (invokeIAOperation(exchange, csar, serviceTemplateInstanceID, type, nodeTemplateInstance, implementation, ia, neededInterface, neededOperation)) {
                LOG.info("Successfully invoked Operation {} on IA {}", neededOperation, ia.getName());
                return;
            }
        }
    }
    LOG.warn("No invokable implementation artifact found that provides required interface/operation.");
    handleResponse(exchange);
}
Also used : TImplementationArtifact(org.eclipse.winery.model.tosca.TImplementationArtifact) Message(org.apache.camel.Message) TInterface(org.eclipse.winery.model.tosca.TInterface) TOperation(org.eclipse.winery.model.tosca.TOperation) NotFoundException(org.opentosca.container.core.common.NotFoundException) TEntityTypeImplementation(org.eclipse.winery.model.tosca.TEntityTypeImplementation)

Example 4 with NotFoundException

use of org.opentosca.container.core.common.NotFoundException in project container by OpenTOSCA.

the class ManagementBusInvocationPluginScript method invoke.

@Override
public Exchange invoke(final Exchange exchange) {
    LOG.debug("Management Bus Script Plugin getting information...");
    final Message message = exchange.getIn();
    final CsarId csarID = message.getHeader(MBHeader.CSARID.toString(), CsarId.class);
    LOG.debug("CsarID: {}", csarID);
    final QName artifactTemplateID = message.getHeader(MBHeader.ARTIFACTTEMPLATEID_QNAME.toString(), QName.class);
    LOG.debug("ArtifactTemplateID: {}", artifactTemplateID);
    final String relationshipTemplateID = message.getHeader(MBHeader.RELATIONSHIPTEMPLATEID_STRING.toString(), String.class);
    LOG.debug("RelationshipTemplateID: {}", relationshipTemplateID);
    final QName serviceTemplateID = message.getHeader(MBHeader.SERVICETEMPLATEID_QNAME.toString(), QName.class);
    LOG.debug("ServiceTemplateID: {}", serviceTemplateID);
    final String interfaceName = message.getHeader(MBHeader.INTERFACENAME_STRING.toString(), String.class);
    LOG.debug("InterfaceName: {}", interfaceName);
    final String operationName = message.getHeader(MBHeader.OPERATIONNAME_STRING.toString(), String.class);
    LOG.debug("OperationName: {}", operationName);
    final Csar csar = storage.findById(csarID);
    try {
        final TServiceTemplate serviceTemplate = ToscaEngine.resolveServiceTemplate(csar, serviceTemplateID);
        final TArtifactTemplate artifactTemplate = ToscaEngine.resolveArtifactTemplate(csar, artifactTemplateID);
        final TArtifactType artifactType = ToscaEngine.resolveArtifactType(csar, artifactTemplate.getType());
        // the relationship template does not need to be present
        final TRelationshipTemplate relationshipTemplate = ToscaEngine.getRelationshipTemplate(serviceTemplate, relationshipTemplateID).orElse(null);
        final TNodeTemplate nodeTemplate = getNodeTemplate(message, csar, relationshipTemplate, serviceTemplate, interfaceName, operationName);
        final TNodeType nodeType = ToscaEngine.resolveNodeTypeReference(csar, nodeTemplate.getType());
        final TOperation operation = ToscaEngine.resolveOperation(csar, nodeType, interfaceName, operationName);
        return handleExchangeInternal(exchange, message, csarID, serviceTemplateID, csar, serviceTemplate, artifactTemplate, artifactType, nodeTemplate, nodeType, operation);
    } catch (NotFoundException | UnsupportedEncodingException e) {
        LOG.warn("Failed to resolve a strongly typed CSAR content reference, invocation failed!", e);
        return exchange;
    }
}
Also used : Csar(org.opentosca.container.core.model.csar.Csar) Message(org.apache.camel.Message) QName(javax.xml.namespace.QName) TArtifactTemplate(org.eclipse.winery.model.tosca.TArtifactTemplate) NotFoundException(org.opentosca.container.core.common.NotFoundException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) CsarId(org.opentosca.container.core.model.csar.CsarId) TNodeType(org.eclipse.winery.model.tosca.TNodeType) TOperation(org.eclipse.winery.model.tosca.TOperation) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) TArtifactType(org.eclipse.winery.model.tosca.TArtifactType) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate)

Example 5 with NotFoundException

use of org.opentosca.container.core.common.NotFoundException in project container by OpenTOSCA.

the class MBUtils method getOperatingSystemNodeTemplate.

/**
 * Finds the operating system node template, optionally requiring that it has a NodeInstance associated with a given
 * serviceTemplateInstanceId.
 *
 * @return The OperatingSystem NodeTemplate.
 */
@Nullable
public TNodeTemplate getOperatingSystemNodeTemplate(final Csar csar, final TServiceTemplate serviceTemplate, final TNodeTemplate nodeTemplate, boolean mustHaveNodeInstance, Long serviceTemplateInstanceId) throws NotFoundException {
    // Need to do exhaustive checking of all osNodeTypes for NodeInstance criteria
    final Queue<TNodeTemplate> osNodeTemplates = new LinkedList<>();
    final Queue<TNodeTemplate> nodeTemplateGraph = new LinkedList<>();
    final Set<TNodeTemplate> traversedTemplates = new HashSet<>();
    nodeTemplateGraph.add(nodeTemplate);
    while (!nodeTemplateGraph.isEmpty()) {
        final TNodeTemplate current = nodeTemplateGraph.poll();
        if (!traversedTemplates.add(current)) {
            // skip templates we already traversed
            continue;
        }
        final TNodeType currentNodeType = ToscaEngine.resolveNodeType(csar, current);
        if (isOperatingSystemNodeType(csar, currentNodeType)) {
            // just return the first result if we don't need to check for a node instance
            if (!mustHaveNodeInstance) {
                return current;
            }
            osNodeTemplates.add(current);
            continue;
        }
        // nodeType was not an OS node type, therefore traverse the Graph "downwards"
        ToscaEngine.getRelatedNodeTemplates(serviceTemplate, current, Types.hostedOnRelationType, Types.deployedOnRelationType, Types.dependsOnRelationType).filter(t -> !traversedTemplates.contains(t)).forEach(nodeTemplateGraph::add);
    }
    // return the first result that has an instance
    for (TNodeTemplate osTemplate : osNodeTemplates) {
        if (getNodeTemplateInstance(serviceTemplateInstanceId, osTemplate) != null) {
            return osTemplate;
        }
    }
    return null;
}
Also used : Transformer(javax.xml.transform.Transformer) TNodeTypeImplementation(org.eclipse.winery.model.tosca.TNodeTypeImplementation) RelationshipTemplateInstanceRepository(org.opentosca.container.core.next.repository.RelationshipTemplateInstanceRepository) StreamResult(javax.xml.transform.stream.StreamResult) LoggerFactory(org.slf4j.LoggerFactory) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) ToscaEngine(org.opentosca.container.core.engine.ToscaEngine) Nullable(org.eclipse.jdt.annotation.Nullable) Document(org.w3c.dom.Document) Map(java.util.Map) NonNullByDefault(org.eclipse.jdt.annotation.NonNullByDefault) NodeTemplateInstance(org.opentosca.container.core.next.model.NodeTemplateInstance) Collection(java.util.Collection) Set(java.util.Set) TNodeType(org.eclipse.winery.model.tosca.TNodeType) TInterface(org.eclipse.winery.model.tosca.TInterface) DocumentTraversal(org.w3c.dom.traversal.DocumentTraversal) NodeIterator(org.w3c.dom.traversal.NodeIterator) TPlan(org.eclipse.winery.model.tosca.TPlan) Interfaces(org.opentosca.container.core.convention.Interfaces) Entry(java.util.Map.Entry) Optional(java.util.Optional) Queue(java.util.Queue) QName(javax.xml.namespace.QName) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) NodeFilter(org.w3c.dom.traversal.NodeFilter) DOMSource(javax.xml.transform.dom.DOMSource) TransformerException(javax.xml.transform.TransformerException) Types(org.opentosca.container.core.convention.Types) HashMap(java.util.HashMap) HashSet(java.util.HashSet) Properties(org.opentosca.container.core.convention.Properties) RelationshipTemplateInstance(org.opentosca.container.core.next.model.RelationshipTemplateInstance) Service(org.springframework.stereotype.Service) Node(org.w3c.dom.Node) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) ModelUtils(org.opentosca.container.core.model.ModelUtils) LinkedList(java.util.LinkedList) Csar(org.opentosca.container.core.model.csar.Csar) Logger(org.slf4j.Logger) NodeList(org.w3c.dom.NodeList) StringWriter(java.io.StringWriter) NotFoundException(org.opentosca.container.core.common.NotFoundException) TImplementationArtifact(org.eclipse.winery.model.tosca.TImplementationArtifact) OutputKeys(javax.xml.transform.OutputKeys) Element(org.w3c.dom.Element) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) DocumentBuilder(javax.xml.parsers.DocumentBuilder) NodeTemplateInstanceRepository(org.opentosca.container.core.next.repository.NodeTemplateInstanceRepository) TransformerFactory(javax.xml.transform.TransformerFactory) TExportedOperation(org.eclipse.winery.model.tosca.TExportedOperation) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) LinkedList(java.util.LinkedList) HashSet(java.util.HashSet) TNodeType(org.eclipse.winery.model.tosca.TNodeType) Nullable(org.eclipse.jdt.annotation.Nullable)

Aggregations

NotFoundException (org.opentosca.container.core.common.NotFoundException)19 Csar (org.opentosca.container.core.model.csar.Csar)13 QName (javax.xml.namespace.QName)10 TServiceTemplate (org.eclipse.winery.model.tosca.TServiceTemplate)9 HashMap (java.util.HashMap)8 Map (java.util.Map)8 TNodeTemplate (org.eclipse.winery.model.tosca.TNodeTemplate)8 NodeTemplateInstance (org.opentosca.container.core.next.model.NodeTemplateInstance)7 Logger (org.slf4j.Logger)7 LoggerFactory (org.slf4j.LoggerFactory)7 Document (org.w3c.dom.Document)7 ArrayList (java.util.ArrayList)6 Optional (java.util.Optional)6 TInterface (org.eclipse.winery.model.tosca.TInterface)6 TOperation (org.eclipse.winery.model.tosca.TOperation)6 ToscaEngine (org.opentosca.container.core.engine.ToscaEngine)6 CsarId (org.opentosca.container.core.model.csar.CsarId)6 Service (org.springframework.stereotype.Service)6 List (java.util.List)5 Collectors (java.util.stream.Collectors)5