Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Limitations and capabilities

Sebastian Hesse edited this page May 25, 2015 · 11 revisions

This page describes the limitations of the "YAML Transformer". If you want to know, what is meant with "YAML Transformer", click here.

A full documentation is provided at /documentation.

General

For the remainder of the page the following abbreviations are used:
"transformer" for the here described "YAML Transformer".
"yaml spec" for the used specification.

Dots are used in the yaml examples instead of the leading spaces.

Specifications

The YAML Transformer is based on the TOSCA Simple Profile in YAML Version 1.0, Committee Specification Draft 01, 27 March 2014
http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/csd01/TOSCA-Simple-Profile-YAML-v1.0-csd01.pdf
The "new" specification: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.pdf
The XML specification: http://docs.oasis-open.org/tosca/TOSCA/v1.0/os/TOSCA-v1.0-os.pdf

Limitations on Strings

If you want to use a String containing a ":" or "{" (e.g. for a JSON string), you need to put the whole string into double quotes, e.g. "{key:value}". If you need to set a string within that string, you have to use single quotes, e.g. you need to write "{key:'my-string'}"

This is important, because braces are interpreted as a (Hash-)Map by the transformer. The double quotes mask the braces.

File extensions in artifact types should be set within brackets (e.g.: "[war]" but without the double quotes)

Not supported elements

Currently we don't support the following elements of the YAML Service Template:

  • imports
  • groups
  • DeploymentArtifact

Node template

NodeTemplates in YAML can have interfaces and artifacts, however those properties are currently not supported and ignored.

Requirements

Requirements are currently not supported as the definition in the yaml spec stands in conflict with the yaml standard. It is possible to use a capability instead.

Interfaces

If interfaces are used, we can't support the implementation name (or any other property) given in YAML, because the Tosca classes don't support this. Example:
node_type:
..interfaces:
....InterfaceA:
......operationX:
........implementation: something

Here, the implementation "something" is lost at the moment.

Supported elements

ImplementationArtifact

Only ImplementationArtifacts are supported in YAML -> all artifacts in NodeTypes are converted to ArtifactTemplates which are used by a corresponding ImplementationArtifact of a NodeTypeImplementation.

Capability

CapabilityTypes are supported like this:
node_templates:
..nodeTemplateFoo:
....capabilities:
......capability_name:
........type: capabilityTypeName

capability_types:
..capabilityTypeName:
....derived_from: XY
....[etc.]

Relationship

Relationship types are supported. Example:
relationship_types:
..typeA:
....derived_from: typeRoot
....description: DESCRIPTION
....valid_targets: [CapabilityXY]

Clone this wiki locally