-
Story
-
Resolution: Done
-
Low
-
None
The Interface Type is a TOSCA Entity and has the common keynames listed in section 3.7.1 TOSCA Entity Schema: "derived_from", "version", "metadata" and "description".
But the Interface Types creation logic is not interpreting those entries and instead considering every entry under the interface type as an interface operation. When used, the Entity Schema entries are breaking the interface type creation:
tosca.interfaces.relationship.AnInterface: derived_from: tosca.interfaces.Root # will be considered as an operation and break the code description: a description # will be considered as an operation and break the code version: "1.0.0" # will be considered as an operation and break the code metadata: # will be considered as an operation and break the code [...] operation1: description: Operation to pre-configure the source endpoint. [...] operationN: description: Operation to post-configure the source endpoint.
Also it is not considering the interface entries: "inputs", "operations" and "notifications" (TOSCA 1.3 section 3.7.5):
tosca.interfaces.nfv.AnInterface:
derived_from: tosca.interfaces.Root
description: a description
version: "1.0.0"
metadata:
meta1: meta1
inputs:
[...]
operations:
operation1:
[...]
operationN:
notifications:
notification1:
[...]
notificationN:
Another thing is that TOSCA 1.3 changes the way operations should be declared, deprecating the previous way. Now there should be an entry "operations" with the operations entries under it, instead of having the operations entries direct under the interface type. The change allows both types, following the TOSCA rule: if operations entry is not present, then the deprecated way is considered (TOSCA 1.3 section 3.6.20.3).