Fix interface types creation 90/108190/2
authorandre.schmid <andre.schmid@est.tech>
Wed, 20 May 2020 13:24:40 +0000 (14:24 +0100)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Thu, 28 May 2020 07:57:32 +0000 (07:57 +0000)
commit9e43b160bde937c32151c8ce5a3d07701bd31924
treed5268e69d262c43736d7215af355bc63817a8fef
parentd8f14691952677771e74e688d7a1dc20e14b036b
Fix interface types creation

Interface types creation logic was not interpreting some allowed TOSCA
entries, that, when declared, were breaking the interface type
creation. Every entry under the interface type was being considered
as an interface operation, but it is possible to have "derived_from",
"version", "metadata" and "description". Also it is not considering
the Interface Type entries "inputs", "operations" and "notifications".
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.

Change-Id: I13218bda60b29d19b9c5565cbfd63ae3250a78bf
Issue-ID: SDC-3075
Signed-off-by: andre.schmid <andre.schmid@est.tech>
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManager.java
catalog-be/src/main/resources/import/tosca/interface-lifecycle-types/interfaceLifecycleTypes.yml
catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManagerTest.java
catalog-be/src/test/resources/types/interfaceLifecycleTypes.yml
catalog-model/src/main/java/org/openecomp/sdc/be/model/InterfaceDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java