Orange-OpenSource / Cloudnet-TOSCA-toolbox

Set of tools for validating, visualizing and analyzing TOSCA resource descriptions
https://toscatoolbox.orange.com
MIT License
14 stars 11 forks source link

Improve type checkings #8

Closed philippemerle closed 3 years ago

philippemerle commented 3 years ago

Add more type checkings to the Cloudnet TOSCA toolchain to detect errors the earlier. Check that

  1. declared types are not already defined
  2. used types are defined
  3. used types are of the expected type kind, e.g. if "capability: x" then x is a capability type
  4. acyclic depend from
  5. overloading fields refering a type
  6. property values are of the right type

etc.

fredkgit commented 3 years ago

I think it's a good idea to clearly separate the alloy generator from type system checking and improve the type checking as mentionned above. I suppose issue #13 is part of (1) 'declared types are not already defined'

philippemerle commented 3 years ago

yes issue #13 is related to 'declared types are not already defined'.

fredkgit commented 3 years ago

For (1.), for ETSI NFV 3.5.1, I recently had the following error report because in the NSD types the policy for NS instantiation levels was defined with the same name as the similar policy for VNF (not identical), i.e. the name was tosca.policies.nfv.InstantiationLevels instead of tosca.policies.nfv.NsInstantiationLevels . issue_8_ambiguous_naming.txt

JLCoulin commented 3 years ago

Closed with merge ff54839