Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TOSCA 1.2 allows using a JSON schema as a TOSCA constraint in parameter definition and node_filter clauses. Using an external schema document (with a Web URL in the TOSCA constraint clause) seems to be especially promising, since such usage combines the benefits of schema-driven validation with the flexibility of having the schema hosted outside:

Code Block
titleExternal JSON schema in a TOSCA requirement assignment
linenumberstrue
collapsetrue
requirements:
  - cpu:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPU
        properties:
          num_cpus:
            - greater_or_equal: 2
          custom_features: 
            - schema: http://my.domain.com/url/datatype.constraints.schema.json