Node type

TOSCA definition

In CDS, we have mainly two distinct types: components and source. We have some other type as well, listed in the other section.

Component:

Used to represent a functionality along with its contract, such as inputs, ouputs, and attributes

Component type is the root component TOSCA node type from which other node type will derive:

tosca.nodes.Component
{
  "description": "This is default Component Node",
  "version": "1.0.0",
  "derived_from": "tosca.nodes.Root"
}

Bellow is a list of supported components

component-resource-resolution:

Used to perform resolution of resources.

Requires as many as artifact-mapping-resource (see Artifact Type -> Mapping) AND artifact-template-velocity (see Artifact Type -> Jinja) as needed.

Output result:

Will put the resolution result as an attribute in the workflow context called assignment-params.

Using the get_attribute expression, this attribute can be retrieve to be provided as workflow output (see Workflow).

Specify which template to resolve:

Currently, resolution is bounded to a template. To specify which template to use, you need to fill in the artifact-prefix-names field.

See Template to understand what the artifact prefix name is.

Storing the result:

To store each resource being resolved, along with their status, and the resolved template, store-result should be set to true.

Also, when storing the data, it must be in the context of either a resource-id and resource-type, or based on a given resolution-key

The concept of resource-id / resource-type, or resolution-key, is to uniquely identify a specific resolution that has been performed for a given action. Hence the resolution-key has to be unique for a given blueprint name, blueprint version, action name.

Through the combination of the fields mentioned previously, one could retrieved what has been resolved. This is useful to manage the life-cycle of the resolved resource, the life-cycle of the template, along with sharing with external systems the outcome of a given resolution.

The resource-id / resource-type combo is more geared to uniquely identify a resource in AAI, or external system. For example, for a given AAI resource, say a PNF, you can trigger a given CDS action, and then you will be able to manage all the resolved resources bound to this PNF. Even we could have a history of what has been assigned, unassigned for this given AAI resource.

Warning

Important not to confuse and AAI resource (e.g. a topology element, or service related element) with the resources resolved by CDS, which can be seen as parameters required to derived a network configuration.

Run the resolution multiple time:

If you need to run the same resolution component multiple times, use the field occurence. This will add the notion of occurrence to the resolution, and if storing the results, resources and templates, they will be accessible for each occurrence.

Occurrence is a number between 1 and N; when retrieving information for a given occurrence, the first iteration starts at 1.

This feature is useful when you need to apply the same configuration accross network elements.

Resource resolution is the definition:

component-resource-resolution
{
  "description": "This is Resource Assignment Component API",
  "version": "1.0.0",
  "attributes": {
    "assignment-params": {
      "required": true,
      "type": "string"
    }
  },
  "capabilities": {
    "component-node": {
      "type": "tosca.capabilities.Node"
    }
  },
  "interfaces": {
    "ResourceResolutionComponent": {
      "operations": {
        "process": {
          "inputs": {
            "resolution-key": {
              "description": "Key for service instance related correlation.",
              "required": false,
              "type": "string"
            },
            "occurrence": {
              "description": "Number of time to perform the resolution.",
              "required": false,
              "default": 1,
              "type": "integer"
            },
            "store-result": {
              "description": "Whether or not to store the output.",
              "required": false,
              "type": "boolean"
            },
            "resource-type": {
              "description": "Request type.",
              "required": false,
              "type": "string"
            },
            "artifact-prefix-names": {
              "required": true,
              "description": "Template , Resource Assignment Artifact Prefix names",
              "type": "list",
              "entry_schema": {
                "type": "string"
              }
            },
            "request-id": {
              "description": "Request Id, Unique Id for the request.",
              "required": true,
              "type": "string"
            },
            "resource-id": {
              "description": "Resource Id.",
              "required": false,
              "type": "string"
            },
            "action-name": {
              "description": "Action Name of the process",
              "required": false,
              "type": "string"
            },
            "dynamic-properties": {
              "description": "Dynamic Json Content or DSL Json reference.",
              "required": false,
              "type": "json"
            }
          },
          "outputs": {
            "resource-assignment-params": {
              "required": true,
              "type": "string"
            },
            "status": {
              "required": true,
              "type": "string"
            }
          }
        }
      }
    }
  },
  "derived_from": "tosca.nodes.Component"
}