Coding Templates

The Dell Cloud Manager blueprint templates are coded in YAML syntax in text files using a standard text editor such as vi, emacs, sublime or notepad++.

  • YAML supports many types of data structures, based upon three basic primitives: mappings (hashes/dictionaries), sequences (arrays/lists) and scalars (strings/numbers).
  • Indentation may be used for structure, colons separate key: value pairs, and dashes are used to create “bullet” lists.
  • Comments can be specified by coding a # (pound symbol) before the comment. Any words, spaces, or marks after a # will be ignored and treated as comments.

Attention

Tab characters are not allowed in the template yaml files and will generate errors. You need to expand/convert tabs to spaces in your text editor.

More details on the TOSCA Specification yaml syntax can be found at www.yaml.org.

For more details on the Dell Cloud Manager TOSCA implementation specification refer to the Blueprint Format section in this document.

Template Files

When creating your blueprint definitions you can specify all of the information for a blueprint in a single template file, or you can split up the definitions into multiple template files.

Single file example

template_name:
template_author:
template_version:
description:
long_description:

imports:
    - base_types.yaml

topology_template:

    inputs:
      ...
      ...

    node_templates:
      ...
      ...

    outputs:
      ...
      ...

    groups:
      ...
      ...

Multi file example

You can split your blueprint definition into separate files that you decide works best for your management of templates. This allows you to define “commonly used” template files which you can import and use for more than one blueprint.

Note

The separate template files being imported must contain the appropriate section definition statement preceding the definitions (e.g. inputs:, node-templates:, outputs:, groups:, etc.). The create-blueprint command will read all of the files and merge the sections together.

main.yaml template file

template_name:
template_author:
template_version:
description:
long_description:

imports:
    - base_types.yaml
    - my_inputs.yaml
    - my_nodes.yaml

topology_template:
    ...
    ...

  outputs:
    ...
    ...

  groups:
    ...
    ...

my_inputs.yaml template file

topology_template:
    ...
    ...

  inputs:
    ...
    ...

my_nodes.yaml template file

topology_template:
    ...
    ...

  node_templates:
      ...
      ...