Unable to validate nested Complex datatypes

Bug #1567063 reported by Matt Rutkowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
New
Undecided
Lakshmi Prasanna

Bug Description

Currently, we have code to validate complex datatypes; however, it assumes that a complex data type is comprised of properties that are simple datatypes (e.g., string, int, etc.). We need to assure that if we have complex types that have properties that are also complex types (and so on and so on) we can recursively validate these types properly without loss of type information.

This problem manifests even in TOSCA's built-in PortSpec datatype is has 2 properties (i.e., source and target) that are of type "PortDef". The problem is that the validation logic, loses the fact that properties 'source' and 'target' are of type PortDef by the time it reaches the "validate_datatype()" method in dataentity.py and instead they appear as integer. This is a huge problem as PortDef has an "in-range" constraint that is lost and can no longer be tested at this point.

Changed in tosca-parser:
assignee: nobody → Lakshmi Prasanna (lakshmiprasanna-m)
Revision history for this message
Lakshmi Prasanna (lakshmiprasanna-m) wrote :

Hi Matt,

We have added some logic to validate the default values of type "PortDef" under Bug #1567552.

After adding the logic, values are validating and it is throwing error if the value is out of range.

Please let us know whether you are expecting the same or not so that we can say this bug is duplicate.

Regards,
Lakshmi Prasanna M.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.