You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page is a place to discuss and document our understanding of and rules for how referencing and versioning between TOSCA data types, policy types, and policies work.

Versioning

Versions of entities in TOSCA is poorly supported. One can specify versions on definitions of entities but not when referencing those entities from other entities.  For example, when specifying the data type of a porperty in a policy type, the TOSCA definition says to specify it as a string. It is not possible to specify which version of a data type one is using.

CRUD with versions of Data Types, Policy Types and Policies

Chenfei Gao Would you perhaps write this section?

Referencing Data Types and Policy types

Today, when referencing a policy type from a data type, we add the "type_version" field:

tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
    policies:
    -   operational.restart:
            type: onap.policies.controlloop.operational.common.Drools
            type_version: 1.0.0

An alternative that could work with all references could be as follows:

tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
    policies:
    -   operational.restart:
            type: onap.policies.controlloop.operational.common.Drools#1.0.0

In other words, the '#' character acts as a delimiter between the type name and its version.

An alternative that could work with all references could be as follows:

tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
    policies:
    -   operational.restart:
            type: onap.policies.controlloop.operational.common.Drools

Not specifying a version means to use the latest version available.

Reading Data Types and Policy Types

When a data type or a policy type is read from the database:

  1. The requested entity is returned
  2. Any data types referenced by the requested policy type or data type are returned
  3. Any Policy types from which a requested policy type inherits are returned
  • No labels