Skip to content

cna.qualityModel.entities.Root.Component

The Root.Component Node represents a generic Component entity. Therefore , it should be used to model a Component that is neither a Service, Backing Service, nor a Storage Backing Service entity. As an extension to the original TOSCA Root Node, this Node allows modeling Endpoints, Links to other Component entities and a Deployment Mapping to an Infrastructure Entity if desired. The Node also allows modeling the persistence of a specific Data Aggregate entity.

File references:      TOSCA-File

Shorthand Name Root.Component
Type Qualified Name qualityModel:Root.Component
Type URI cna.qualityModel.entities.Root.Component

1. Properties

Name Required Type Constraints
Description
N/A N/A N/A N/A N/A

2. Attributes

Name Required Type Constraints
Description
N/A N/A N/A N/A N/A

3. Definition

cna.qualityModel.entities.Root.Component:
  derived_from: tosca.nodes.Root
  description: Node Type to model Component entities
  requirements:
    # Require deployment on an Infrastructure entity
    - host:
        capability: tosca.capabilities.Compute
        relationship: tosca.relationships.HostedOn
        occurrences: [1, 1]
    # Allow the definition of Links between Components
    - endpoint_link:
        capability: tosca.capabilities.Endpoint
        relationship: cna.qualityModel.relationships.ConnectsTo.Link
        occurrences: [0, UNBOUNDED]
    # Allow the definition of Data Aggregate usage
    - uses_data:
        capability: tosca.capabilities.Attachment
        node: cna.qualityModel.entities.DataAggregate
        relationship: cna.qualityModel.relationships.AttachesTo.Data
        occurrences: [0, UNBOUNDED]
    # Allow the definition of Backing Data usage
    - uses_backing_data:
        capability: tosca.capabilities.Attachment
        node: cna.qualityModel.entities.BackingData
        relationship: cna.qualityModel.relationships.AttachesTo.Data
        occurrences: [0, UNBOUNDED]
  capabilities:
    # Allow assigning Endpoint entities
    endpoint:
      type: tosca.capabilities.Endpoint
      occurrences: [0, UNBOUNDED]
    # Allow assigning External Endpoint entities
    external_endpoint:
      type: tosca.capabilities.Endpoint.Public
      occurrences: [0, UNBOUNDED]
    # Needed so that Data Aggregates can be stored
    persist_data:
      type: cna.qualityModel.capabilities.DataStorage
      valid_source_types: [cna.qualityModel.entities.DataAggregate]
      occurrences: [0, UNBOUNDED]

4. Example

ocr_service:
  type: cna.qualityModel.entities.Root.Component
  requirements:
    - host: docker_host
    - endpoint_link:
        node: pdf_service
        relationship: ocrService_connects-to_PdfService
    - uses_backing_data: ocr_configuration

Last update: 2022-08-31
Back to top